tbm_isr_hyperterm.asm

来自「胎压监测系统接收端控制器motorolar开发源代码」· 汇编 代码 · 共 33 行

ASM
33
字号
*TBM_ISR_Hyperterm.asm

**********************************************************************
* This file contains the timebase module interrupt service routine.  *
* The TBM is disabled (and its counter reset) during critical        *
* operations, but other than that it generates periodic interrupts   *
* every 32768 clock cycles (6.67 ms).                                *
* PTA[0] = RX                                                        *
* PTB[0] = LF                                                        *
* PTB[1] = LR                                                        *
* PTB[2] = RR                                                        *
* PTB[3] = RF                                                        *
**********************************************************************
TBM_ISR:        LDA     TEMPTIME
                INCA
                STA     TEMPTIME
                CMP     #$96                            ;Counting to 1 second
                BNE     TBM_05

                CLR     TEMPTIME
                LDA     TEMPTIME+1
                INCA
                STA     TEMPTIME+1
                CMP     #$1E                            ;Counting to 30 seconds
                BNE     TBM_05
                
                CLR     TEMPTIME+1
                INC     TIMESTAMP
                
TBM_05:         BSET    3,TBCR                          ;Acknowledge interrupt.
                RTI

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?