ORG 0000H
SJMP MAIN
MAIN:MOV P0,#0FEH
MOV R0,#8H
LP: MOV A,P0
RR A
MOV P0,A
LCALL DELY
DJNZ R0,LP
MOV P0,#0FEH
MOV R0,#7H
LP1: MOV A,P0
RL A
MOV P0,A
LCALL DELY
DJNZ R0,LP1
MOV R1,#7H
MOV P0,#07EH
LP2: MOV A,P0
RL A
MOV P0,A
LCALL DELY
DJNZ R1,LP2
MOV R1,#06H
MOV P0,#03EH
LP3: MOV A,P0
RR A
MOV P0,A
LCALL DELY
DJNZ R1,LP3
MOV R5,#05H
MOV P0,#078H
LP4: MOV A,P0
MOV R5,#05H
RL A
MOV P0,A
LCALL DELY
DJNZ R5,LP4
LJMP MAIN
DELY: MOV R5,#5H
DELY0:MOV R6,#0C8H
DELY1:MOV R7,#0F8H
NOP
DELY2: DJNZ R7,DELY2
DJNZ R6,DELY1
DJNZ R5,DELY0
RET
END
帮下忙看一下这个程序,有高手指点下,到了最后总是在最后一个循环
不回到main去进入第一个。请高手指点。 |