retagged by
2,460 views
3 votes
3 votes

q4

retagged by

3 Answers

Best answer
3 votes
3 votes

" We have defined the Index mode by using general-purpose processor registers. Some computers have a version of this mode in which the program counter, PC, is used instead of a general-purpose register. Then, X(PC) can be used to address a memory location that is X bytes away from the location presently pointed to by the program counter. Since the addressed location is identified relative to the program counter, which always identifies the current execution point in a program, the name Relative mode is associated with this typeof addressing.
Relative mode—The effective address is determined by the Index mode using the program
counter in place of the general-purpose register Ri.
"

-[Computeranization And Embedded Systems, Hamacher, Vranesic, Zaky, Manjikian, 6Ed, Mgh, 2012]

selected by
1 votes
1 votes

In The case of relative addressing mode PC is used to hold next memory instruction for execution.

For Example ::

Suppose branch instruction I1 is 3Byte

BR:: 2000
I1      2004
I2      2008
I3       2012
 
 2020

 PC will contain=2016

then Effective Address= PC + (move up or down)

0 votes
0 votes
Relative addressing mode is required where only offset is to be added with PC content.

Related questions

0 votes
0 votes
2 answers
3
lea asked Jun 12, 2023
318 views