testpio.asm
来自「51系列单片机的汇编程序包」· 汇编 代码 · 共 72 行
ASM
72 行
; 文件名:testpio.asm
; CPU P0,P2,P3.6,P3.7测试程序
; 1) 运行本程序应选用Dais-89仿真头
; 2) 运行本程序前应选择CPU类型及定义P3.6、P3.7,具体方法是:
; 点击“设置/仿真模式”菜单,在对话框中将CPU设置为8752/89C52,
; 将P3.6、P3.7定义为I/O口
org 0000h
ljmp 0100h
org 0100h
;====== 清零P0口 ======
lp: clr p0.0
clr p0.1
clr p0.2
clr p0.3
clr p0.4
clr p0.5
clr p0.6
clr p0.7
;====== 清零P2口 ======
clr p2.0
clr p2.1
clr p2.2
clr p2.3
clr p2.4
clr p2.5
clr p2.6
clr p2.7
;====== 清零P3口 ======
clr p3.0
clr p3.1
clr p3.2
clr p3.3
clr p3.4
clr p3.5
clr p3.6
clr p3.7
;====== 置位P0口 ======
setb p0.0
setb p0.1
setb p0.2
setb p0.3
setb p0.4
setb p0.5
setb p0.6
setb p0.7
;====== 置位P2口 ======
setb p2.0
setb p2.1
setb p2.2
setb p2.3
setb p2.4
setb p2.5
setb p2.6
setb p2.7
;====== 置位P3口 ======
setb p3.0
setb p3.1
setb p3.2
setb p3.3
setb p3.4
setb p3.5
setb p3.6
setb p3.7
sjmp lp
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?