[an error occurred while processing this directive]
[an error occurred while processing this directive]
|
входные данные
aargb3
aargb2
aargb1
aargb0
выходные
r0
r1
r2
r3
r4
b2_bcd
bcf status,c ; clear the carry bit
movlw 32
movwf count
clrf r0
clrf r1
clrf r2
clrf r3
clrf r4
loop16
rlf aargb3,f
rlf aargb2,f
rlf aargb1,f
rlf aargb0,f
; rlf aexp,f
rlf r4,f
rlf r3,f
rlf r2,f
rlf r1,f
rlf r0,f
decfsz count,f
goto adj_dec
return
adj_dec
movlw r4
movwf fsr
call adj_bcd
movlw r3
movwf fsr
call adj_bcd
movlw r2
movwf fsr
call adj_bcd
movlw r1
movwf fsr
call adj_bcd
movlw r0
movwf fsr
call adj_bcd
goto loop16
adj_bcd
movlw 0x03
addwf indf,w
movwf temp
btfsc temp,3 ; test if result > 7
movwf indf
movlw 0x30
addwf indf,w
movwf temp
btfsc temp,7 ; test if result > 7
movwf 0 ; save as MSD
return
E-mail: info@telesys.ru