⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 io_ctrl.asm

📁 DSP用汇编语言实现对外部IO口控制
💻 ASM
字号:
    .mmregs
    .global main
    .global delay
;============================================================================
.text
main:
;ld #0x0007,A;test for three leds 
;    stlm A,AR1
;   portw AR1,0x0000
;  call delay

loop:ld #0x0001,A;make the first led shine
     stlm A,AR2
     portw AR2,0x0000
     call delay
     ld #0x0002,A;make the second led shine
     stlm A,AR3
     portw AR3,0x0000
     call delay;
     ld #0x0004,A;make the third led shine
     stlm A,AR4
     portw AR4,0x0000
     call delay
     b loop;jump to the beginning of loop
     
delay:st #0x000f,BRC;execute the loop above
     rptb N2nd-1
     rpt 0x000f
     nop
N2nd:ret 
     .end
     
     

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -