0% found this document useful (0 votes)
16 views17 pages

Addressing Modes in Computer Architecture

Uploaded by

Ritesh Tolani
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views17 pages

Addressing Modes in Computer Architecture

Uploaded by

Ritesh Tolani
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Addressing

Addes Aeld -
Modes

Comtains the inormai neeled do detOrisne


kocati on f e opesanda and tue
Result operion.

Adves Aeld eifes Comp ueh Regialou 46


8toreol,
where
cdataopehand

opejands Choáen deumy tee rgram
execuion is dependest mbde
stcion.

Addreesing mode ! Specifeu how to ìntespret tee


unfomati on wit tls adde {fetd ho to Compute
e He ctive addess of tue data neede.

De fination

The
Jocation
operand in an nstetion called
addreg mclea,
mode apecifies
addus stuchon

pnd qefrenced,
The purpose of
addheuit mole

Give
Veakty by
such hciiha poindea Jo memoTy
fuidiy
Counter t Lerp Control,ndexig data
relocaton
pmogmam
To Reduce tue be
nbe) bita
fetdl tue ishucion,

Tmportart Pointa
Instution Cycle

fetu the Tnstuci on and


menoy
de code Brshutie)
Exe cute tue nauce

2
fnyram Countes (Pc)
PC
kecps toock astuchans
Progran stored n

holds addmess next

unshuton to be executeo,
in cremente eacl time instvchon
ftclhed fom memy.
mode Lnstuchon
Addreeig n [ome. Cormputer tae
Distinct Bivay Co ode
te nstuch'on is sjpe cif'ed
addheig olianct
mode

Binoy ode, just ike


opvabon Code iA specified,

Siugle eimany Code :


Sing le Binany Code Haat dleaign ate bota
mode Ho 'nstucion.

Feciue Address LEA


EA s te acttal aoldres of tue opeand.
ouere it is actually stored.
Types of Modes
Tmplied / nplicit mode No Addres Reld is
Tequired.
Immediate Mode.
3. Divect Mode
Addres specifea memory kocain.
Ihdireet meole
Registes Direct node Adde
[pecihes
Registes Lndieet mode Procesor
7. Auto . ncement/ Ato Regiuks
Dece meut mode

Relahve
ndexed
Addresig mode Addhes fele t on tent

hddresig mode (Thee aoe celled


tb. Base Regites hddresiy mod e. k diplacemewt Add resy)

Tmplid / Tmplieit Mode


operands specifiedl in tue
Qe
imp licitly
de fnation nstuction,
Cemplement Acc um ulator
operand in Ac is implied in tue
definaien ue lnshuchim.
"CL A: Clea Acc umnulato

operand in Ac is implied in the ole fin ahion

te Instuchom,

3. PuSH Stak PusH

L opemand is inp liead to be n top e e stacK.


CTos)
Note
AU Regises Reference instwchons Hhet use accumlator
Qe
cmplied mode instycthiw.

Zeo adolne instuchns


stack Orgawzeel
Gomputer iroplied Mode insvchos siyce tue
operanda tinpied to be

Imnediate Mode
Mode te operand
Specifieof
inshychon itaelf.
An Iome diate mode ins hucion has
than
operanol
tue addes helol.
Operand fld Contain
actual operanol .
: Addres
nstucim,
opcadeopera]
ADD

Note: for in ihakg gles to Conutont


value.

Direct Mode

The Operand esideA in


memony aud ite
Qddess is 9iven
oli're ctly lby He addres
feld
tnstuchon,
Aoldrers nstchon Contais Hee

efecive Addres Cen] (acteal cdres )


opevand .

ie efecthive addhes is egual


to te addey Fielol

ADD A

LOAD

(Mole: also Called Phsolate addreasiny Mode.


meme in
stored
lsadolre Efechve addres
te ohee e gives
shvchon tee Retd addres
mode
Mode Todirect
30H
rand ope
6c04 CA] AC+
m AC
menoy
Addes Opcode
natuchgn
res si2e tie to edGm) i6Space Addrees
advantg: Dis
addrea
chve seet 0ork to
culihi
ms Cal addiimal
Aeference memoy (one) Siyle
dato. eS occ to Simple
Advontge
EA

operand

EA (a) EA = A

Look tre

operanl.
13
ADD (A) ADD A Ace Ac+

beg karg addes space is possible


where n ord kengta.

muliple Cto) menhoy reference


operand,

Slaw,
Register Moade

mode operonds stored in

Regisker. te mesides
( Regis Jey otjn tue coy)

Addregs fld tee ins truchon e fers to


CPU eqis ten that Contains te operand.
EA Ri
K- bit fjetd Can

regisies.
opcode

op eand

Mov RI, R2.

Referren ce. to memo!. required :to Pete


tu operand.

dee to imited mbes e Reguks, Veny smae! addres fed.


NO
numey QCces Vey fas t execuion.
Dis advantay ce
veny Limieo ades spoce
iy muthiple rgialera hetpa perfrnance but
Compl'cates inghuchms.

6 Register Ihirect Mode

The oddvtes sed y instnu chon specifes tue registes


hat Contains the efective address
Te
operand is in
memey.
The Tegis tes Containa te efechive aadhes
operand rsathe) than the opeard
EA =
i) Inutucion
Pcode Registes addrex

fegisten memo

GA Of opesard
ant ospesand ) 2e04 operon
leo
ADD (R)), R2 ||M CRI] mCR] +R2

Advontaye:
inshvcion uses feos ts bi t4
The addess Field e
select a Tegister have ben regwred
to memery oddres directly
cpeciy

Exhy memoy

Auto . Deceent Mode -


Auto . Increment

t Simi lar to Registe Indirect mode.


tue Content
( Efechve Aoldreu y opera na
Tegiuter specifed
except tat

n Auto ncnet Reg ilates s inchemet


after its Value
to aCCess
L
EA = Ri) +

Ly Ih Auto- Decremeut: The regstes s decremet befre


ite value s sed to occ es memoy
-(Ri)
EA
Content instuchem
+ pant Aoldves Pddres tive EHec
egises specife Content
aoldel be. oddreit address
mbdes .Feuo
Addesig Disploceme
nt
(R2) RI,- ADD
Decvement tor
(R2)+ R, ADD
ncrement Auto
evey aften
talble. eo.. to
crement
u de cremet in Jo
data tasle to
hold too valses
Adde
Base value

vegüles tat holad dlsplacemeut/ offset

R
A eqis les tuat holda llsplacemeut offset

| pCode Registes () podre A

Registe
Point to opra o perand

*3 Versignu dia plocemeut ddresg


Relaive (EA PctA)

A xR)
Indexed
|EA :
Ri+ A)
8. Relatve Mode
Ragiktes
Addresing
Prsgram Counteh (Pc)
His mode Prograg
Countes (P)ia added to he cddrea part
the inshuch) bbtain ue effechve odolres
operand.

Efechve Cn tent Pe + Rothres pat


Enstuchn.
Haa opear
aw'ay frorn Curreut locatin
Pojnted to ay Pc.

LoAD

Locahon elaive to "pe" us


Called Retaive Mode.

op co de
meney
opevand
Mode
Indexeol
Addreasin
Regiskn Index

L The Cootent Jndex Raegisler


oschon to ob tain
addes Pant 9 tue
Stechve oenand.

E echve Addes Content XR + Bddre% part g


neuchon,

A+(aa) EA ARi)

Cntains Cns tent


iosmchon.
the name 9 gis hes invojve
helds sdex

Inden megisten here


rgiuks (XR) provide aor thes purpose
Conmeny àt be

General urpose (Ri) in te pro cer,


Centain index Uale.
opo de ndlex kagia len Censtan vale

merno

JPont to jndex
operar

ndex Reqislen holals inalen emeer


to aoldex pant 4
elave
ins huchom.

lo. Base
Registes Atneiny Mode

L Stmila) to indered adrei except Huat


Calle Base

register.
B ase Pgiste,
Regues
Ly The Centent Base Regitken Ju adoled to
the ins trucion to obtain
cdd,ess. pat
echve
tue etechve adJdven pehand,
ettechve Addres Content BK + Addess Pert
inshueton.
EA (Ri) t A
Base egices Hat helels Base cdohes.

Relabve to tu
a displa cemeut
Base addess

loAD (R)

RI, 20 (R2) RI -

olls pla cement


op code menT9

pegistrs
Pont to base opand.

You might also like