Hw5 - CSc 252 Homework 5 Version 1.0 Homework #5 Due:...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework 5 Version 1.0 page 1 of 8 Homework #5 Due: 10:30am Tuesday, November 1st Turnin: One solution: 5 .To receive credit for your solution, you must show your work where applicable. Solutions to the remaining problems are attached. For each question, complete the stack picture. In these pictures, the Caller's stack is represented as a box of unspecified size. This is the Caller's stack just before the startup sequence is executed. The memory below the Caller's stack is represented as a series of boxes, each box representing one word (32 bits, 4 bytes) of stack memory. Fill in the boxes with the names of registers, arguments, return address register, frame pointer, unused, etc. To the side of the drawing show where the Caller's stack pointer, the procedure's stack pointer, etc. are pointing. Here is an example: As a reminder, the startup sequence refers to the code in the caller that comes just before the jal instruction. The prologue is the code at the beginning of a procedure. The epilogue is the code at the end of a procedure. The cleanup sequence refers to the code in the caller just after the jal instruction. Caller’s $fp Caller’s $sp Caller’s stack You would fill-in these rectangles as needed to indicate what values, arguments, or registers go here. Each rectangle represents one word, (32 bits, 4 bytes) of memory space on the stack. Show on this side where
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/28/2012 for the course CSC 252 taught by Professor Moon during the Fall '11 term at University of Arizona- Tucson.

Page1 / 8

Hw5 - CSc 252 Homework 5 Version 1.0 Homework #5 Due:...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online