Question discussion

What happens to the stack pointer (SP) when the CALL instruction is executed?

359079Medium DSSSB TGT Computer Science 0 replies 0 views
0
What happens to the stack pointer (SP) when the CALL instruction is executed?
  • AIt remains unchanged.
  • BIt points to the next instruction in the subroutine.
  • CIt increases by 2 (or 4 in 32-bit systems)
  • DIt decreases by 2 (or 4 in 32-bit systems)
Correct answer: D

Explanation

CALL pushes the return address on the stack, so the stack pointer decreases by 2 (16-bit) or 4 (32-bit) bytes.

Discussion 0

Nobody has replied yet. Start the discussion!