edited by
1,990 views
7 votes
7 votes

Addressing Mode.        

 Instruction

Meaning

Description

$1.$Register Addressing Mode

(or)

Register Direct AM

$\text{Add}   R_{1},R_{2}$ $R_{1}\leftarrow R_{1}+R_{2}$ Two General Purpose Register value is added. Operands stored in GPRs
$2.$Immediate Addressing Mode $\text{Add}   R_{1},$#$4$ $R_{1}\leftarrow R_{1}+4$ Register value is added with a constant term (operands are in instruction , no need of GPRs). Here we use Instruction Register(IR)
$3.$Displacement Addressing Mode $\text{Add }R_{4},100(R_{1})$ $R_{4}\leftarrow R_{4}+M[100+R_{1}]$ Register value is added by the memory location pointed by another register with 100 as displacement(This is alternatively a Indexed Addressing Mode)
$4.$Indexed $\text{Add} R_{3},(B,I)$

$i)R_{3}\leftarrow R_{3}+M[B+I]$

 

$ii)\text{Add} 20(R_{1}),R_{2}$

$R_{1}\leftarrow 1000$

 

 

$iii)\text{Add} 1000(R_{1}),R_{2}$

$R_{1}\leftarrow 20$

Register value is added to memory address from base address of array  with some displacement(which work like pointer) for specific index location.It can be use a set of GPR's or called Index Registers. Also it can be done with more than one registers, called Base Registers. like$(R_{I},R_{j})$ where Second register contains offset value of X(Refer Hamacher)
$5.$Direct or Absolute $\text{Add} R_{1},(R_{2})$ $R_{1}\leftarrow R_{1}+M[R_{2}]$ Register value is added with some memory location to get effective address
$6.$Indirect AM (or) Register Indirect AM $\text{Add} R_{1},$@$(R_{3})$ $R_{1}\leftarrow R_{1}+M[M[R_{3}]]$ Register value is added with memory location, which is address of memory location of the operand
$7.$ Base Register Addressing Add BaseReg,Off   In this addressing mode Base register value added with offset value
$8.$ Implied Addressing $\text{Add} R_{1}, AC$ $R_{1}\leftarrow R_{1}+AC$ Accumulator value is added with register value to get effective address
$9.$Relative Addressing Mode PC,offset   Effective Address is calculated by adding Counter value with offset value,Here PC used as a Special Purpose Registers instead of General Purpose Registers
$10.$Auto Increment Addressing $\text{Add} R_{1},(R_{2})+$ $R_{1} \leftarrow R_{1} +M[R2]$
$R_{2} \leftarrow R_{2} + d$
 
$11.$Auto Decreasing Addressing Mode $\text{Add} R1,-(R2)$ $R_{2} \leftarrow R_{2}-d$ 
$R_{1} \leftarrow R_{1} + M[R2]$
 
       
       

 

I have tried to collect all addressing mode and how these mode works? Is my explanation correct for every addressing mode.Is any other addressing mode exists , which am I missing? Plz check

https://www.slideshare.net/aliasgharmanjotho11/addressing-modes-37108170

http://web.cs.iastate.edu/~prabhu/Tutorial/PIPELINE/addressMode.html

 

edited by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
4
twin_123 asked Dec 12, 2018
608 views
Solution please