We produced this code
.data
phrase: .asciiz "hello world"
.text
main:
la $t0, phrase
lb $t1, 0($t0)
# next line added after class
move $a0, $t1
jal ToUpper
# next line added after class
move $t1, $a0
loopTop:
beq $t1, $zero, done
li $v0, 11
move $a0, $t1
syscall
addi $t0, $t0, 1
lb $t1,0($t0)
# next line added after class
move $a0, $t1
jal ToUpper
# next line added after class
move $t1, $a0
LoopMiddle:
# other code goes here
b loopTop
done:
li $v0, 10
syscall
ToUpper:
blt $a0, 97, ToUpperOut
bgt $a0, 122, ToUpperOut
addi $a0, $a0, -32
ToUpperOut:
jr $ra