prog19.asm
来自「主要是8051源代码」· 汇编 代码 · 共 23 行
ASM
23 行
; PROG19 - 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
mov C,P1.1 ; Get the button State
mov P1.0,C
sjmp Loop
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?