Jump to content

uppercase in MIPS

- - - - -

  • Please log in to reply
No replies to this topic

#1
Apprentice123

Apprentice123

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 429 posts
What is wrong?

      .data
nome: .asciiz "test\n"


      .text
      .globl main
      
uppercase: addi $v0, $zero, 4
      lb $t2, 0($a0)        
      beq $t2, $0, exit        
      blt $t2, 97, next
      bgt $t2, 122, next
      sub $t2, $t2, 32      
      sb $t2, 0($a0)


next:
    addi $a0, $a0, 1
    j uppercase
    
exit:
    #jr $ra
    j main
    
main:
    la $a0, nome
    j uppercase
    li $v0, 10
    syscall







1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users