Stack
The stack is a common data structure found in the execution image of any program.
Execution image is the memory block used by a program and its registers. It consists of the data (contains initialized constant and static variables ), Text section (instructions of the program) and .bss section (uninitialized constant and static variables).
In assembly to execute a function the execution image of the current program is saved, then the new function’s execution image is initialized and execution starts.
Types of stack
- full descending
- ascending stack.
This is the most confusing bit and causes a lot of confusion.
Get Eric’s stories in your inbox
Join Medium for free to get updates from this writer.
Full descending stack
This is is the most common stack. The stack is defined by the stack pointer(SP) register and base pointer (which can be referred to as frame pointer in ARM instruction set).
SP defines the start of the stack and is a higher address in the memory space. While bp is a lower address.
Bp is the base of the stack .
In 8086
In ARM
stmfd is used to save the execution image in a full descending stack and l dmfd pops the execution image.




