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

📄 isr.asm

📁 一个单片机实现以太网通信的程序
💻 ASM
字号:
//****************************************************************
// Function: Fast Interrupt Service routine Area                     
//
// 	Hook user's interrupt 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
//****************************************************************

.ram
		.public _nowt
_nowt:  .DW       0x00


.TEXT
.include hardware.inc				// include io config. information
.include Resource.inc
//.include s480.inc					// include SACM2000 information

.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]
		//------------------------------------------------------------------		
		// hook Timer A FIQ subroutine here and define it to be external

//		CALL	F_FIQ_Service_SACM_S480		// SACM-S480 Timer A FIQ service
		//------------------------------------------------------------------
//		R1 = C_FIQ_TMA
//        [P_INT_Clear] = R1

		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,R5 to [sp]
	//	R1 = C_x
   //     [P_INT_Clear] = R1
		POP R1,R5 from [sp] 
		RETI
_IRQ0:        
		PUSH R1,R5 to [sp]
		//R1 = C_x
    //    [P_INT_Clear] = R1
		POP R1,R5 from [sp] 
		RETI		
_IRQ1:
		PUSH R1,R5 to [sp]
	//	R1 = C_x
   //     [P_INT_Clear] = R1
		POP R1,R5 from [sp] 
		RETI		
_IRQ2:
		PUSH R1,R5 to [sp]
	//	R1 = C_x
   //     [P_INT_Clear] = R1
		POP R1,R5 from [sp] 
		RETI        
_IRQ3:
		PUSH R1,R5 to [sp]
	//	R1 = C_x
   //     [P_INT_Clear] = R1
		POP R1,R5 from [sp] 
		RETI        
_IRQ4:        
		PUSH R1,R5 to [sp]
		R1 = C_IRQ4_1KHz
        [P_INT_Clear] = R1
        
		POP R1,R5 from [sp] 
		RETI 

//.external _RTC_ISR  
_IRQ5:   
		PUSH R1,R5 to [sp]
		R1 = C_IRQ5_2Hz
        [P_INT_Clear] = R1
       // call _RTC_ISR;        
		POP R1,R5 from [sp] 
		RETI     
		
 
_IRQ6:   
		PUSH R1,R5 to [sp]
//		R1 = C_x
  //      [P_INT_Clear] = R1
  		R1 = C_IRQ6_TMB1
		[P_INT_Clear] = R1
		R1 = [_nowt]   
		R1 += 1
	    [_nowt] = R1
		POP R1,R5 from [sp] 
		RETI 
    
_IRQ7:        
        RETI


//========================================================================================        
// End of isr.asm
//========================================================================================
        

⌨️ 快捷键说明

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