Episode 10: Functions and the Stack

Coming soonEpisode 10 is on its way to @AITeacher-pro
Copying the same code everywhere wastes memory. We give the CPU a way to call a function and come back, then nest calls inside calls with a stack and a stack pointer.
You will learn
- Why copying code wastes memory
- How a return address lets a function come back
- What a stack is and how the stack pointer tracks it
- How CALL and RET work step by step
🎮 Built the CPU yet?
This episode goes past the 8-bit computer you can build in the free Build a CPU game. If you have not played it yet, start at Chapter 1.
Play Build a CPU