Question: Problem 5. The given assembly code is not correct for a procedure. main: addi $a0, $0, 20 addi $a1, $0,45 addi $s3,Sad, 6 #do not

Problem 5. The given assembly code is not correct for a procedure. main: addi $a0, $0, 20 addi $a1, $0,45 addi $s3,Sad, 6 #do not change this line al func1 add $s1, $v0, $s3 #$s3 needs to be $a0+6 as in line3 func1: addi $s3, $ad, 50 #do not change this line add $a2, $s3, $a1 #do not change this line jal func2 addi vO, $v1, $a0 r Sra func2: addi $v1,Sa2,100 r Sra a) Explain the issues in the given code. b) Write the corrected version of the following assembly code. Your corrected version should preserve the functions main, funcl, and func2 and also ensure that their main operations do not change. Please pay special attention to the line comments below
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
