Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

fix this code in Assembly mips pls DONT DO IT IN C Problem #3 (25 points-12.5 Po

ID: 2248570 • Letter: F

Question

fix this code in Assembly mips pls

DONT DO IT IN C

Problem #3 (25 points-12.5 Points Each) a) Write a function in Assembly called Return _Max that would pass unsigned integer values via a0 and a1. The function wil return the maximum value via vo. f the two values are equal will return either value. ent Return Max Return_Max: Nor ek Ir Sra nop . _Max end Retur b) Write function called Get_Average2 in assembly that would load the next two unsigned consecutive integers (4bytes each) from memory. The address of the first integer is stored in $50. The function will take the average of the two integers and ent Get Average2 Get Average2: Ova Sve SRL St,Sta, I r Sra nop end Get Averoge?

Explanation / Answer

A) prg:

LW $t0,$a0

LW $t1,$a1

BEQ $t0,$t1,next1

SLT $t2,$t0,$t1 #Set register Rdest to 1 if register Rsrc1 is #less than Src2

BEQ $t2,$1,next1

SW $t1,$v0

J next2

next1: SW $t0,$v0

next2 :.......

....

.....