<<< Simplified Instruction Encoding Example (not x86!) | Index | Simplified Multibyte Instructions Cont. (not x86!) >>> |
Instruction
mov ax, [1000h] ; load AX register from memory location 1000h
loads the AX register from memory location 1000h.
The encoding for the opcode is 110 00 110, or 0C6h.
Another encoding,
mov ax, [2000h] ; load AX register from memory location 2000h
is exact same 0C6h, because none of the opcode fields store the memory address.
To accommodate 16-bit address or a constant value, we must add two more bytes to the instruction opcode.
<<< Simplified Instruction Encoding Example (not x86!) | Index | Simplified Multibyte Instructions Cont. (not x86!) >>> |