You are on page 1of 10

Addressing Modes- 8

1.Immediate Addressing Mode


2.Direct Addressing Mode
3.Register Addressing Mode
4.Register Indirect Addressing Mode
5.Indexed addressing modes
6 Register relative addressing mode
7 Base Indexed addressing mode
8.Relative base indexed addressing mode
Immediate Addressing Mode

Data is a part of Instruction and appear in the form of successive byte or bytes
after the opcode byte
Data may be 8 bit or 16 bit
Immediate data can be accessed quickly as it is available in the IQ.
Examples :
MOV AL,26H
MOV BX,1234H D15 to D0 D15-- D8 ,D7 to D0
Direct Addressing Mode

16 Bit memory address (offset) is directly specified in the instruction


Physical address is obtained by adding offset to segment register
contents
Example
1. MOV AL,[3000H]
2. MOV AX,[3000H]
It will use DS as data segment register.
MOV AX,ES:[3000H]
Register Addressing Mode

Data is available in registers


All registers are used except segment registers and IP
Registers may be 8 bit or 16 bit
Instructions of this mode are compact and execution is faster
Examples:
1. MOV AX,CX
2. MOV AL,CL
Register Indirect Addressing Mode

Address of the memory location which contains data or operand


is available in indirect way in offset registers BX,SI,DI register
Default segment register used DS or ES
If BP is used then SS is the segment register
Examples: AL =20H
1. MOV AX,[BX]
2. MOV [SI],AL SI--- 3000H+ 20000 =23000H
3.
Indexed Addressing Mode
Address of the operand is indirectly specified in index registers SI
and DI
Segment registers used are DS and ES
Example:
1.MOV BL,[SI]
2.ADD AX,[DI]
Register Relative addressing Mode
Effective address of the data is obtained by adding 8bit or 16bit
displacement with the contents of any of the registers
BX,BP,SI,DI
Default segment registers used are DS and ES
Examples:
1. MOV AX,50[BX] BX ==2000H +50 = 2050H + DS =PA
2. ADD AX,5000[BP] BP = 4000H +5000 = 9000H +DS =PA
DS = 20000+9000 = 29000H --- 13H --AL
Based Indexed Addressing Mode

Effective address is obtained by adding the content of base


register BX,or BP
To the contents of Index register SI or DI
Default segment registers used are DS or ES
Example:
1. MOV AX,[BX][SI]
2. ADD AL,[BX][DI]
Relative Based Indexed Addressing Mode

Effective address is obtained by adding 8bit or 16 bit


displacement with the contents of base register BX,or BP
To the contents of Index register SI or DI
Default segment registers used are DS or ES
Example:
1. MOV AX,60H[BX][SI]
2. ADD AL,6000H[BX][DI]

You might also like