]> git.sur5r.net Git - rgb2r-2017/blob - bcd2dec.s
Update concept struct for binary logging
[rgb2r-2017] / bcd2dec.s
1
2         .export   _bcd2dec
3         .importzp tmp1,tmp2
4
5 .code
6
7 .proc   _bcd2dec
8         tax
9         and     #%00001111
10         sta     tmp1
11         txa
12         and     #%11110000      ; *16
13         lsr                     ; *8
14         sta     tmp2
15         lsr
16         lsr                     ; *2
17         adc     tmp2            ; = *10
18         adc     tmp1
19         ldx     #0
20         rts
21 .endproc