Hardware Reference
In-Depth Information
bra bcd_exit
rrncf decimalxH
bra
bcd_highloop
bcd_exit
return
; add a table value to result register
bcd_add
tblrd *+
movff TABLAT,WREG
addwf decimalbL,0
daw
movwf decimalbL
tblrd *+
movff TABLAT,WREG
addwfc decimalbH,0
daw
movwf decimalbH
tblrd *+
movff TABLAT,WREG
addwfc decimalbU,0
daw
movwf decimalbU
return
; skip this value
bcd_skip
tblrd *+
tblrd *+
tblrd *+
return
conversion_tables
code_pack
bcd_table
DB
0x01,0x00,0x00
DB
0x02,0x00,0x00
DB
0x04,0x00,0x00
DB
0x08,0x00,0x00
DB
0x16,0x00,0x00
DB
0x32,0x00,0x00
DB
0x64,0x00,0x00
DB
0x28,0x01,0x00
DB
0x56,0x02,0x00
DB
0x12,0x05,0x00
DB
0x24,0x10,0x00
DB
0x48,0x20,0x00
DB
0x96,0x40,0x00
DB
0x92,0x81,0x00
DB
0x84,0x63,0x01
DB
0x68,0x27,0x03
Search WWH ::




Custom Search