📄 delay.asm
字号:
;this funciton use the ar5 as input parametre fo the delay
;the delay unit is ms. for example, when ar5 is 1000, it means
;delay 1000ms
;input=ar5
.text
.def delay_,delay_us
;;push(ac2)
delay_:
;brc0=ar5
;.align 4
test_circle2_delay_sub:
;inner circle
ac2=#3fffh
test_circle_delay_sub:
ac2-=#1
nop
if (ac2!=#0) goto test_circle_delay_sub
;outer circle
ar5-=#1 ;decrement the ar5
if(ar5!=#0) goto test_circle2_delay_sub
;ac2=pop()
return
delay_us:
pshboth(ac2)
push(ar5)
test_circle2_delay_us_sub:
;inner circle
ac2=#0fh
test_circle_delay_us_sub:
ac2-=#1
nop
if (ac2!=#0) goto test_circle_delay_us_sub
;outer circle
ar5-=#1 ;decrement the ar5
if(ar5!=#0) goto test_circle2_delay_us_sub
ar5=pop()
ac2=popboth()
return
.end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -