AQA 7517 4.1.1.15: Role of stack frames in subroutine calls
The free BugBot lessons that teach this point, a robot to try it on, and the past-paper questions that test it.
Lessons that teach it
- A2.1 Stack frames and the call stack Recursion and computational thinking
Return addresses, parameters and local variables: what a subroutine call pushes, and what a return pops. - A2.3 Recursion versus iteration Recursion and computational thinking
The same algorithm both ways, the cost of a frame per call, repeated work, and stack overflow. - A2.10 Project: out of the dead end Recursion and computational thinking
Model a maze, solve it by recursive backtracking, and drive the robot out along the route.
Try it on a robot
The task from A2.1 Stack frames and the call stack, running here. Change the program and press Run.
The specification is AQA's own document; this page says which of our lessons teach point 4.1.1.15 and is not endorsed by the board.