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

📄 int.s

📁 nuclues plus 源代码程序
💻 S
📖 第 1 页 / 共 3 页
字号:
;    vector_table[vector] =  new;
;
        ldd     4,x                         ; Pickup the new vector off of the
                                            ;   stack
        ldx     0,y                         ; Pickup current vector
        std     0,y                         ; Store the new vector
        xgdx                                ; Move previous vector into return
                                            ;   location
;    
;    /* Return the old interrupt vector.  */
;    return(old_vector);
        pulx                                ; Recover IX
        rts                                 ; Return to caller
;}
;
;
;/*************************************************************************/
;/*                                                                       */
;/* FUNCTION                                                              */
;/*                                                                       */
;/*      INT_Retrieve_Shell                                               */
;/*                                                                       */
;/* DESCRIPTION                                                           */
;/*                                                                       */
;/*      This function retrieves the pointer to the shell interrupt       */
;/*      service routine.  The shell interrupt service routine calls      */
;/*      the LISR dispatch routine.                                       */
;/*                                                                       */
;/* AUTHOR                                                                */
;/*                                                                       */
;/*      William E. Lamie, Accelerated Technology, Inc.                   */
;/*                                                                       */
;/* CALLED BY                                                             */
;/*                                                                       */
;/*      TCC_Register_LISR                   Register LISR for vector     */
;/*                                                                       */
;/* CALLS                                                                 */
;/*                                                                       */
;/*      None                                                             */
;/*                                                                       */
;/* INPUTS                                                                */
;/*                                                                       */
;/*      vector                              Vector number to setup       */
;/*                                                                       */
;/* OUTPUTS                                                               */
;/*                                                                       */
;/*      shell pointer                                                    */
;/*                                                                       */
;/* HISTORY                                                               */
;/*                                                                       */
;/*         NAME            DATE                    REMARKS               */
;/*                                                                       */
;/*      W. Lamie        06-01-1993      Created initial version 1.0      */
;/*      D. Lamie        06-01-1993      Verified version 1.0             */
;/*                                                                       */
;/*************************************************************************/
;VOID  *INT_Retrieve_Shell(INT vector)
;{
        .public _INT_Retrieve_Shell
_INT_Retrieve_Shell:
;
;    /* Return the LISR Shell interrupt routine.  */
;    return(INT_Vectors[vector]);
;
        lsld                                ; Convert the vector into an offset
        addd    #_INT_Vectors               ; Build an absolute address
        xgdy                                ; Move into IY 
        ldd     0,y                         ; Pickup the default vector
        rts                                 ; Return to caller
;}
;
;
;/* The following section contains the default interrupt service routines for
;   this processor.  */
;
        .public _INT_SCI
_INT_SCI:                                   ; SCI Serial System interrupt
        ldd     #0                          ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_SPI
_INT_SPI:                                   ; SPI Transfer Complete interrupt
        ldd     #1                          ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_PA_Input
_INT_PA_Input:                              ; Pulse Accumulator Input Edge int
        ldd     #2                          ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_PA_Overflow
_INT_PA_Overflow:                           ; Pulse Accumulator Overflow int
        ldd     #3                          ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_Timer_Overflow
_INT_Timer_Overflow:                        ; Timer Overflow interrupt
        ldd     #4                          ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_TOC5
_INT_TOC5:                                  ; Timer Output Compare 5 interrupt
        ldd     #5                          ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_TOC4
_INT_TOC4:                                  ; Timer Output Compare 4 interrupt
        ldd     #6                          ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_TOC3
_INT_TOC3:                                  ; Timer Output Compare 3 interrupt
        ldd     #7                          ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_TOC2
_INT_TOC2:                                  ; Timer Output Compare 2 interrupt
        ldd     #8                          ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_TOC1
_INT_TOC1:                                  ; Timer Output Compare 1 interrupt
        ldd     #9                          ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_TIC3
_INT_TIC3:                                  ; Timer Input Capture 3 interrupt
        ldd     #10                         ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_TIC2
_INT_TIC2:                                  ; Timer Input Capture 2 interrupt
        ldd     #11                         ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_TIC1
_INT_TIC1:                                  ; Timer Input Capture 1 interrupt
        ldd     #12                         ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_RTI
_INT_RTI:                                   ; Real-Time interrupt
        ldaa    #TFLG2_VALUE                ; Pickup the RTI clear flag value
        staa    TFLG2                       ; Clear RTI interrupt
        jmp     _TMT_Timer_Interrupt        ; Branch to timer interrupt ISR
;Old Shell
        ldd     #13                         ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_IRQ
_INT_IRQ:                                   ; IRQ External Pin or Parallel I/O
        ldd     #14                         ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_XIRQ
_INT_XIRQ:                                  ; XIRQ interrupt
        ldd     #15                         ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_SWI
_INT_SWI:                                   ; Software interrupt
        ldd     #16                         ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_Illegal_Opcode
_INT_Illegal_Opcode:                        ; Illegal Opcode interrupt
        ldd     #17                         ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_COP_Fail
_INT_COP_Fail:                              ; COP Failed interrupt
        ldd     #18                         ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
        .public _INT_COP_Clock_Fail
_INT_COP_Clock_Fail:                        ; COP Clock Failed interrupt
        ldd     #19                         ; Vector number
        bra     _INT_Interrupt_Shell        ; Branch to interrupt shell
;
;
;
        .public _INT_Interrupt_Shell
_INT_Interrupt_Shell:
;
; NOTE: D containt the responsible interrupt vector.  
;
        jbsr    _TCT_Interrupt_Context_Save
        jbsr    _TCC_Dispatch_LISR
        jmp     _TCT_Interrupt_Context_Restore        
;
;
;
;
        .end

⌨️ 快捷键说明

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