util.asm
来自「基于MOTOLOLAR单片机的TPMS发送控制器代码设计」· 汇编 代码 · 共 30 行
ASM
30 行
;/*****************************************************************************/
;/* PROJECT : RF key demonstrator (ASK or FSK) */
;/* Functions: tempo */
;/*****************************************************************************/
;/*****************************************************************************/
;/* tempo */
;/* Description : it waits for n cpu cycles */
;/* In : H:X */
;/* Out : TMOD, TSC */
;/* local variables : */
;/*****************************************************************************/
Tempo:
psha
lda TSC ;
and #%01111111 ; clear tof
ora #%00110000 ; stop the counter,
sta TSC ; while keeping prescaler same
sthx tmodh
bclr 5,TSC ; start the timer
brclr 7,TSC,* ; wait until the tempo is expired
pula
rts
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?