Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; =======================================================================================
- ; d0 = sine (word)
- ; d1 = cosine (word)
- ; =======================================================================================
- Rotate:
- movem.l d2-d6/a0-a1,-(sp) ; back up registers onto the stack
- mulu.w d1,d2 ; multiply X point by cosine
- mulu.w d0,d3 ; multiply Y point by sine
- sub.w d3,d2 ; subtract the two products
- move.w d2,d4
- ; new x point has been calculated
- mulu.w d0,d2 ; multiply X point by sine
- mulu.w d1,d3 ; multiply Y point by cosine
- add.w d3,d2 ; add the two products
- move.w d2,d5
- ; new y point has been calculated
- add.w #$10,d4
- neg.w d5
- add.w #$10,d5
- $F0,$10 = address $0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement