dec27seg.asm
来自「it consist of PCF8583 assembly driver」· 汇编 代码 · 共 28 行
ASM
28 行
;--------------- Encoding SubRoutine From DEC(BCD) to 7-SEGMENT --------------
DEC_2_7SEG:
push r16 ;
push ZL ;
push r17 ;Push Rx to stack
ldi r16,4 ;Counter=0...4
ldi ZL,DIGITS*2 ;First adress of digits codes
DEC1: ld r17,Y+ ;Load to r17 DEC digit whith post adr INCR
add ZL,r17 ;Get new adr for DIGITS offset
LPM ;LPM from ZL to R0
st X+,R0 ;Store digit in 7SEG code with post adr INCR
dec r16 ;Decrement counter
ldi ZL,DIGITS*2 ;Recover First adress of digits codes
brne DEC1 ;If counter not 0 goto DEC1
pop r17 ;
pop ZL ;
pop r16 ;Pop Rx from stack
RET
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?