ORG 0000H
LJMP START
START:
MOV A,#0FFH
CLR C
MOV R0,#00H
MOV R2,#08H
LOOP: RLC A
MOV P1,A
CALL YAN
DJNZ R2,LOOP
INC R0
MOV R2,#08H
CJNE R0,#02H,LOOP
SJMP $
YAN: MOV R5,#20
D1: MOV R6,#20
D2: MOV R7,#248
DJNZ R7,$
DJNZ R6,D2
DJNZ R5,D1
RET
END
作上述改动即可~ |