ORG 0000H
LJMP MAIN
ORG 0030H
MAIN:
MOV A,#0FEH
MOV B,#0FFH
MOV P1,A
MOV P0,B
MOV R2,#14
LOOP:
LCALL DELAY
RLC A
XCH A,B
MOV C,ACC.6
MOV ACC.0,C
DJNZ R2,LOOP
MOV R2,#3
LOOP1:
MOV P0,#00H
MOV P1,#00H
MOV P1,#0FFH
MOV P0,#0FFH
DELAY
DJNZ R2,LOOP1
SJMP $
DELAY:
MOV R6,#200
DLY:
MOV R7,#250
DJNZ R7,$
DJNZ R6,DLY
RET
END
ORG 0000H
LJMP MAIN
ORG 0030H
MAIN:
MOV A,#0FEH
MOV B,#0FFH
MOV P1,A
MOV P0,B
MOV R2,#14
LOOP:
LCALL DELAY
RLC A
XCH A,B
RLC A
MOV C,ACC.6
XCH A,B
MOV ACC.0,C
MOV P1,A
MOV P0,B
DJNZ R2,LOOP
MOV R2,#3
LOOP1:
MOV P0,#00H
MOV P1,#00H
LCALL DELAY
MOV P1,#0FFH
MOV P0,#0FFH
DELAY
DJNZ R2,LOOP1
SJMP $
DELAY:
MOV R6,#200
DLY:
MOV R7,#250
DJNZ R7,$
DJNZ R6,DLY
RET
END