Intruction Prefix | Address-size prefix | Operand-size prefix | Segment override | Opcode | Register / Memory | Scale, index , base | displacement | immediate |
---|---|---|---|---|---|---|---|---|
Optional: 1 byte | Optional: 1 byte | Optional: 1 byte | Optional: 1 byte | 1 or 2 bytes | Optional: 1 byte | Optional: 1 byte | Optional: 1, 2, or 4 bytes | Optional: 1, 2 or 4 bytes |
F3h : REP, REPE, and REPZ | Use only with string operations (stosb, movsb, etc) |
F2h : REPNE and REPNZ | Again, use only with string operations |
F0h : LOCK | Use only with: BT, BTS, BTR, BTC ('mem, reg/imm' operand forms) XCHG ('reg, mem' and 'mem, reg' operand forms) ADD, OR, ADC, SBB ('mem, reg/imm' operand forms) AND, SUB, XOR (all operand forms) NOT, NEG, INC, DEC (on 'mem' operands) |
2Eh | CS segment override |
36h | SS segment override |
3Eh | DS segment override |
26h | ES segment override |
64h | FS segment override |
65h | GS segment override |
Mod | Reg/Opcode | R/M |
Bits 7 and 6 | Bits 5 to 3 | Bits 0 to 2 |
000 | AL, AX, EAX |
001 | CL, CX, ECX |
010 | DL, DX, EDX |
011 | BL, BX, EBX |
100 | AH, SP, ESP |
101 | CH, BP, EBP |
110 | DH, SI, ESI |
111 | BH, DI, EDI |
Scale | Index | Base |
Bits 7 and 6 | Bits 5 to 3 | Bits 2 to 0 |