Hi,
Just looking for a bit of help with MIPS. I've written the following program but can't get it to run on PCSpim. Think I've done something wrong with the nextCh command as it keeps iterating again & again but can't figure it out. It's to convert uppercase to lowercase characters .If anyone has any suggestions, please let me know.
Thanks,
Niall
.text
.globl __start
__start: ##execution starts here
#--------------------Start Cut---------------------
la $t1, str
nextCh: lb $t2, ($t1)
beqz $t1, strEnd
add $t2, $t2, 32
sb $t1, ($t2)
add $t1, $t1, 1
j nextCh
strEnd: la $a0, ans
li $v0, 4
syscall
move $a0, $t1
li $v0,4
syscall
la $a0, endl
li $v0, 4
syscall
li $v0, 10
syscall
#--------------------End Cut-----------------------
###################################################
# data segment #
###################################################
.data
str: .asciiz "ABCdEfgH"
ans: .asciiz "lowercase string ="
endl: .asciiz "\n"