Homework #5

Download the following program: bizarre.asm

Run the program in spim - When the stack is at it's largest, draw a diagram of the entire stack.
(Look at the program and think about how it recurses. Identify an instruction that will be executed when the program STOPs recursing and put a breakpoint on it)

Draw the stack and carefully label all stack frames at this point.(be sure to only draw the portion of the stack that's been added by the "recurses" subroutine):

  1. Indicate Each FRAME and indicate the name and arguments for the instance of the function call that created the frame.
  2. Draw a diagram of the stack with the frames and their contents. Indicate any addresses that are in the frame as their symbols in the program rather than as addresses.
  3. Also draw a rough diagram of data memory and the labels/data stored
  4. For each item that represents a "pointer" draw an arrow to what it points to