title: String translator into MIPS
body: <p>I have to make a String Translator in MIPS that receive a String in input and prints its translation by this rule:</p>
  
  <p>Substrings "uno" "due" "tre" "quattro" "cinque" "sei" "sette" "otto" "nove" are translated in '1', '2', '3',...,'9'.
  Spaces (empty chars) in the Input String represent the end of a substring.
  All substrings not written up here, are translated in '?'.
  So, this is my code:</p>
  
  <pre><code>.data
  msg: .asciiz "Inserisci una stringa \n"
  output: .asciiz "La traduzione Ã¨: \n"
  string: .space 100
  uno: .asciiz "uno"
  due: .asciiz "due"
  tre: .asciiz "tre"
  quattro: .asciiz "quattro"
  cinque: .asciiz "cinque"
  sei: .asciiz "sei"
  sette: .asciiz "sette"
  otto: .asciiz "otto"
  nove: .asciiz "nove"
  .text
  .globl main
  main:
  li $s7,0
  la $t4,uno
  la $t5,due
  la $t6,tre
  la $t8,quattro
  la $t9,cinque
  la $s3,sei
  la $s4,sette
  la $s5,otto
  la $s6,nove
  la $a0,msg
  li $v0,4
  syscall
  input: 
  la $a0,string
  li $a1,100
  li $v0,8
  syscall
  li $s0, 0
  scorriStringa: 
  move $t7,$s0
  lb $t1, string($s0)
  addi $s0,$s0,1
  bne $t1,32,scorriStringa #here there's always a loop
  beq $t1,'o',uscita
  controlloSpazi:
  lb $t2,string($s0)
  addi $s0,$s0,1
  beq $t2,32,controlloSpazi
  subi $s0,$s0,1
  traduzione:
  move $s1,$t7
  scorriSS:
  lb $t3,string($s1)
  confrontoUno:
  addi $s7,$s7,1
  bne $t3,$t4,confrontoDue
  confrontoDue:
  addi $s7,$s7,1
  bne $t3,$t5,confrontoTre
  confrontoTre:
  addi $s7,$s7,1
  bne $t3,$t6,confrontoQuattro
  confrontoQuattro:
  addi $s7,$s7,1
  bne $t3,$t8,confrontoCinque
  confrontoCinque:
  addi $s7,$s7,1
  bne $t3,$t9,confrontoSei
  confrontoSei:
  addi $s7,$s7,1
  bne $t3,$s3,confrontoSette
  confrontoSette:
  addi $s7,$s7,1
  bne $t3,$s4,confrontoOtto
  confrontoOtto:
  addi $s7,$s7,1
  bne $t3,$s5,confrontoNove
  confrontoNove:
  addi $s7,$s7,1
  bne $t3,$s6,confrontoNull
  confrontoNull:
  li $s7,0
  j stampaNull
  dopoConf:
  addi $s1,$s1,1
  beq $s1,$s0 stampaN
  bne $s1,$s0, scorriSS
  j scorriStringa
  stampaN:
  beq $s7,0,stampaUno
  beq $s7,1,stampaDue
  beq $s7,2,stampaTre
  beq $s7,3,stampaQuattro
  beq $s7,4,stampaCinque
  beq $s7,5,stampaSei
  beq $s7,6,stampaSette
  beq $s7,7,stampaOtto
  beq $s7,8,stampaNove
  dopoStampe:
  li $s1,0
  li $s2,0
  j scorriStringa
  uscita:
  li $v0,10
  syscall
  stampaUno:
  li $a0,1
  li $v0,1
  syscall
  j dopoStampe
  stampaDue:
  li $a0,2
  li $v0,1
  syscall
  j dopoStampe
  stampaTre:
  li $a0,3
  li $v0,1
  syscall
  j dopoStampe
  stampaQuattro:
  li $a0,4
  li $v0,1
  syscall
  j dopoStampe
  stampaCinque:
  li $a0,5
  li $v0,1
  syscall
  j dopoStampe
  stampaSei:
  li $a0,6
  li $v0,1
  syscall
  j dopoStampe
  stampaSette:
  li $a0,7
  li $v0,1
  syscall
  j dopoStampe
  stampaOtto:
  li $a0,8
  li $v0,1
  syscall
  j dopoStampe
  stampaNove:
  li $a0,9
  li $v0,1
  syscall
  j dopoStampe
  stampaNull:
  li $a0,'?'
  li $v0,4
  syscall
  j dopoStampe
  </code></pre>
  
  <p>I don't know why my code make this loop! Any suggestions? Thank you!</p>