📄 prog45.asm
字号:
; PROG45 - Poll a button and turn on an LED
;
; This Application Turns on an LED and Loops forever afterward.
;
; Myke Predko
; 98.02.18
;
; Hardware Notes:
; 80C520 Running at 1 MHz
; P1.0 is the LED (to light, it is pulled down)
; P1.1 is connected to a Momentary ON Switch that Pulls down the Line.
; Variable Declarations
; Mainline
org 0 ; Execution Starts Here
Loop: ; Loop Here Forever
jb P1.1,LEDON ; If Button High, Make LED High
anl P1,#0FEh ; Pull Down P1.0 To Turn on LED
ajmp Loop
LEDON: ; Button High, Turn On LED
orl P1,#001h
ajmp Loop
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -