3 ms·
Assembly code then has to be compiled into machine code to create the executable.
by z92 11y ago
Assembly code then has to be compiled into machine code to create the executable.
- lfowles 11y agoTo expand a bit in terrible pseudocode that I sort of remember from Atmel ucs: Assembly: mov 0x1,reg2 # put 1 in register 2 Machine Code: 0xAC12 # Move an immediate value into register 2 Assembly: mov *reg2,reg1 # put contents of address in reg2 in reg1 Machine Code: 0xBF201 # Move an indirect value, offset 0, address in reg2 to reg1 It's a much more straightforward transformation than the one from C->ASM though. Edit: This link might make more sense... the difference is mainly between the mnemonic and the encoding: http://www.mrc.uidaho.edu/mrc/people/jff/digital/MIPSir.html http://www.mrc.uidaho.edu/mrc/people/jff/digital/MIPSir.html You'll also notice there are explicit instructions for immediate ops, but no two assembly schemes seem to share the same level of abstraction.