Figure 2-10 General instruction format.

Immediate
The datum is either 8 bits or 16 bits long and is part of the instruction.
Direct
The 16-bit effective address of the datum is part of the instruction.
Register
The datum is in the register that is specified by the instruction. For a 16-bit operand, a register may be AX, BX, CX, DX, SI, DI, SP, or BP, and for an 8-bit operand a register may be AL, AH, BL, BH, CL, CH, DL, or DH.
Register Indirect
The effective address of the datum is in the base register BX or an index register that is specified by the instruction, i.e.,
EA = (BX)
(DI)
(SI)
Register Relative
The effective address is the sum of an 8- or 16-bit displacement and the contents of a base register or an index register, i.e.,
EA = (BX)
(BP)
(SI)
(DI)
+ 8-bit displacement
(sign extended)
16-bit displacement
Based Indexed
The effective address is the sum of a base register and an index register, both of which are specified by the instruction, i.e.,
EA = (BX)
(BP)
+ (SI)
(DI)
Relative Based Indexed
The effective address is the sum of an 8- or 16-bit displacement and a based indexed address, i.e.,
EA = (BX)
(BP)
+ (SI)
(DI)
+ 8-bit displacement
(sign extended)
16-bit displacement

Figure 2-11 Data-related addressing modes.

(a) Immediate
(b) Direct
(c) Register
(d) Register indirect
(e) Register relative
(f) Based indexed
(g) Relative based indexed
*EA is added to 1610 times the contents of the appropriate segment register.

For example, if

(BX) = 0158    (DI) = 10A5    Displacement = 1B57    (DS) = 2100
and DS is used as the segment register, then the effective and physical addresses produced by these quantities and the various addressing modes would be

Direct: EA = 1B57
Physical address = 1B57 + 21000 = 22B57
Register: No effective address - datum is in specified register.
Register indirect assuming register BX:
EA = 0158
Physical address = 0158 + 21000 = 21158
Register relative assuming register BX:
EA = 0158 + 1B57 = 1CAF
Physical address = 1CAF + 21000 = 22CAF
Based indexed assuming registers BX and DI:
EA = 0158 + 10A5 = 11FD
Physical address = 11FD + 21000 = 221FD
Relative Based indexed assuming BX and DI:
EA = 0158 + 10A5 + 1B57 = 2D54
Physical address = 2D54 + 21000 = 23D54


Table of Contents | Next page | Previous page

This is page 15.