呼吸灯
ORG 0000H
START: MOV R0,#01H
MOV R1,#00H
MOV R2,#00H
MOV R3,#0FFH
LOOP: MOV P1,R2
MOV A,R0
LOOP1: MOV R4,#10
DJNZ R4,DJNZ R0,LOOP1 INC A MOV R0,A MOV P1,R3 MOV A,R1 LOOP2: MOV R4,#10 DJNZ R4," role="presentation" style="position: relative;">DJNZ R0,LOOP1
INC A
MOV R0,A
MOV P1,R3
MOV A,R1
LOOP2: MOV R4,#10
DJNZ R4,
DJNZ R1,LOOP2
DEC A MOV R1,A
JNZ K1
MOV A,R2
CPL A
MOV R2,A
MOV A,R3
CPL A
MOV R3,A
K1: SJMP LOOP
END