Addressing modes provide convenience in accessing data needed in an instruction.
8086 Addressing Modes for accessing data
Immediate
Addressing mode
(for source operand only)
Register addressing
Memory addressing
I/O port addressing
Immediate Addressing
Before
Ex1: MOV DX, 1234H
DX ABCDH
After
1234H
Before
Ex2: MOV CH, 23H
CH
After
4DH
23H
Register Addressing
Before
Ex1: MOV CX, SI
After
CX 1234H
5678H
SI 5678H
5678H
Before
Ex2: MOV DL, AH
After
Dl
89H
BCH
AH
BCH
BCH
Memory Addressing
Direct Addressing
Indirect Addressing
Memory Indirect Addressing
Register
Indirect
Based Addressing Indexed with Addressing with displacement displacement
Based
Based Indexed
Indexed
addressing with addressing displacement
Memory Direct Addressing
Before
Ex1: MOV BX, DS:5634H
BX
DS:5634H
DS:5635H
ABCDH
8645H
45H
86H
LS byte
MS byte
Before
Ex2: MOV CL, DS:5634H
CL
F2H
DS:5634H
DS:5635H
After
45H
86H
Ex3: MOV BH, LOC
Program
.DATA
LOC DB 78H
After
Before
BH
C5H
45H
After
78H
Register Indirect Addressing
Before
Ex1: MOV CL, [SI]
CL
20H
SI
3456H
DS:3456H
DX
F232H
BX
After
A2B2H
DS:A2B2H
DS:A2B3H
67H
35H
Before
Ex3: MOV AH, [DI]
78H
78H
Before
Ex2: MOV DX, [BX]
After
AH
30H
DI
3400H
DS:3400H
86H
3567H
LS byte
MS byte
After
86H
Only SI, DI and BX can be used inside [ ] from memory addressing point of view. From user point of view [BP] is also possible. This scheme provides 3 ways of addressing an operand in memory.
Based Addressing with displacement
Before
Ex1: MOV DH, 2345H[BX]
DH
2345H is 16-bit displacement
4000 + 2345 = 6345H
45H
45H is 8-bit displacement
3000 + 45 = 3045H
It is SS when BP is used
67H
BX 4000H
DS:6345H
67H
Before
Ex2: MOV