Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. ###########POLY############
  2. POLY: #
  3. #a0 stores the colour #
  4. #a1 stores tolerance #
  5. #a2: the amount of points #
  6. #points: stack
  7.  
  8.  
  9. li $t6, 1
  10.  
  11. move $s7, $sp
  12. addi $sp, $sp, -4
  13.  
  14. sw $ra, 0($sp)
  15.  
  16. POLYLOOP:
  17.  
  18. lw $t0, 0($s7)
  19. lw $t1, 4($s7)
  20. lw $t2, 8($s7)
  21. lw $t3, 12($s7)
  22. move $t4, $a1
  23. jal LINEPROC
  24.  
  25. addi $t6, $t6, 1
  26. addi $s7, $s7, 8
  27. bne $t6, $a2, POLYLOOP
  28.  
  29. lw $t0, 0($s7)
  30. lw $t1, 4($s7)
  31. lw $t2, 4($sp)
  32. lw $t3, 8($sp)
  33. move $t4, $a1
  34. jal LINEPROC
  35.  
  36. lw $ra, 0($sp)
  37. addi $sp, $sp, 4
  38.  
  39. jr $ra
  40.  
  41. ##########POLY##########
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement