Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; ===============================================================
- ; ---------------------------------------------------------------
- ; Function to calculate a root
- ; (c) 2012, Vladikcomper
- ; ---------------------------------------------------------------
- ; INPUT:
- ; d0.w = Number
- ;
- ; OUTPUT:
- ; d0.w = Root of number
- ;
- ; USES:
- ; d0, d1
- ;
- ; ---------------------------------------------------------------
- CalcRoot:
- moveq #-1,d1
- @0 addq.w #2,d1
- sub.w d1,d0
- bcc.s @0
- subq.w #1,d1
- lsr.w #1,d1
- exg d1,d0
- rts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement