Guest User

Untitled

a guest
Apr 19th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         ; d1 is number to pass
  2.  
  3.         moveq   #X,d6       ; do X digits
  4.         lea Art_Hud(pc),a1  ; load hud art
  5.  
  6. @ShowDigit  moveq   #0,d2       ; d2 will contain digit of our number
  7.         move.l  (a2)+,d3    ; load a value from an array (1000, 100 etc, depends on how many digits you want to display)
  8.  
  9.     @digit: sub.l   d3,d1
  10.         bcs.s   @disp       ; is the digit correct?
  11.         addq.w  #1,d2       ; add 1 to digit
  12.         bra.s   @digit      ; repeat until the digit is correct
  13.  
  14.     @disp:  add.l   d3,d1       ; restore the value
  15.  
  16.         ; d2 is you digit (0..9)!      
  17.  
  18.         dbf d6,@ShowDigit
  19.         rts
Add Comment
Please, Sign In to add comment