Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started