Assume that a computer has eight general purpose registers R0R7, a stack pointer register SP, and program

Question:

Assume that a computer has eight general purpose registers R0–R7, a stack pointer register SP, and program counter PC. If the calling convention for this computer is that registers R0 and R1 are used to pass parameter values to a procedure, register R2 is used to return a value to the calling procedure, and that the values of the other registers must be preserved across the procedure call, show the sequence of stack and register operations that must occur:

(a) In the calling procedure just before the procedure call instruction if two parameter values are to be passed to the procedure,

(b) At the beginning and end of a procedure that must use registers R3 and R4 for temporary values during the procedure.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question

Logic And Computer Design Fundamentals

ISBN: 9780133760637

5th Edition

Authors: M. Morris Mano, Charles Kime, Tom Martin

Question Posted: