Difficulty: Easy
Correct Answer: index mode
Explanation:
Introduction / Context:
Instruction sets provide multiple addressing modes to balance code density, speed, and flexibility. Understanding how an effective address (EA) is computed helps in both assembly programming and compiler back-end design. This question targets the classic pattern “EA = register + constant.”
Given Data / Assumptions:
Concept / Approach:
Index (or base+displacement) addressing computes EA by adding a register value to an immediate displacement. Assemblers often notate this as D(R) or [R + D]. This contrasts with immediate mode (operand is in the instruction itself), absolute mode (EA is a fixed address), and indirect mode (instruction points to a memory cell that holds the EA).
Step-by-Step Solution:
1) Identify form: EA must equal register value plus a constant displacement.2) Recognize this as the hallmark of index/base+displacement addressing.3) Exclude other modes: immediate (no memory EA), absolute (no register addition), indirect (adds a memory fetch level instead).4) Conclude the mode is index mode.
Verification / Alternative check:
Architectures like x86 (disp + base + index*scale) and IBM/370 (D(B)) show EA construction explicitly using register contents plus displacement, validating the answer.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing base+displacement with indirect addressing; the former computes an EA arithmetically, the latter dereferences a memory location to obtain the EA.
Final Answer:
index mode.
Discussion & Comments