|
START:MOV R0,#3
MOV R1,#3
MOV R2,#2
MOV A,#00111111B
MOV P0,A
LCALL DELAY1
D1: RR A
RR A
MOV P0,A
LCALL DELAY1
DJNZ R0,D1
LJMP LOOP
D2: RL A
RL A
MOV P0,A
LCALL DELAY1
DJNZ R1,D2
LJMP D1
DELAY1:MOV R6,#4
D3:MOV R7,#4
D4:DJNZ R7,D4
DJNZ R6,D3
RET
LOOP: MOV P0,#00000000B
LCALL DELAY2
MOV P0,#11111111B
LCALL DELAY2
DJNZ R2,LOOP
LJMP D2
DELAY2:MOV R3,#1
D5:MOV R4,#2
D6:DJNZ R4,D6
DJNZ R3,D5
RET
END
|
|