GATE / CS ARCHIVE

GATE CSE 1999 / QUESTION 2.23

Addressing modes versus implementability

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

GATE 1999, Q2.23 2 marks · MSQ
Report issue

Instructions & Addressing Modes

Question 2.23, GATE 1999: With only immediate and direct addressing, which cannot be implemented: pointers,arrays,records,recursive procedures with locals?
Tap to enlarge
Select all that apply
Answer & solution

Answer: No unconditional impossibility; A,B,D under a restricted direct-code model (no official key was published)

A direct instruction names a fixed address; it cannot in one ordinary memory operation follow a runtime pointer or index. Records with fixed field offsets can use fixed addresses, while pointers, variable array indices and runtime stack frames naturally need computed-address access. This motivates A,B,D only under a model excluding software emulation and code modification. Literally, however, a finite address space permits a dispatch chain: compare the desired address with each legal address and execute the matching direct load/store. Such an interpreter can implement all these features, albeit inefficiently; self-modifying code supplies another possible route if allowed. Therefore the given addressing-mode restriction alone does not prove impossibility, and no unsupported official choice is assigned.

Original paper, page 5