Stack pointers are used to implement a processor stack in memory. In many processors, address registers can be used as generic data stack pointers and queue pointers. A specific stack pointer or address register may be hardwired for certain instructions. The most common use is to store return addresses, processor state information, and temporary variables for subroutines.
- IBM 360/370: any of the 16 general purpose registers may be used as a stack pointer
- Intel 8086/80286: dedicated stack pointer (SP) combined with stack segment pointer (SS) to create address of stack
- Intel 80386: dedicated stack pointer (ESP) combined with stack segment pointer (SS) and the stack-frame base pointer (EBP) to create address of stack
- Motorola 680x0, 68300: dedicated user stack pointer (USP, A7) and system stack pointer (SSP, A7) for implicit stack pointer operations, as well as allowing any of the 8 address registers to be as explicit stack pointers
0 Comments