You are on page 1of 12

Addressing Mode

First Lesson

31/31/3

Addressing Mode
Addressing type:1- Register Operand Addressing Mode. 2- Immediate Operand Addressing Mode. 3- Memory Operand Addressing.

3/13/13

Register Operand Addressing Mode

Before Executi on

After Executio n

Address Instruction

Memory content

01000 MOV AX , BX 01001 01002 next ins.

8B C3 XX

3/13/13

Immediate Operand Addressing Mode

Before Executi on

After Executio n

Address Instruction

Memory content

01000 AX , 15h 01001 ins. 01002

B0 15 XX

MOV

next

3/13/13

Memory Operand Addressing

Direct Addressing mode. Register indirect addressing mode. Base Addressing mode. Indexed Addressing mode. Base Indexed Addressing mode .

3/13/13

Direct Addressing Mode PA= Segment(CS,DS,SS,ES) : Direct address

Before Executi on

After Executio n

Address Instruction 01000 [1234H] 01001 01002 01003 ins. 01004 . . 02000 .

Memory 8B 0E 34 12 xx next MOV CX ,

xx

3/13/13

Register indirect addressing mode


PA= Segment(CS,DS,SS,ES) : InDirect address(BX,BP,SI,DI)

EX: MOV AX , [SI] SI=1234 ,DS=0200 PH=DS:SI =2000+1234 = 03234

3/13/13

Base Addressing mode.

PA= Segment(CS,DS,SS,ES) : Base MOV [BX] (BX,BP) +(displacement) +1234H,AL BX=1000 ,DS= 0200 PH=DS:BX+ Displacement PH= 2000+1000+1234 = 4234
3/13/13

Indexed Addressing Mode


PA= Segment(CS,DS,SS,ES) : Index ( SI , DI) + Displacement EX: MOV AL , [SI] + 1234H SI=2000 ,DS=0200 PH=2000 +2000+1234= 5234

3/13/13

Base Indexed Addressing mode


PH= Segment(CS,DS,SS,ES) : Base (BX,BP) +Index ( SI , DI) + Displacement

EX: MOV AH,[BX][SI]+1234H DS=0200 BX=1000 SI=2000 PH=2000 + 1000 + 2000 + 1234 =6234

3/13/13

REVIEW PROBLEMS
Identify the addressing modes used for source and the destination operand in the CS=0A00 DS=0B00 instruction that SI=0100 follow, BX 0300 DI=0200 and =compute the physical address . A - MOV AL , BL

B - MOV AX,0FFH C - MOV [DI] , AX D - MOV DI,[SI] E - MOV [BX] + 0400H , CX


3/13/13

Answers
A - source: register Destination :register B - source: Immediate Destination :register C- source: register Destination : index PH=DS:DI = B200 D- source: index PH=DS:SI= B100 3/13/13

You might also like