Question: 8. (20 points) Read the following MIPS code and take advantage of the information from the MARS execute view to answer the following questions. (a).

8. (20 points) Read the following MIPS code and take advantage of the information from the MARS execute view to answer the following questions. (a). Assume that Ssp register has the value 0x7fffeffc before the procedure func is called. Fill in the content of these addresses in the table right after the jal func instruction is done. Use hexadecimal format. addi $a0, $zero, 5 jal func 2 li $v0, 10 syscall 4 7 func: addi $sp, $sp, -8 # adjust stack for 2 items Sw $ra, 4($sp) sw $a0, 0 ($sp) slti $t0, $a0, 1 beq $t0, $zero, L1 add $v0, $zero, $zero # if so, result is 0 addi $sp, $sp, 8 # save return address # save argument # test for n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
