mov eax, 1
September 4, 2015 ยท View on GitHub
Basic mov immediate instruction.
Output:
b8 01 00 00 00
^^ ^^^^^^^^^^^
1 2
- Opcode
- Immediate value:
1in little endian
Opcode bits:
1 0 1 1 1 0 0 0
^^^^^^^^^ ^^^^^
1 2
- What to do.
- Where to move to.
000iseax.
Intel documentation says:
-
Opcode:
B8 + rd id.+rdsays that the 3 bits at the end are the destination register.idsays that a double word immediate follows. -
Op/En:
OI.The "Instruction Operand Encoding" table for
movandOIsays:Operand 1:
opcode + rd (w)Operand 2:imm8/16/32/64