Skip to content

Instruction Format

Composition of Instruction

  • Operation Code (Op code): Tell CPU what to do.
  • Operands: Tell CPU the content of doing action, including source operand and destination operand.

Types of Instruction

  • Three-address Instruction and Two-address Instruction: General-purpose register machine.
  • One-address Instruction: Accumulator-based machine.
  • Zero-address Instruction: Stack machine.

Instruction Format

| 7 6 | 5 4 3 | 2 1 0 |
  MOD    REG     R/M

MOD

MODMeaning
00
R/MOperation
100SIB
110Memory direct addressing mode (Displacement only addressing mode) (16-bit displacement)
101Memory direct addressing mode (Displacement only addressing mode) (32-bit displacement)
OtherRegister indirect addressing mode with no displacement
01One-byte signed displacement follows addressing bytes
10Four-byte signed displacement follows addressing bytes
11Register addressing mode

REG

REG ValueRegister (8-bits)Register (16-bits)Register (32-bits)
000ALAXEAX
001CLCXECX
010DLDXEDX
011BLBXEBX
100AHSPESP
101CHBPEBP
110DHSIESI
111BHDIEDI
Last updated on