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

📄 int.s

📁 abov公司的单片机器MC80F7208的演示程序,C代码,包含LCD,I2C,KEY,ADC,NVM,TIME等内容,适合初学者熟悉.
💻 S
字号:
;================================================================== 
;	file	: Int.s 
;================================================================== 

	.file	"Int.c"


	GLOBAL __.INT0			; Watch 1 minute Timer 
	GLOBAL __.INT3			; Carrier Generator
	GLOBAL __.INT5			; T2 25ms interval 
	GLOBAL __.INT7			; T0 4ms interval 
	GLOBAL __.INT14			; Key wake up 


;================================================================== 
;	Timer0 Interrupt for 4 ms interval 
;================================================================== 

	.sect	.text
	.globl T0_Int
	.type	T0_Int,@function
	.interrupt T0_Int

__.INT7:

T0_Int:
	push	A				;
	push	X				;	
	push	Y				;	

	call	!_T0_Int_Handler		;
	
	pop	Y				;
	pop	X				;
	pop	A				;
	
	reti					;
		

;================================================================== 
;	Timer2 Interrupt for 25 ms interval 
;================================================================== 

	.sect	.text
	.globl T2_Int
	.type	T2_Int,@function
	.interrupt T2_Int

__.INT5:

T2_Int:
	push	A				;
	push	X				;	
	push	Y				;	

	call	!_T2_Int_Handler		;
	
	pop	Y				;
	pop	X				;
	pop	A				;
	
	reti					;
		

;================================================================== 
;	Remocon Interrupt for Carrier Generation  	 
;================================================================== 

	.sect	.text
	.globl REM_Int
	.type	REM_Int,@function
	.interrupt REM_Int

__.INT3:

REM_Int:
	push	A					;
	push	X					;
	push	Y					;
	
	call	!_REM_Int_Handler			; 

	pop	Y					;
	pop	X					;
	pop	A					;
	
	reti						;

;================================================================== 
;	Watch interrupt for 1 Minute timing  	 
;================================================================== 

	.sect	.text
	.globl Watch_Int
	.type	Watch_Int,@function
	.interrupt Watch_Int

__.INT0:

Watch_Int:

	set1	_rTime_flag.0			; f_Minute
	
	reti						;
	
;================================================================== 
;	Key interrupt for Wake up   	 
;================================================================== 

	.sect	.text
	.globl Key_Int
	.type	Key_Int,@function
	.interrupt Key_Int

__.INT14:

Key_Int:

	ldm	_rStop_Timer, #100		; 200ms 
	
	reti						;
	
;================================================================ 
;	Appendix : Interrupt Vector Table
;================================================================ 
;      org   0FFE0h
;      ;
;	dw    Watch_Int  		;INT0	 WT/WTD 	FFE0
;	dw    No_Interrupt	;INT1	 BIT      	FFE2
;	dw    No_Interrupt	;INT2	 ADC   	FFE4
;	dw    REM_Int	 	;INT3	 Carrier 	FFE6
;	dw    No_Interrupt	;INT4	 Timer3 	FFE8
;	dw    T2_Int		;INT5	 Timer2 	FFEA
;	dw    No_Interrupt	;INT6	 Timer1 	FFEC
;	dw    T0_Int      	;INT7	 Timer0 	FFEE
;	dw    No_Interrupt	;INT8	 Uart1	FFF0
;	dw    No_Interrupt      ;INT9	 Uart0_Tx 	FFF2
;	dw    No_Interrupt      ;INT10 Uart0_Rx	FFF4
;	dw    No_Interrupt	;INT11 External2 	FFF6
;	dw    No_Interrupt 	;INT12 External1	FFF8
;	dw    No_Interrupt	;INT13 External0 	FFFA
;	dw    Key_Int  		;INT14 KeyScan 	FFFC
;	dw    Program_start 	;INT15 Reset  	FFFE
;
;==================================================================*/ 
;/*	the end of Int.s								 */			

⌨️ 快捷键说明

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