Skip to content
Official PYQ · 1996

GATE CS 1996 Q1.16 — Machine Instructions and Addressing Modes

Explain with AI

Relative mode of addressing is most relevant to writing:

Choose one option
View worked solution

Answer: B

The correct option is B.

Explanation:

In relative addressing mode (specifically Program Counter relative addressing), the effective address of an operand or target instruction is computed as:

Effective Address (EA)=PC+Offset\text{Effective Address (EA)} = \text{PC} + \text{Offset}

Because all memory references are specified as offsets relative to the current instruction pointer (PC) rather than absolute physical addresses, the entire block of code can be loaded and executed at any arbitrary location in memory without requiring any modification or address translation by a loader. This characteristic is the defining feature of Position-Independent Code (PIC).

Analysis of other options:

  • Co-routines (A): These are non-preemptive subroutines that support multiple entry points and suspend/resume states. They rely on stack pointer manipulation and state-saving mechanisms rather than relative addressing.
  • Shareable code (C): Also known as reentrant code, this requires a strict separation of code (read-only) and data (writable). While shareable code often benefits from being position-independent, relative addressing is not its primary defining requirement.
  • Interrupt Handlers (D): These routines are typically mapped to fixed memory locations specified in an Interrupt Vector Table (IVT), which generally uses absolute or indirect addressing.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Machine Instructions and Addressing Modes questions