cs313-2005-t1-midterm1 - CPSC 313, 05w Term 1 Midterm 1...

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

View Full Document Right Arrow Icon
CPSC 313, 05w Term 1— Midterm 1 Date: October 7, 2005; Instructor: Mike Feeley This is a closed book exam; no notes; you may use calculators to perform simple arithmetic calculations. Answer in the space provided; use the backs of pages if needed. There are 7 questions on 4 pages, totaling 50 marks. You have 50 minutes to complete the exam. NAME: STUDENT NUMBER: SCORE: / 50 1. (10 marks) Short answers. 1a. What is the advantage of using two different registers (i.e., %ebp and %esp ) to store virtual addresses to the runtime stack? 1b. What does a call instruction do that a jmp instruction does not? 1c. We discussed two ways to implement a C-language switch statement in assembly language. What are they? Under what conditions would one be favoured over the other (both ways)? 1d. Why is it faster to compute the address of an element of an array of structs if the size of each struct is a power of two? 1e.
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 10/09/2011 for the course CPSC 344 taught by Professor Karen during the Fall '10 term at The University of British Columbia.

Page1 / 4

cs313-2005-t1-midterm1 - CPSC 313, 05w Term 1 Midterm 1...

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