Advertisement
Guest User

no body cares

a guest
Mar 30th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. ; =======================================================================================
  2. ; d0 = sine (word)
  3. ; d1 = cosine (word)
  4. ; =======================================================================================
  5. Rotate:
  6. movem.l d2-d6/a0-a1,-(sp) ; back up registers onto the stack
  7.  
  8. mulu.w d1,d2 ; multiply X point by cosine
  9. mulu.w d0,d3 ; multiply Y point by sine
  10. sub.w d3,d2 ; subtract the two products
  11. move.w d2,d4
  12. ; new x point has been calculated
  13.  
  14. mulu.w d0,d2 ; multiply X point by sine
  15. mulu.w d1,d3 ; multiply Y point by cosine
  16. add.w d3,d2 ; add the two products
  17. move.w d2,d5
  18. ; new y point has been calculated
  19.  
  20. add.w #$10,d4
  21. neg.w d5
  22. add.w #$10,d5
  23.  
  24. $F0,$10 = address $0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement