[an error occurred while processing this directive]
[an error occurred while processing this directive]
|
;Buff[0..3] convert to BCD Dig[3..9]
notst: ldi ZL,Dig+10
clr temp
clrout: st -Z,temp
cpi ZL,Dig+3
brne clrout ;output array clear
ldi tempD,24 ;input bits count
hloop: lsl tempL ;input array shift left
rol tempM
rol tempH
ldi YL,Dig+10
sloop: ld temp,-Y
rol temp
subi temp,-0x06 ;temp+6, C=1
sbrs temp,4
subi temp,0x06 ;temp-6, C=0
andi temp,0x0f
st Y,temp
cpse YL,ZL ;ZL = Dig+3
rjmp sloop
dec tempD ;YL = Dig+3
brne hloop
E-mail: info@telesys.ru