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

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 $sp 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 1 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 9 10 # save return address # save argument # test for n

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!