vectors.asm

来自「该代码采用c5400dsp的汇编语言和c语言实现ucos操作系统」· 汇编 代码 · 共 154 行

ASM
154
字号

;*******************************************************************************
; Module Name:      Interrupt_Vectors
;******************************** GLOBALS **************************************
; E X T E R N A L   D E F I N I T I O N S
;
;   MODULE ENTRY POINT:
        .def   Interrupt_Vectors
;
;   MODULO MEMORY
;   NON-MODULO MEMORY
;   CONSTANTS
;   FLAGS
;
; E X T E R N A L   R E F E R E N C E S
;       .include ""
;   SUBROUTINES CALLED
	.ref  _c_int00, _OSTickISR, _OSCtxSw,_hpi_int;
;   CONSTANTS
;   MODULO MEMORY
;   .bss                         ;used to declare uninitialized data memory
;                                ; syntax: .bss symbol_name,word_size,[blocking flag]
;   .data                        ;used to declare initialized data memory
;   NON MODULO MEMORY
;   FLAGS
;********************************* LOCALS *************************************
; DEFINITIONS:
;
; MODULO MEMORY
; NON MODULO MEMORY

;*********************************   BODY   ***********************************
        .sect  ".vectors"      ; We will want to move to an internal location --
                               ; say 0x2000. Do this with the linker... 
Interrupt_Vectors:             ; 
                      ;
Reset_int:                     ;
         BD _c_int00 ;Reset vector vector (vector_base + 0x0)
         nop
         nop          ;
NMI_int:
        NOP
		NOP
		NOP
		nop                    ;
SINT17:                        ;
         bd _OSCtxSw			; context switch
         nop                   ;
         nop                   ;
SINT18:                        ;
         bd  SINT18            ;Software Interrupt 18 Vector  (vector_base + 0xC)
         nop                   ;
         nop                   ;
SINT19:                        ;
         bd  SINT19            ;Software Interrupt 19 Vector  (vector_base + 0x10)
         nop                   ;
         nop                   ;
SINT20:                        ;
         bd  SINT20            ;Software Interrupt 20 Vector  (vector_base + 0x14)
         nop                   ;
         nop                   ;
SINT21:                        ;
         bd  SINT21            ;Software Interrupt 21 Vector  (vector_base + 0x18)
         nop                   ;
         nop                   ;
SINT22:                        ;
         bd  SINT22            ;Software Interrupt 22 Vector  (vector_base + 0x1C)
         nop                   ;
         nop                   ;
SINT23:                        ;
         bd  SINT23            ;Software Interrupt 23 Vector  (vector_base + 0x20)
         nop                   ;
         nop                   ;
SINT24:                        ;
         bd  SINT24            ;Software Interrupt 24 Vector  (vector_base + 0x24)
         nop                   ;
         nop                   ;
SINT25:                        ;
         bd  SINT25            ;Software Interrupt 25 Vector  (vector_base + 0x28)
         nop                   ;
         nop                   ;
SINT26:                        ;
         bd  SINT26            ;Software Interrupt 26 Vector  (vector_base + 0x2C)
         nop                   ;
         nop                   ;
SINT27:                        ;
         bd  SINT27            ;Software Interrupt 27 Vector  (vector_base + 0x30)
         nop                   ;
         nop                   ;
SINT28:                        ;
         bd  SINT28            ;Software Interrupt 28 Vector  (vector_base + 0x34)
         nop                   ;
         nop                   ;
SINT29:                        ;
         bd  SINT29            ;Software Interrupt 29 Vector  (vector_base + 0x38)
         nop                   ;
         nop                   ;
SINT30:                        ;
         bd  SINT30            ;Software Interrupt 30 Vector  (vector_base + 0x3C)
         nop                   ;
         nop                   ;
DI_INT0: nop;
         nop                  ; nop	               ;
         nop  
	                       ;
DMT_INT: rete;
         nop;
         nop                   ; nop	               ;
         nop
	                       ;
DI_ISR: 
	 rete					;
	 nop					;	               
	 nop	               ;
	 nop	               ;
                               ;
Timer_INT:                     ;
	     nop;
	     call _OSTickISR	;
	     rete;
rint0:  rete  					;_rint0_int
        NOP 					; Interrupt 0
		NOP
		NOP
xint0:  RETE 					; Serial Port Transmit
		NOP
		NOP
		NOP
rint2:  RETE 					; Serial Port Receive
		NOP 					; Interrupt 1
		NOP
		NOP
xint2:  RETE 					; Serial Port Transmit
		NOP 					; Interrupt 1
		NOP
		NOP
int3:  RETE
		NOP
		NOP ; 
		NOP
hintp:  nop;
	    call  _hpi_int
	    rete
	    
rint1:	RETE ;BD  _rint1_int				
        NOP
		NOP
		NOP
xint1:  RETE
		NOP
		NOP
		NOP		
		.space 4*16
.end       

⌨️ 快捷键说明

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