]> git.sur5r.net Git - c128-kasse/blob - src/bcd2dec.s
use the more accurate CIA1 Time Of Day instead of the jiffy clock
[c128-kasse] / src / bcd2dec.s
1
2         .export   _bcd2dec
3         .importzp tmp1,tmp2
4
5 .code
6
7 ;; Copied from [cc65]/libsrc/c128/systime.s
8
9 .proc   _bcd2dec
10         tax
11         and     #%00001111
12         sta     tmp1
13         txa
14         and     #%11110000      ; *16
15         lsr                     ; *8
16         sta     tmp2
17         lsr
18         lsr                     ; *2
19         adc     tmp2            ; = *10
20         adc     tmp1
21         ldx     #0
22         rts
23 .endproc