附录4:系统程序清单
ORG 0H
MAIN: MOV SP,#60H
MOV P2,#00H
SETB P2.7
MOV R3,#04H
KK1: LCALL DELAY
DJNZ R3,KK1
CLR P2.7
NOP
SETB P2.6
NOP
NOP
NOP
NOP
CLR P2.6
MOV R3,#04H
KK: LCALL DELAY
DJNZ R3,KK
SETB P2.6
MOV R3,#04H
KK2: LCALL DELAY
DJNZ R3,KK2
CLR P2.6
NOP
SETB P2.7
NOP
NOP
NOP
NOP
CLR P2.7
AJMP $
DELAY: MOV R5,#5
LL1: LCALL DELAY1
DJNZ R5,LL1
RET
DELAY1: MOV R7,#200
LL: MOV R6,#250
DJNZ R6,$
DJNZ R7,LL
RET
END