这个玩意是最简单的吧?网上例程一大把啊。
一个一个流水?
ORG 0000H
LJMP MAIN
ORG 0030H
MAIN:
MOV P0,#0FEH
MOV P1,#0FFH
MOV P2,#0FFH
MOV P3,#0FFH
LOOP:
LCALL DELAY
MOV C,P3.7
MOV A,P0
RLC A
MOV P0,A
MOV A,P1
RLC A
MOV P1,A
MOV A,P2
RLC A
MOV P2,A
MOV A,P3
RLC A
MOV P3,A
SJMP LOOP
DELAY:
MOV R2,#100
DLY:
MOV R3,#250
DJNZ R3,$
DJNZ R2,DLY
RET
END