-10

I have to do a program to school in Assembler but we did just a few basic things. Is it possible to write code in Java and convert it to Assembler?

1 Answers1

3

Yes you can. While normally Java is compiled to bytecode executed by JVM, there are compilers that output native code. For example, gcc has Java front-end, the gcj, so you can use that along with -s option (which emits assembly output instead of machine code).

Having said that, don't expect to fool anyone. Your teacher will instantly recognise that your code has not been written by you.