Module 16 Study Guide
Learning Objectives
- Define standard terminology describing the subprogram call and return process, including activation, activation record, subprogram linkage, environment pointer (EP), stack pointer (SP), epilogue, prologue, run-time stack, static link, static chain, dynamic link, dynamic chain, etc.
- Explain how subprogram activations work by illustrating the contents of memory during execution, including the items mentioned below
- Explain how a return address is stored and used after a call to return control to a caller
- Explain how a dynamic link is determined, stored, and restored after a call
- Explain how a static link is determined, stored, and restored after a call
- Explain how parameters are computed and stored in an activation record
- Explain how local variables are allocated in an activation record
- Explain what must be done by the caller and what must be done by the callee to realize program linkage
- Explain how space for nested blocks is allocated
- Explain how dynamic scope is implemented in terms of deep and shallow
Resources
- CPL 10
- Slides: Lam
Lab
Please complete the lab for this week: activation
Deliverables
The test for this module will take place in class on Friday. You will have an opportunity to re-take a different version of the same test next week. If you choose to do the re-take, your grade for this module will be the higher of the two scores.