This section describes how most OS/2 programs use the stack.
Understanding the stack is generally straightforward. The stack is defined by the descriptor selected by the Stack Selector register or SS, and the stack pointer or SP. Stacks are always read/write. There are two basic operations on a stack, PUSH and POP. PUSH decrements the stack pointer and then stores the operand at the offset provided by SP in the stack segment. POP moves the data item at the offset provided by SP to the operand and then increments SP. SP ALWAYS POINTS TO THE LAST ITEM PUSHED. Stacks grow downward from higher addresses to lower addresses.