Professional Documents
Culture Documents
FALLSEM2021-22 CSE2006 ETH VL2021220104026 Reference Material II 12-Aug-2021 8-A-8086-Addressing Mode
FALLSEM2021-22 CSE2006 ETH VL2021220104026 Reference Material II 12-Aug-2021 8-A-8086-Addressing Mode
ADDRESSING MODES
• Various methods used to access instruction operands is
called as Addressing Mode
3
• 8086 Addressing modes - classified according to
flow of instruction execution
A. Sequential flow instructions
• Arithmetic
• Logical
• Data transfer
• Processor control
B. Control transfer instructions
• INT
• CALL
• RET
• JUMP
A. Sequential flow instructions
1. Implied Addressing mode
2. Immediate addressing mode
3. Direct addressing mode
4. Register addressing mode
5. Register Indirect addressing mode
6. Indexed addressing mode
7. Register Relative addressing mode
8. Based Indexed addressing mode
9. Relative Based Indexed addressing mode
B. Control transfer instructions
1. Intersegment Direct addressing mode
2. Intersegment Indirect addressing mode
3. Intra segment Direct addressing mode
4. Intra segment Indirect addressing mode
1. Implied Addressing - The data value/data
address is implicitly associated with the
instruction.
• AAA
• AAS
• AAM
• AAD
• DAA
• DAS
• XLAT
Sequential Flow Instructions
2. Immediate Addressing – Data / operand is part
of the instruction Destination
Source
8 BIT Operand Registers - AL, AH, BL, BH, CL, CH, DL, DH
5. Register Indirect Addressing – Data is pointed by
the offset value in the register, specified in the
instruction
DS BX
PhyAddr = 10H *
ES
+ SI
DI
If DS=5000H; BX=10FF;
Then EffectiveAddr = 10FF
and PhyAddr = 10H*5000H + 10FFH = 510FFH
6. Indexed Addressing
Data is pointed by the offset in the index
register specified in the instruction
DS is the default segment register for SI and
DI
EffectiveAddr = 50H+[BX]
BX
DS BP
PhyAddr = 10H * ES + SI
DI
8. Based Indexed Addressing
Data is pointed by content of base register
specified in the instruction plus
Content of index register specified in the
instruction
Default segment registers – DS, ES
DS BX SI
PhyAddr = 10H * ES
+ BP
+ DI
9. Register Relative Addressing
Data is pointed by the sum of 8 bit or 16 bit
displacement specified in the instruction plus
Offset specified in the base registers –BX, BP
plus
Offset specified in the index registers – SI, DI
Default segment registers – DS, ES
8 bit BX SI
EffectiveAddr = 16 bit + BP + DI
DS 8 bit BX SI
PhyAddr = 10H * ES +
16 bit
+ BP + DI
Control Transfer Instructions
• Intrasegment Direct Addressing –
Control transfer instruction and
Address where control is transferred lies in the same
segment
Immediate displacement value specified in instruction
Displacement is w.r.t IP register content
Short jump –
8 bit signed displacement ‘d’
i.e (-27 < d < +27-1) = (-128 < d < +127 )
= (-80H < d < +7FH )
Long jump – 16 bit signed displacement ‘d’
i.e (-215 < d < +215 ) = (-32768 < d < + 32768 )
Example: JMP SHORT LABEL
LABEL lies within (-128 to +127 ) from the current IP
content
Intrasegment Direct Addressing –
EffectiveAddr = [BX]
PhyAddr = 10H*[CS]+[BX]
Intrasegment Indirect Addressing
Code Segment
6FFFF BX = 75ABH
CS = 6000H
MSB LSB
74466 IP 44 66
CS 70 00
62003 70H
62002 00H
62001 44H
62000 66H