Addressing Modes 8086
Addressing Modes 8086
Modes
8086
Addressing Modes
1. Immediate
2. Direct
3. Indirect
4. Register
5. Register Indirect
6. Displacement (Indexed)
0
1. Immediate Addressing
• Operand is part of instruction
• Operand = address field
• e.g. ADD AX, 5h
• LDA #5
– 5 is operand
0
2. Direct Addressing
• Address field contains address of operand
• Effective address EA = address field (A)
ADD AX, value
Value DB 05h
– Add contents of cell value to accumulator AX
0
Direct Addressing Diagram
0
3. Register Addressing
• Operand is held in register named in
address filed
• EA = R
• Limited number of registers
• Very small address field needed
– Shorter instructions
– Faster instruction fetch
– MOV AX, BX
– ADD AX, BX
0
Register Addressing Diagram
0
4. Indirect Addressing Diagram
AX
0
Register Indirect Addressing
0
Displacement Addressing
• EA = A + (R)
• Effective address=start address +
displacement
• Effective address=Offset + (Segment
Register)
• Use direct and register indirect
• Address field hold two values
– A = base value
– R = register that holds displacement
– or vice versa
0
Displacement Addressing
Diagram
0
5. Relative Addressing (PC-
Relative)
• A version of displacement addressing
• R = Program counter, PC
• EA = A + (PC)
• i.e. get operand from A cells from current location
pointed to by PC
6. Register relative addressing mode: - the data is
available at an effective address formed by adding
an
• 8-bit or 16-bit displacement with the content of any
one of the register BX, BP, SI & DI in the default
• (either in DS & ES) segment.
• MOV AX, 50H [BX] 0
Indexed Addressing
• A = base
• R = displacement
– EA = A + (R)
0
7. Based Indexed Addressing
• The effective address of data is formed in this
addressing mode, by adding content of a base
register (any one of BX or BP) to the content
of an index register (any one of SI or DI). The
default segment register may be ES or DS.
• MOV AX, [BX][SI]
0
8. Relative Based Indexed
Addressing