Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please debug/correct the given code. Do not fix with pseudo commands. 4# 5 # This program computes the maximum magnitude for the elements of array
Please debug/correct the given code. Do not fix with pseudo commands.
4# 5 # This program computes the maximum magnitude for the elements of array A 6 # and stores the value of the element with maximum magnitude at the label maxmag: 7 8 9 data 10 # DO NOT change the following three labels (you may change the initial values): 11 A: .word 1, -14, 9, 1o, -11, 6, 56, -60, 78, 100, 4, 5, o, 3, -5, 9 12 13 maxmag: .alloc 1 14 15 .text 16 17 main: addi $11, $0,15 18 19 20 21 lui $1, 4097 ori $9, i, o 1w $16,0 ($9) addi $9,$9,4 addi $11, $il,-1 23 24 25 loop: 1w 12,0 (St1) 26 27 28 sit 1, 12, 16 bne 1,co, next 1w 916,0 (912) 29 30 31 next: addi 011,011,-1 addi 99,99,4 bne 11,co,loop 32 34 35 $16,maxmag ($0) sw 36 # return to OS 7 3: 31 30 39 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