Advertisement
Ferdinando_Ottaviani

Esercizio 1

Oct 24th, 2019
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #ES1
  2.  
  3. .text
  4. .globl main
  5.  
  6. main:
  7. la $s0,x
  8. la $s1, y
  9.  
  10. loop: blt $s0,$s1, condizione_x
  11. blt $s1,$s0, condizione_y
  12.  
  13. condizione_x:
  14. sub $v0,$s0,$s0
  15. addi $v0,$v0,1
  16. jr $ra
  17.  
  18. condizione_y: sub $v0,$s0,$s1
  19. addi $v0,$v0,1
  20. jr $ra
  21.  
  22. .data
  23. x: .word 1
  24. y: .word 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement