Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; d1 is number to pass
- moveq #X,d6 ; do X digits
- lea Art_Hud(pc),a1 ; load hud art
- @ShowDigit moveq #0,d2 ; d2 will contain digit of our number
- move.l (a2)+,d3 ; load a value from an array (1000, 100 etc, depends on how many digits you want to display)
- @digit: sub.l d3,d1
- bcs.s @disp ; is the digit correct?
- addq.w #1,d2 ; add 1 to digit
- bra.s @digit ; repeat until the digit is correct
- @disp: add.l d3,d1 ; restore the value
- ; d2 is you digit (0..9)!
- dbf d6,@ShowDigit
- rts
Add Comment
Please, Sign In to add comment