⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 isr.asm

📁 凌阳单片机的语音程序5
💻 ASM
字号:
//****************************************************************
// Function: Fast Interrupt Service routine Area                     
//      Service for     (1)PWM FIQ
//                      (2)Timer A FIQ
//                      (3)Timer B FIQ
//      User's FIQ must hook on here                            
//  _FIQ:                            // Fast interrupt entrence
//  _IRQ1:                           // interrupt entrence
//  _IRQ2:                           // interrupt entrence
//  _IRQ3:                           // interrupt entrence
//  _IRQ4:                           // interrupt entrence
//  _IRQ5:                           // interrupt entrence
//  _IRQ6:                           // interrupt entrence     
//  _IRQ7:                           // interrupt entrence
//****************************************************************

.include hardware.inc;              // include hardware information
.include a2000.inc;
.include s480.inc;


.external R_SpeechType;

.TEXT
.public _BREAK;
.public _FIQ;
.public _IRQ0;
.public _IRQ1;
.public _IRQ2;
.public _IRQ3;
.public _IRQ4;
.public _IRQ5;
.public _IRQ6;
.public _IRQ7;

               
_FIQ:
                push R1,R5 to [sp];

                R1 = C_FIQ_PWM;
                test R1,[P_INT_Ctrl];
                jne     L_FIQ_PWM;
                R1 = C_FIQ_TMA;
                test R1,[P_INT_Ctrl];
                jne L_FIQ_TimerA;
L_FIQ_TimerB:
                //r1 = C_FIQ_TimerB;
                //[P_INT_Clear] = r1;
                //------------------------------------------------------------------
                // hook Timer B FIQ subroutine here and define it to be external
                //------------------------------------------------------------------
                pop R1,R5 from [sp];
                reti;
L_FIQ_PWM:      		                                  // PWM FIQ entrence
                [P_INT_Clear] = R1;
                //------------------------------------------------------------------
                // hook PWM FIQ subroutine here and define it to be external
                //------------------------------------------------------------------
                
                pop R1,R5 from [sp];
                reti;
L_FIQ_TimerA:
                [P_INT_Clear] = R1;
                //------------------------------------------------------------------
                // hook Timer A FIQ subroutine here and define it to be external
                R1 = [R_SpeechType];     
                cmp		R1, 1;
                je		L_SACM_A2000;
                cmp		R1, 2;
                je		L_SACM_S480;
                jmp		L_TA_Nothing;
L_SACM_A2000:                
                call    F_FIQ_Service_SACM_A2000;         // SACM-A2000 Timer A FIQ service
                jmp		L_TA_Nothing;
L_SACM_S480:                
                call    F_FIQ_Service_SACM_S480;         //  SACM_S480 Timer A FIQ service
                
L_TA_Nothing:                
                //------------------------------------------------------------------
                pop r1,r5 from [sp];
                reti;

/////////////////////////////////////////////////////////////////////////////////////////
// Function: Interrupt Service routine Area
//      Service for     IRQ1 - IRQ7
//      User's IRQ must hook on here
/////////////////////////////////////////////////////////////////////////////////////////        
_BREAK:        
                push R1,R4 to [sp];
                
                pop R1,R4 from [sp];
                reti;

_IRQ0:        
                push R1,R4 to [sp];
                
                pop R1,R4 from [sp];
                reti;

_IRQ1:        
                push R1,R4 to [sp];
                
                pop R1,R4 from [sp];
                reti;
_IRQ2:        
                push R1,R5 to [sp];
                R1 = C_IRQ2_TMB;  // 0x0400
                [P_INT_Clear] = R1;
                pop R1,R5 from [sp];
                reti;
_IRQ3:
                push R1,R4 to [sp];
                
                pop R1,R4 from [sp];
                reti;
_IRQ4:        
                push R1,R1 to [sp];
                
                R1 = C_IRQ4_1KHz;  // 0x0010
                [P_INT_Clear] = r1;
                pop R1,R1 from [sp];
                reti;
_IRQ5:        
                push R1,R4 to [sp];
                
                pop R1,R4 from [sp];
                reti;
_IRQ6:        
                push R1,R4 to [sp];
                pop R1,R4 from [sp];
                reti;
_IRQ7:        
                push R1,R4 to [sp];
                pop R1,R4 from [sp];
                reti;
//========================================================================================        
// End of isr.asm
//========================================================================================
        

⌨️ 快捷键说明

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