Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please debug code. Don't use pseudo commands 4# 5 # This program computes the maximum magnitude for the elements of array A E # and

Please debug code. Don't use pseudo commands
image text in transcribed
4# 5 # This program computes the maximum magnitude for the elements of array A E # and stores the value of the element with maximum magnitude at the label maxmag: 7 8 9 .data 10 # DO NOT c hange 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 lui $1, 4097 ori $9, i, o 1w $16,0 ($9) 21 addi $9,$9,4 addi $11, $11,-1 23 24 25 loop: 1w 12,0 (St1) 26 27 sit 1, $12, 16 bne 1,co, next 1w 916,0(12) 28 29 30 31 next: addi 11,011,-1 32 addi $9,$9,4 bne 11,co,loop 34 35 sw $16,maxmag ($0) 36 # return to OS 37 31 30 40

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

User Defined Tensor Data Analysis

Authors: Bin Dong ,Kesheng Wu ,Suren Byna

1st Edition

3030707490, 978-3030707491

More Books

Students also viewed these Databases questions