Due: Friday, November 10, 2017, 9:00 am (start of the class)

Functions and Instruction Set Design

  1. Describe two methods of passing information to a function and answer the following questions:
    1. Which method do you need to use to support recursion.
    2. Which method is faster?
  2. When handling an interrupt, you have to store not only the PC and condition register, but also any other state information about the CPU. When calling a function, you only have to store the PC. Why?
  3. Why do labels make it easier to write code using assembly compared to machine instructions?
  4. Do you have to have a frame pointer in order to access local variables, parameters, and the return value from within a function?

© 2017 Ying Li. Page last modified: .