Advertisement
sergioml2000

POWERPOINT 97

Oct 13th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. .data
  2. vectorA: .word 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  3. vectorB: .word 100, 102, 102, 103, 104, 105, 106, 107, 108, 109
  4.  
  5. .text
  6. main:
  7. la $t0 vectorA
  8. la $t1 vectorB
  9. li $t2 10
  10. add $t1 $t1 36 #NOS SITUAMOS EN ULTIMA POSICIÓN DEL VECTOR
  11. #la $t5 9
  12. loop:
  13. lw $t3 ($t0)
  14. lw $t4 ($t1)
  15. #add $t4 $t4 $t5
  16. #sub $t5 $t5 2
  17. move $t3 $t4
  18. sw $t3 ($t0)
  19.  
  20. add $t0 $t0 4
  21. sub $t1 $t1 4 #VAMOS BAJANDO DE POSICIÓN DEL VECTOR
  22.  
  23. sub $t2 $t2 1
  24. beqz $t2 fin
  25. b loop
  26. fin:
  27. li $v0 10
  28. syscall
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement