2.1 Addressing Modes of 8086 (1)
2.1 Addressing Modes of 8086 (1)
MICROCONTROLLERS(EECE3041)
Syllabus
L T P C
3 0 2
4
UNIT II
Instruction Set and Interrupts Addressing modes of 8086, instruction set of 8086,
assembly language programs (example programs), interrupts and interrupt service
routines, interrupt cycle of 8086, non-maskable interrupt, maskable interrupt (INTR).
2
Addressing Modes of 8086
Addressing Modes of 8086
• Addressing modes indicates a way of locating data or operand
Offset Address
20 bit Address
DS/ES * 10H + Data
• Example
• MOV AX, 50H[BX]
• MOV 10H[SI], DX
+
Memory location
Offset Address
20 bit Address
DS/ES * 10H + Data
Offset Address is [BX]/[SI]/[DI]/[BP] + Displacement
Effective/Physical Address is DS/ES*10H + Offset Address
Addressing Modes of 8086
6. Indexed Addressing
In this mode, offset address is stored in one of the index registers
SI or DI.
DS is the default segment registers.
In case of string instructions DS and ES are default segment for SI
and DI respectively.
• Example
• MOV AX, [SI]
• MOV CX, [DI]
Here the effective (physical) address is given as DS*10H+[SI] and
DS*10H+[DI] respectively and the data present in these location is
moved to the register AX and CX respectively
dexed Addressing
Instruction
Register SI/DI
Memory location
Offset Address
20 bit Address
DS * 10H + Data
+
Memory location
Offset Address
20 bit Address
DS/ES * 10H + Data
Here, 50H is the displacement. BX is the base register and SI is the index
register. The effective (physical) address is DS*10H+[BX]+[SI]+50H. The
first instruction the data present in the memory location is moved to
the register AX and the second instruction adds content of BP with the
data present in the memory location.
lative Based Indexed Addressing
Instruction
Base Register Index Register 8-bit / 16-bit
(BX/ BP) (SI/DI) displacement
+
Memory location
Offset Address
20 bit Address
DS/ES * 10H + Data
It depend upon
• whether the destination location is within the same
segment or in a different segment
• The method of passing the destination address to the
processor Intersegment Direct
Intersegment
Intersegment Indirect
Addressing Modes For
The Control Transfer
Instruction
Intrasegment Direct
Intrasegment
Intrasegment Indirect
Intrasegment: if the location to which the control is to be transferred
https://www.youtube.com/watch?v=oSYF9riDeyA
Thank you!
26