Assume that EA = (X)+ is the effective address equal to the contents of…

GATE · 2008 · IT

Assume that EA = (X)+ is the effective address equal to the contents of location X, with X incremented by one word length after the effective address is calculated; EA = −(X) is the effective address equal to the contents of location X, with X decremented by one word length before the effective address is calculated; EA = (X)− is the effective address equal to the contents of location X, with X decremented by one word length after the effective address is calculated. The format of the instruction is (opcode, source, destination), which means (destination ← source op destination). Using X as a stack pointer, which of the following instructions can pop the top two elements from the stack, perform the addition operation and push the result back to the stack.

  1. A.

    ADD (X)−, (X)

  2. B.

    ADD (X), (X)−

  3. C.

    ADD −(X), (X)+

  4. D.

    ADD −(X), (X)

Attempted by 163 students.

Sign up free to check your answer

Sign up free

Explore the full course: Zero To Hero

Loading lesson…