Advertisement
chete

esquema ej.2

May 15th, 2014
488
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .data
  2. letras: .byte 'a','e','i','o','u'
  3. .text
  4. .globl main
  5. main:
  6. leer cad
  7. #a0--puntero cad
  8. #a1-a a2-e a3-i a4-o a5-u
  9.  
  10. lb $a1, letras
  11. lb $a2, letras+1 ...
  12.  
  13. lb $t0, letras +3
  14. apilar t0
  15. funcion:
  16.     lb $t0,$sp
  17.     addi $sp,sp,1
  18.     lb $t1, ($sp)
  19.     addi $sp,$sp,1
  20.    
  21.     INICIAR 5 CONTADORES
  22.     bucle:
  23.     lb $t6,($a0)
  24.     beq $t6,$zero
  25.     beq $t6,$a1......$an
  26.     addi $a0,$a0,1
  27.     j bucle
  28.     fin:
  29.     $v0,$a0
  30.     apilar los 3 contadores
  31.     jr $ra
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement