The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+22 votes

Which of the following addressing modes are suitable for program relocation at run time?

  1. Absolute addressing

  2. Based addressing

  3. Relative addressing

  4. Indirect addressing

  1. I and IV
  2. I and II
  3. II and III
  4. I, II and IV
asked in CO & Architecture by Veteran (52k points)
retagged by | 2.2k views
Relative addressing and based addressing are suitable. Is there any problem for indirect addressing?
Not preferable due to extra memory reference.

Indirect addressing means that the address of the data is held in an intermediate location so that the address is first 'looked up' and then used to locate the data itself

Refer this


Base addressing: The operand’s offset is sum of an 8 bit or 16 bit displacement and the contents of the base register BX or BP.BX is used as a base register for data segment ,and BP is used as a base register for stack segment.

Example:MOV AL,[BX+05]

Relative addressing:

   |jump|           offset             |    jump relative

   (Effective PC address = next instruction address + offset, offset may be negative)

The effective address for a PC-relative instruction address is the offset parameter added to the address of the next instruction. This offset is usually signed to allow reference to code both before and after the instruction.

Refer this :

2 Answers

+25 votes
Best answer

Answer: (C)

A displacement type addressing should be preferred. So, (I) is not the answer.

Indirect Addressing leads to extra memory reference which is not preferable at run time. So, (IV) is not the answer.

answered by Boss (33.8k points)
edited by
Also, how can we use indirect addressing for program relocation? It would be really complicated rt?
What about indexed addressing ?

Will it be suitable at runtime ?
In case of indexed addressing, we take the support of index register which is used to store the index of the array, this addressing is basically used for accessing arrays
+9 votes
It should be a displacement type of addressing mode so option c.
answered by Active (3.3k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,536 questions
54,113 answers
71,026 users