📄 io_ctrl.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 + -