MP Assembly Language5
MP Assembly Language5
Lecture No(5)
Addressing Mode
• Addressing mode mean way in which an
operands is specified in Memory Location
• There are 7 type of addressing mode can be
Calculate by Assembly language to Reach
memory location
Register Addressing Mode
• Register Addressing or Direct Addressing
(Stored In Register Directly)
Ex : Mov ax,bx
Immediate Addressing Mode
• Immediate operands represent constant value
Mov al,12h
Mov ax,1234h
Note : Don’t forget Same Size
Direct Addressing Mode
• The Location for source is EA(Effective memory Address)
• Don’t forget EA is 16 bit offset of storage specified by current
value in DS
Ex: Mov cl,[2000h]
If Ds =1000h
value of source operand not stored in 2000h but In
PA = DS*10H+ offset
=1000h*10h+2000h
= 12000h
Means the value of cl is stored in [12000h] memory location
Indirect Addressing Mode
• Same to Direct Addressing but EA deal with BX,BP OR SI,DI
Ex: Mov AX,[Bx] --->Note: location of Bx not Bx
If Ds =1000h ,Bx=1234h
PA = DS*10H+ offset
=1000h*10h+1234h
= 11234h
Means the value of
Al -------->[11234h]
Ah ------[11235h]
Ex-2-: Mov AX,[SI] --->Note location of SI not SI
If Ds =1000h
PA = DS*10H+ offset OF SI