Addressing Modes of 8086

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Addressing Modes

of
8086 Microprocessor

D Murali Krishna
Department of ECE, SVECW.
Addressing Modes:
• The way of specifying the operands is called
Addressing Modes
• There are 12 addressing modes
Contd.,
1. Immediate Addressing Mode:
• Operand is specified in the instruction
followed by Mnemonic
Eg: MOV AX,0005H
Contd.,
2. Register Addressing Mode:
• The operand is stored in register
• That register is specified in the instruction
Eg: MOV BX, AX
• Note: Except ‘IP’ all registers can used in this mode
Contd.,
3. Direct Addressing Mode:
• Operand is stored in a memory location
• The offset address of that memory locations
is specified in the instruction
Eg: MOV AX,[5000]
• Offset address 5000 and content of DSR is
used to calculate 20-bit physical address of
DS memory
– 10H*DS + 5000H
Contd.,
4. Register Indirect Addressing Mode:
• The operand is stored in a memory locations
• The address of memory location stroed in a
register
• That register is specified in the instruction
Eg: MOV AX, [BX]
Note:
– In this, offset address of data is either in BX or SI or DI
register
– The default segment is either ‘DS’ or ‘ES’.
Contd.,
5. Indexed Addressing Mode:
• Offset of operand is stored in one of the
Indexed registers
• That Index Register is specified in the
instruction
Eg: MOV AX, [SI]

10H*DS + [SI]
Note:
– DS is default memory for SI and DI
– In string operations DS is for SI and ES for DI
Contd.,
6. Register Relative Addressing Mode:
• Operand is stored in one of the memory
location
• The effective address of that memory
location is formed by 8/16-bit displacement
with the content of BX, BP, SI and DI
Eg: MOV AX, 50H[BX]

10H*DS + 50H + [BX]


Note:
– Default segment is DS or ES
Contd.,
7. Based Index Addressing Mode:
• Operand is stored in one of the memory location
• The effective address of that memory location is
formed by adding content of base register (BX or
BP) to the content of Index Register (SI or DI)
Eg: MOV AX, [BX] [SI]

10H*DS + [BX] + [SI]


Note:
– Default segment is DS or ES
Contd.,
8. Relative Based Index Addressing Mode:
• Operand is stored in one of the memory location
• The effective address of that memory location is
formed by adding 8/16-bit displacement with
contents of base register (BX or BP) and the
content of Index Register (SI or DI)
Eg: MOV AX, 50H [BX] [SI]

10H*DS + [BX] + [SI] + 50H


Note:
– Default segment is DS or ES
Contd.,
9. Implicit Addressing Mode:
• Operand is stored in one

• Eg: 1. MUL BX
2. DAA
Contd.,
10.Intrasegment Direct Addressing Mode:
• In this the control is to be transferred lies in
the same segment
• The address of the instruction to which
control has to transfer is specified as a label
(name) in the current instruction

Eg: JMP NEXT


Contd.,
11.Intrasegment Indirect Addressing Mode:
• In this the control is to be transferred lies in
the same segment
• The address of the instruction to which
control has to transfer is specified in a
indirect way by using register

Eg: JMP [BX]


Contd.,
12.Intersegment Direct Addressing Mode:
• In this the control is to be transferred lies in a
different segment
• This addressing mode provides a means of
branching from one code segment to another
code segment.
• Here, the CS and IP of the destination address
are specified directly in the instruction.
Eg: JMP 5000H:2000H
– Jump to address 2000H in segment
5000H
Contd.,
13. Intersegment Indirect Addressing Mode:
• In this the control is to be transferred lies in a
different segment
• It is passed to the instruction indirectly, i.e. contents
of a memory block containing four bytes, i.e.
IP(LSByte), IP(MSByte), CS(LSByte) and CS(MSByte)
sequentially.
• The starting address of the memory block may be
referred using any of the addressing modes, except
immediate mode.
Eg: JMP [2000H]
• Jump to an address in the other segment specified at
offset address 2000H in DS. Here, the ‘CS’ and ‘IP’ of
the destination address are specified directly in the
instruction.

You might also like