📄 base.s
字号:
#include <avr/io.h>
//11.0592M Clock 延时均为近似
.global Delay1uS
Delay1uS:
//NOP
NOP
RET
.global DelayNuS
DelayNuS:
LoopuS:
SUBI R24,0x01//R24-1
CALL Delay1uS
BRNE LoopuS
RET
.global Delay1mS
Delay1mS:
PUSH R24
//Delay 250uS
LDI R24,250
LoopuST1:
SUBI R24,0x01//R24-1
CALL Delay1uS
BRNE LoopuST1
//Delay 250uS
LDI R24,250
LoopuST2:
SUBI R24,0x01//R24-1
CALL Delay1uS
BRNE LoopuST2
//Delay 250uS
LDI R24,250
LoopuST3:
SUBI R24,0x01//R24-1
CALL Delay1uS
BRNE LoopuST3
//Delay 250uS
LDI R24,250
LoopuST4:
SUBI R24,0x01//R24-1
CALL Delay1uS
BRNE LoopuST4
POP R24
RET
.global DelayNmS
DelayNmS:
LoopmS:
SUBI R24,0x01//R24-1
LDS R25,SREG
CALL Delay1mS
STS SREG,R25
BRNE LoopmS
RET
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -