这是简单的51单片机做的流水灯,用汇编写的程序,有PROTUSE图,- ORG 0000H
- LJMP START
- ORG 0100H
- START: MOV A,#0FEH
- LOOP: MOV P1,A
- MOV R2,#25H
- LCALL DELAY
- RL A
- LJMP LOOP
- DELAY: PUSH 02H
- LP1: PUSH 02H
- LP2: PUSH 02H
- LP3: DJNZ R2,LP3
- POP 02H
- DJNZ R2,LP2
- POP 02H
- DJNZ R2,LP1
- POP 02H
- DJNZ R2,DELAY
- RET
- END
复制代码
希望对新手的你有帮助。
|