5, the relative register addressing mode:
Operands in the memory, the effective address of the operand is a base address register (BX, BP)
Content or index register (SI, DI) plus the instruction given 8-bit or 16-bit shift and the amounts of
BX 8-bit displacement
EA (effective address) = BP +
SI 16-bit displacement
OF
In general, if the SI, DI, or the contents of BX as an active part of the address, then
Reference is the DS segment register; BP, if the content as part of the effective address, then the reference
A segment register SS.
Physical address = 16d × (DS) + (BX) + 8
Or (SI) or a 16-bit displacement amount
或 (DI)
Physical address = 16d × (SS) + (BP) + 8-bit displacement
Or 16-bit displacement
In the instruction given 8-bit or 16-bit shift amount using complement format. When calculating an effective address, such as
8 is a displacement amount, were sign-extended into 16 bits.
E.g:
MOV AX, [DI + 1223H]
Suppose, (DS) = 5000H, (DI) = 3678H
The physical address = 50000 + 3678 + 1233 = 5489BH
Content 5489BH address: 55AAH
After executing the instruction AX = 55AAH
The following instruction, the source register operand using relative addressing, segment registers are referenced SS: MOV BX, [BP-4]
The following instruction, destination operand registers are used relative addressing, segment registers are referenced ES: MOV ES: [BX + 5], AL
Instruction: MOV AX, [SI + 3] and MOV AX, 3 [SI] is equivalent to