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

Addressing modes in 8086:

Every instruction in a program has to operate on data. The process of specifying the data to be operated on by the
instruction is called addressing. The various formats of specifying operands are called addressing modes. They are
1. Immediate addressing mode
2. Direct Addressing mode
3. Register addressing mode
4. Register Indirect addressing mode
5. Base addressing mode.
6. Base relative addressing mode
7. Indexed addressing mode
8. Indexed relative addressing mode
9. Base plus index addressing mode
10. Base relative plus index addressing mode
Immediate addressing mode:
In this mode, the data is specified directly in the instruction that is data as a part of the instruction.
Example: MOV AX,1234H
Direct Addressing mode:
In this type of addressing mode, a 16-bit offset address is directly specified in the instruction as a part of it.
Example: MOV AX, [1000H]
Register addressing mode:
In this type of addressing mode, the data is stored in the register and name of the register is specified in the instruction.
It can be an 8-bit or a 16-bit register.
Example: MOV AX, BX
Register Indirect addressing mode:
The offset address of the memory location which contains operand is stored in the register and it is specified in the
instruction.
Example: MOV AX, [BX]
Base addressing mode:
In this mode, the offset address of the data or operand is stored in BX or BP register. When BX register is present in the
instruction, data is taken from the data segment and if BP is present in the instruction, data is taken from the stack
segment.
Examples: MOV AX, [BX] : Memory address=DS X 10H+ [BX]
MOV AX, [BP] ; Memory address=SS X 10H+ [BP]
Base relative addressing mode:
In this mode, the effective address is formed by adding the content of the BX/BP with an 8-bit or 16-bit displacement.
Example: MOV AX, 50H [BX] ; Memory address=DS X 10H + [BX] + 50H
Indexed addressing mode:
In this addressing mode, offset address of the operand is stored in SI or DI registers. DS is the default segment for index
register SI and DI.
Example: MOV AX, [SI]; Memory address=DS X 10H+ [SI]
MOV BX, [DI]; Memory address=DS X 10H+ [DI]
Indexed relative addressing mode:
In this mode, the effective address is formed by adding the content of the SI/DI with an 8-bit or 16-bit displacement.
Example: MOV AX, 50H [SI] ; Memory address=DS X 10H + [SI] + 50H
Base plus index addressing mode:
In this mode the effective address is formed by adding content of a base register (any one of BX or BP) to the content
of an index register (SI or DI). Default segment register DS.
Example: MOV AX, [BX] [SI]; Memory address = DS X 10H + [BX] + [SI]
Base relative plus index addressing mode:
In the effective address is formed by adding an 8 or 16-bit displacement with sum of contents of any one of the base
registers (BX or BP) and any one of the index registers.
Example: MOV AX,50H[BX][SI]; Memory address = DS X 10H + [BX] + [SI] + 50H

Physical Address Generation:

The physical address of a memory location consists of 20 bits in 8086. The BIU has a dedicated adder for determining
the physical address. It is calculated by using two 16 bit addresses. They are
1. Segment address/Base address
2. Offset Address
- The content of segment register (segment address) is shifted left bit-wise for four times.
- The content of an offset register (offset address) is added to the result of the previous shift operation.
- These two operations together produce a 20-bit physical address.

You might also like