相关代码 |
|
;8-7-1.ASM BUFFER DATA 20H $MOD51 ORG 0000H MOV SP,#50H ;知道为什么要设定堆栈STACK? MOV A,#00H ;累加器=00H MOV BUFFER,A ;(20H)=00H LOOP: MOV P1,BUFFER ;P1=(BUFFER) INC BUFFER ;将BUFFER内容加上1 LCALL DELAY ;延迟一小段时间 SJMP LOOP ;ROUTINE ;为时间延迟用 DELAY: MOV R0,#00H DLY: MOV R1,#00H DJNZ R1,$ DJNZ R0,DLY RET END
相关资源 |
|