Problem

Assume that a computer has eight general purpose registers R0–R7, a stack pointer register...

Assume that a computer has eight general purpose registers R0R7, 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.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 9