Memory Segment - Stack Segment (SS)

Cpu Memory Management Segmented Model

About

The Stack Segment is a segment that holds a stack.

It's a stack implementation of memory locations.

As the stack is a segment, it is a contiguous array of memory locations.

Management

Addressing

When using:

Operations (PUSH|POP)

Items are:

When an item is:

  • pushed onto the stack, the processor decrements the ESP register, then writes the item at the new top of stack.
  • popped off the stack, the processor reads the item from the top of stack, then increments the ESP register.

In this manner, the stack:

  • grows down in memory (towards lesser addresses) when items are pushed on the stack
  • and shrinks up (towards greater addresses) when the items are popped from the stack.

Size

A stack can be up to 4 GBytes long, the maximum size of a segment.

Pointer

Top

The ESP Stack pointer register points to the top of the stack segment.

Base

The EBP Base Pointer general purpose register points to the base of the stack segment

Documentation / Reference





Discover More
General Purpose Register 16 32 Bit
CPU Register - General Purpose Register (GPR)

The General purpose registers are available for storing: operands (input and output) and pointers Register Name Use EAX Accumulator Accumulator for operands and results data, Used in...
Card Puncher Data Processing
Call Stack - Run-time Stack

The primary purpose of a call stack is to store the return addresses of each active function (subroutine). When a function (subroutine) is called, the location (address) of the instruction at which the...
Cpu Memory Management Segmented Model
Memory - Segment

A memory segment is the division structure of the segmented memory model. The physical address spec (physical memory) of the primary memory is divide by segment. See virtual memoryvirtual segment ...
Segment Register Init Flat Memory Model
Memory Segment - Segment Register

The segment registers (CS, DS, SS, ES, FS, and GS) hold 16-bit segment selectors To access a particular segment in memory, the segment selector for that segment must be present in the appropriate segment...
Application Kernel Assembler Firmware Hardware
OS - Kernel

In computing, the Kernel is the central component of most computer operating systems; it is a bridge between: the applications and the actual data processing done at the hardware level. The kernel...
Process States
Process - Stack

in process
Card Puncher Data Processing
Program Data Type - Stack

for the CPU. Also called the procedure stack. A stack is stored in a stack segment (SS) A program or operating system/executive can set up many stacks. For example, in multitasking systems,...
Cpu Moore Law Transistor
Stack Pointer Register (ESP)

The stack pointer register is holds in the ESP general purpose register As a general rule should not be used for another purpose.



Share this page:
Follow us:
Task Runner