.data
userInput: .space 20
message: .asciiz "Enter your name please? "
upperCase: .asciiz "True"
lowerCase: .asciiz "False"
.text
.globl main
main:
la $a0, message
li $v0, 4
syscall
la $a0, userInput
li $a1, 20
li $v0, 8
syscall
la $a0, upperCase
li $v0, 4
syscall
la $a0, userInput
loop:
lb $t1,($t0)
beqz $t1,exit_loop
blt $t1,'a',no_change
bgt $t1,'z',no_change
addiu $t1,$t1,-32
sb $t1,($t0)
no_change:
addiu $t0,$t0,1
j loop
exit_loop:
la $a0, userInput
li $v0,4
syscall
li $v0, 10
syscall
li $v0, 10
syscall