View the step-by-step solution to:

The table on the next page is the history of instructions and registers when the following code is executed.

The table on the next page is the history of instructions and registers when the following code is executed. The first column indicates which instruction is executed and the remaining columns indicate the value of registers after the instruction is executed. Fill out the table until the instruction at address 0x18 (nop) is reached. If a register is not updated, you may leave the cell blank. The first 10 instructions are given as an example.


0x00     main:

. . .

0x10               addi $a0, $0, 1

0x14               jal sub1               

0x18               nop

. . .

0x30     sub1:    addi $sp, $sp,-8

0x34               sw  $ra, 4($sp)

0x38               sw  $a0, 0($sp)

0x3C               bne $a0, $0, L1

0x40               jr  $ra                

0x44     L1:      addi $a0, $a0, -1

0x48               jal sub1               

0x4C     next1:   lw  $a0, 0($sp)

0x50               lw  $ra, 4($sp)

0x54               addi $sp, $sp, 8

0x58               jr  $ra                


1.PNG

1.PNG

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question