A certain processor supports only immediate and direct addressing modes. Which…

1999

A certain processor supports only immediate and direct addressing modes. Which of the following programming language features cannot be implemented on this processor?

a) Pointers
b) Arrays
c) Records
d) Recursive procedures with local variables

Answer: D. a, b, c and dThe correct answer is: a, b, c and d. With only immediate and direct addressing: - Immediate addressing can use only constants embedded in instructions. -…

  1. A.

    Only a

  2. B.

    a and b

  3. C.

    c and d

  4. D.

    a, b, c and d

Attempted by 297 students.

Show answer & explanation

Correct answer: D

The correct answer is: a, b, c and d.

With only immediate and direct addressing:
- Immediate addressing can use only constants embedded in instructions.
- Direct addressing can access only fixed memory addresses written in the instruction.

The listed programming-language features need more flexible address computation:
- Pointers need indirect addressing, because the address to access is stored in a variable.
- Arrays need indexed or base-plus-index addressing for A[i].
- Records need base-plus-displacement addressing to access fields relative to a record base.
- Recursive procedures with local variables need stack/frame-relative addressing, because each recursive call has a separate activation record.

Since none of these addressing forms is available, all four features cannot be implemented in the normal way on this processor.

Explore the full course: Isro

Loading lesson…