microZEUS
The whole stack, hand-drawn.

◄ Wiki / OS

stack pointer

A CPU register that always points to the top of the current call stack in memory.

Programs use a 'stack' region of memory to hold function call frames — local variables and return addresses — and the stack pointer register tracks where its top currently is. As functions are called and return, the pointer moves down and up. When a program crashes, capturing the stack pointer alongside the program counter helps reconstruct what the code was doing at the moment of failure.

See also

  • program counter (PC)The CPU register that holds the address of the instruction currently being executed.
  • syscallThe controlled doorway a program uses to ask the operating system kernel to do something for it.

Referenced by

SVC · syscall · TLB