operating-systems

Definition

Stack Pointer

The Stack Pointer (SP) is a CPU register storing the memory address of the top element of the current stack.

Operations

Push

Decrements the pointer (downward-growing stack) and writes data to memory.

Pop

Reads data from memory and increments the pointer.