Implement the following pseudocode in a MIPS assembly program.
if ($t1 < $t2) {
$t6 = $t2
}
else {
$t6 = $t1
}
$t6 = $t6 + 1
ANSWER:
I have provided the properly commented
code in both text and image format so you can easily copy the code
as well as check for correct indentation.
Have a nice and healthy day!!
CODE TEXT
main: #code
# if t1< t2 go to IF
blt $t1, $t2, IF
# otherwise
# store $t1 to $t6
move $t6, $t1
# now move to End part
End
IF:
# store $t2 to $t6
move $t6, $t2
# now move to End part
End
End:
# add 1 to $t6
addi $t6, $t6, 1
CODE IMAGE
Get Answers For Free
Most questions answered within 1 hours.