Output:
89 d8
^^ ^^
1 2
- Opcode
- ModR/M
Opcode bits:
1 0 0 0 1 0 0 1
^^^^^^^^^^^ ^ ^
1 2 3
- This is a
mov
. - Move REG to R/M as represented on the ModR/M byte. Otherwise, other way around.
- 32-bit operands. Otherwise, 8-bit.
ModR/M bits:
1 1 0 1 1 0 0 0
^^^ ^^^^^ ^^^^^
1 2 3
- MOD = 3: REG and R/M are registers.
- REG = 3: EBX
- REG = 0: EAX
So from the opcode, we move REG (EBX) into R/M (EAX).
Note that two encodings are possible on reg / reg operations: we could swap the before last bit to 1 and both registers.
Both possible encodings are documented on the instruction table:
01 /r MOV r/m32, r32
03 /r MOV r32, r/m32
/r
says that a MOdR/M follows the opcode, and that the 2 last bits describe it.