GATE / CS ARCHIVE

GATE CSE 2001 / QUESTION 2.9

Matching addressing modes to uses

Computer Organization & Architecture · Instructions & Addressing Modes · Full GATE CSE 2001 paper

GATE 2001, Q2.9 2 marks · MCQ
Report issue

Instructions & Addressing Modes

Question 2.9, GATE 2001: Match indirect, indexed, and base-register addressing to passing an array as a parameter, implementing an array, and relocatable code. Option A pairs indirect with parameter passing, indexed with arrays, and base-register with relocation; the other choices permute these assignments.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

Step 1: Passing an array by address gives a pointer to its elements; indirect addressing accesses memory through that pointer, matching X with III.

Step 2: Indexed addressing combines an array base with an index/offset, matching Y with I. Base-register addressing expresses locations relative to a relocatable base; changing that base allows the same relative offsets to address relocated code/data, matching Z with II.

Together the matches are(X,III),(Y,I),(Z,II), A.

Original paper, page 5