ORG 0000H
JMP Start
ORG 0100H
Start:
MOV P1,#000H
MOV P1,#01H
MOV R1,#00
MOV R2,#03
LP:
ACALL LP2
MOV A,P1
RL A
INC R1
MOV P1,A
CJNE R1,#08,LP
MOV P1,#00H
AJMP Start
LP2:
MOV 40H,#05
LP3:
MOV 41H,#200
LP4:
MOV 42H,#250
DJNZ 42H,$
DJNZ 41H,LP4
DJNZ 40H,LP3
DJNZ R2,LP2
MOV R2,#03
RET
END
|