Question: 10. (18 pts) Trace the following code, given the data segment shown. Show exactly what is printed and show what will be in the array

 10. (18 pts) Trace the following code, given the data segment

10. (18 pts) Trace the following code, given the data segment shown. Show exactly what is printed and show what will be in the array nums at the end of the code. data nums: .word 25, 15, 85, 35, 50, 75, 65 sep: .asciiz "$$$" main: lui $t0, Ox1001 li $ti, 3 addi $t5, $t1, -2 addi $t4, $t0, 28 addi $t2, $t0, 4 addi $t3, $t0, 12 loop: bgt $t5, $t1, loopend lw $0, 0 ($t2) lw $sl, 4($t3) add $50, $s0, $sl SW $50, 0($t0) move $a0, $50 li $v0, 1 syscall li $v0, 4 move $a0, $t4 syscall addi $t0, $t0, 4 addi $t2, $t2, 8 addi $t3, $t3, 4 addi $t5, $t5, 1 b loop loopend

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!