Question and answers correctly solved
2025/2026
When we write the instruction "addi $sp, $sp, -8", most likely we are preparing for:
Executing instruction j
Executing instruction jr $ra
Executing instruction jal
Saving registers to stack - correct answer Saving registers to stack
A set of registers are reserved for procedure calls. How do we preserve all values when a procedure calls
another procedure?
Use floating point registers
Use temporary registers
Use heap memory
Use stack memory - correct answer use stack memory
, In a procedure call, what is responsible for saving the $ra registers?
Caller Procedure
Callee Procedure
Stack
Operating System - correct answer Caller Procedure
In a procedure call, the $ra register is used for what purpose?
Storing the return address
Passing Parameters
Storing return values
Temporary scratch storage. - correct answer Storing the return address
In a procedure call, what is responsible for saving the $t0 - $t9 registers?
Caller Procedure
Stack