📄 delay.s
字号:
SUBT Evaluator Support > delay.s;; $Revision: $; $Author: $; $Date: $;; Copyright (c) 1996 Advanced RISC Machines Limited; All Rights Reserved;; --------------------------------------------------------------------- GET listopts.s GET lolevel.s ASSERT (listopts_s)old_opt SETA {OPT} OPT (opt_off) ; disable listing of include files; --------------------------------------------------------------------- [ (:LNOT: :DEF: etherser_s) GBLL delay_sdelay_s SETL {TRUE} AREA |delay|, CODE, READONLY; ---------------------------------------------------------------------;; delay - delay for a given number of microseconds;; This routine is actually hopelessly inaccurate, as it depends upon; the system clock frequency, and the speed of the memory it is running; from. It is written assuming that it is running on an ARM7T; clocked at 25MHz in single-cycle SSRAM; if this is not the case,; then it will just delay for proportionately shorter or longer.;;; we loop 4 times for every microsecond. This gives a total of 28 ARM7T; clocks per microsecond - an error of 12%, which we can probably cope with.;; Note that, with the SRAM on the Evaluator, with 1 wait state at 50Mhz, the;effective access time is the same as for the 25MHz case mentioned above.; EXPORT delayloopdelayloop mov r0, r0, lsl #25 mov r0, r0 subs r0, r0, #1 moveq pc, lr b %5; --------------------------------------------------------------------- ] ; delay_s EXPORT traceRegstraceRegs OPT (old_opt) ; restore previous listing options; --------------------------------------------------------------------- END; EOF delay.s
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -