dsp28_usdelay.asm
来自「TI公司的2812dsp所有程序」· 汇编 代码 · 共 34 行
ASM
34 行
.def _DSP28x_usDelay
;====================================================
;Delay Function
;The C assembly call will look as follows:
;
; extern void Delay(long time);
; MOV AL,#LowLoopCount
; MOV AH,#HighLoopCount
; LCR _Delay
;
;Or as follows (if count is less then 16-bits):
;
; MOV ACC,#LoopCount
; LCR _Delay
.global __DSP28x_usDelay
_DSP28x_usDelay:
SUB ACC,#1
BF _DSP28x_usDelay,GEQ ;; Loop if ACC >= 0
LRETR
;There is a 9/10 cycle overhead and each loop
;takes five cycles. The LoopCount is given by
;the following formula:
; DELAY_CPU_CYLES = 9 + 5*LoopCount
; LoopCount = (DELAY_CPU_CYCLES - 9) / 5
;==================================================
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?