?? zhduan1.asm
字號:
KEY BIT P3.3
SW1 BIT P2.2 ;89s51 pin link to key
ORG 000H
START: MOV sp,#40h ;configure the stack register
MOV p2,#0ffh
MOV p3,#0ffh
MOV P1,#0ffh;
CLR KEY
WAIT: JB KEY,$ ;wait for push key!
JB SW1,$
LCALL DELAY ;call the delay sub procedure
CPL P1.0 ;opposite the status of the p1.0
JNB SW1,$
JMP wait
DELAY: MOV R3,#300
D1: MOV R4,#300
DJNZ R4,$
DJNZ R3,D1
RET
END
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -