Step Into x64 Assembly · Lesson 6 · Memory & the Stack
The Stack
push and pop, callee-saved registers, local variables, alignment and recursion.
- ~40 minreading and coding
- 4missions
- membersaccess
- x64 Assemblylanguage
Part of Step Into x64 Assembly. The full lesson, its missions and the real compiler and debugger are in the course. Try a free lesson first to see how it works.
The stack is a region of memory that rsp points into. It grows towards lower addresses:
In this lesson
- A stack that grows down
- Who saves which register
- Local variables
- Alignment
- Shadow space
Missions
- Swap through the stack
- Preserve rbx
- Locals on the stack
- Recursion