decrnd movf one,w ;get one into W
sublw 0x04 ;subtract W from 4, result in W
btfsc status,c
return ;carry set, leave as is
rnd1 incf ten ;carry clear, round up
movf ten,w ;compare
sublw 0x0a ;result 10 decimal?
btfss status,z
return ;not 10
clrf ten
rnd10 incf hund
movf hund,w ;compare
sublw 0x0a ;result 10 decimal?
btfss status,z
return ;not 10
clrf hund
incf onek
movf onek,w ;compare
sublw 0x0a ;result 10 decimal?
btfss status,z
return ;not 10
clrf onek
incf tenk
return
Home| Back to Errata Page |
Contact Us