Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / University of California, Irvine ICS 141 Chapter 9 - Subroutines and Control Abstraction 1)What is a subroutine calling sequence? What does it do? What is meant by the subroutine prologue and epilogue? How do calling sequences typically differ in older (CISC) and newer (RISC) instruction sets? 3

University of California, Irvine ICS 141 Chapter 9 - Subroutines and Control Abstraction 1)What is a subroutine calling sequence? What does it do? What is meant by the subroutine prologue and epilogue? How do calling sequences typically differ in older (CISC) and newer (RISC) instruction sets? 3

Communications

University of California, Irvine

ICS 141

Chapter 9 - Subroutines and Control Abstraction

1)What is a subroutine calling sequence? What does it do? What is meant by the subroutine prologue and epilogue?

  1. How do calling sequences typically differ in older (CISC) and newer (RISC) instruction sets?

3. Describe how to maintain the static chain during a subroutine call.

    1. What is a display? How does it differ from a static chain?
    2. What are the purposes of the stack pointer and frame pointer registers? Why does a subroutine often need both?

 

    1. Why do modern machines typically pass subroutine parameters in registers rather than on the stack?
    2. Why do subroutine calling conventions often give the caller responsibility for saving half the registers and the callee responsibility for saving the other half?
    3. If work can be done in either the caller or the callee, why do we typically prefer to do it in the callee?
    4. Why do compilers typically allocate space for arguments in the stack, even when they pass them in registers?
    5. List the optimizations that can be made to the subroutine calling sequence in important special cases (e.g., leaf routines).
    6. How does an in-line subroutine differ from a macro?
    7. Under what circumstances is it desirable to expand a subroutine in-line?

 

Chapter 9.3

    1. What is the difference between formal and actual parameters?
    2. Describe four common parameter-passing modes. How does a programmer choose which one to use when?
    3. Explain the rationale for READONLY parameters in Modula-3.
    4. What parameter mode is typically used in languages with a reference model of variables?

 

    1. Describe the parameter modes of Ada. How do they differ from the modes of other modern languages?
    2. List three reasons why a language implementation might implement a parameter as a closure.
    3. What is a conformant (open) array?
    4. What are default parameters? How are they implemented?
    5. What are named (keyword) parameters? Why are they useful?
    6. Explain the value of variable-length argument lists. What distinguishes such lis wets in Java and C# from their counterparts in C and C++?

 

    1. Describe three common mechanisms for specifying the return value of a function. What are their relative strengths and drawbacks?
    2. Describe three ways in which a language may allow programmers to declare exceptions.
    3. Explain why it is useful to define exceptions as classes in C++, Java, and C#.
    4. Explain the behavior and purpose of a try... finally construct.

 

    1. Explain how to implement exceptions in a way that incurs no cost in the common case (when exceptions don’t arise).
    2. Describe the operations that must be performed by the implicit handler for a subroutine.
    3. What is a volatile variable in C? Under what circumstances is it useful?

 

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE