MCS-388 Homework 4 (Spring 2002)

Due: April 17, 2002

  1. Do exercise 5.3 on page 336.
  2. Do exercise 8.12 on page 509. To generate concrete code, you need to know the answers to several questions: For all these questions, feel free to either pick some concrete numbers (like the 10x20), state them, and then work using them, or give symbolic names to the quantities (like saying the array is NxM, with K bytes per element) and then give answers that have expressions containing these symbolic names, even when they really would be crunched down to a single constant.
  3. Chapter 7 suggests using a control link in each activation record on the stack, which points at the calling activation record. It also suggests using two pointers: top_sp to point at the current activation record, and top to point to the current top of stack. By contrast, the simplified MIPS calling convention we've been working with just uses a single pointer, $sp, and doesn't save the calling activation record's location into the current activation record. Explain why these simplifications are possible.

Course web site:
Instructor: Max Hailperin <>