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

📄 int_5307.s

📁 mcf5307开发板上进行iic接口实验
💻 S
📖 第 1 页 / 共 5 页
字号:
_INT_Vectors_Loaded:;INT    INT_Vectors_Loaded(void);{;;    /* Just return the loaded vectors flag.  */;    return(INT_Loaded_Flag);;        MOVE.L  _INT_Loaded_Flag,D0         ; Put the flag into D0        RTS                                 ; Return to caller;};;;/*************************************************************************/;/*                                                                       */;/* FUNCTION                                                              */;/*                                                                       */;/*      INT_Setup_Vector                                                 */;/*                                                                       */;/* DESCRIPTION                                                           */;/*                                                                       */;/*      This function sets up the specified vector with the new vector   */;/*      value.  The previous vector value is returned to the caller.     */;/*                                                                       */;/* AUTHOR                                                                */;/*                                                                       */;/*      Barry Sellew, Accelerated Technology, Inc.                       */;/*                                                                       */;/* CALLED BY                                                             */;/*                                                                       */;/*      Application                                                      */;/*      TCC_Register_LISR                   Register LISR for vector     */;/*                                                                       */;/* CALLS                                                                 */;/*                                                                       */;/*      None                                                             */;/*                                                                       */;/* INPUTS                                                                */;/*                                                                       */;/*      vector                              Vector number to setup       */;/*      new                                 Pointer to new assembly      */;/*                                            language ISR               */;/*                                                                       */;/* OUTPUTS                                                               */;/*                                                                       */;/*      old vector contents                                              */;/*                                                                       */;/* HISTORY                                                               */;/*                                                                       */;/*         NAME            DATE                    REMARKS               */;/*                                                                       */;/*	 B. Sellew	 04-28-1998	 Created and verified version 1.0 */;/*                                                                       */;/*************************************************************************/        XDEF    _INT_Setup_Vector_INT_Setup_Vector:;VOID  *INT_Setup_Vector(INT vector, VOID *new);{;;VOID    *old_vector;                        /* Old interrupt vector      */;VOID   **vector_table;                      /* Pointer to vector table   */;;    /* Calculate the starting address of the actual vector table.  */;    vector_table =  (VOID **) 0x0;;        MOVEA.L #0,A0                       ; Pointer to the vector table;;    /* Pickup the old interrupt vector.  */;    old_vector =  vector_table[vector];;        MOVE.L  4(A7),D0                    ; Pickup the vector number        LSL.L   #2,D0                       ; Adjust for the vector size        ADDA.L  D0,A0                       ; Add in offset to vector base        MOVE.L  (A0),D0                     ; Pickup previous vector;    ;    /* Setup the new interrupt vector.  */;    vector_table[vector] =  new;;        MOVE.L  8(A7),D1                    ; Pickup the new vector pointer        MOVE.L  D1,(A0)                     ; Store it in the vector table;    ;    /* Return the old interrupt vector.  */;    return(old_vector);;        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                                                                */;/*                                                                       */;/*      Barry Sellew, 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               */;/*                                                                       */;/*	 B. Sellew	 04-28-1998	 Created and verified version 1.0 */;/*                                                                       */;/*************************************************************************/        XDEF    _INT_Retrieve_Shell_INT_Retrieve_Shell:;VOID  *INT_Retrieve_Shell(INT vector);{;;    /* Return the LISR Shell interrupt routine.  */;    return(INT_Vectors[vector]);;        LEA     _INT_Vectors,A0             ; Build address to default ISRs        MOVE.L  4(A7),D1                    ; Pickup the vector number        ASL.L   #2,D1                       ; Multiply by 4	MOVE.L	(0,A0,D1),D0                ; Pickup the default ISR        RTS                                 ; Return to caller;};;;/* The following area contains the default interrupt vector processing for;   each interrupt.  Note:  Nothing else can be placed between the ;   INT_Start_ISRs label and the INT_End_ISRs label.  */;        XDEF    _INT_Start_ISRs_INT_Start_ISRs:;;_INT_Bus_Error:                             ; Bus Error                 2        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Address_Error:                         ; Address Error             3        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Illegal_Instruction:                   ; Illegal Instruction       4        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Zero_Divide:                           ; Divide by zero            5        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Chk_Chk2:                              ; CHK and CHK2 instructions 6        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_TrapV:                                 ; TRAPV instruction         7        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Privilege:                             ; Privilege violation       8        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Trace:                                 ; Trace                     9        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Emul_A:                                ; Emulate A                 10        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Emul_B:                                ; Emulate B                 11        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Hdw_Breakpoint:                        ; Hardware breakpoint       12        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Coprocessor_Violate:                   ; Coprocessor violation     13        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Format_Error:                          ; Format error              14        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Uninitialized_Int:                     ; Uninitialized interrupt   15        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Reserved_0:                            ; Reserved 0                16        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Reserved_1:                            ; Reserved 1                17        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Reserved_2:                            ; Reserved 2                18        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Reserved_3:                            ; Reserved 3                19        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Reserved_4:                            ; Reserved 4                20        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Reserved_5:                            ; Reserved 5                21        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Reserved_6:                            ; Reserved 6                22        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Reserved_7:                            ; Reserved 7                23        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Spurious:                              ; Spurious interrupt        24        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Level_1_Auto:                          ; Level 1 Autovector        25        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Level_2_Auto:                          ; Level 2 Autovector        26        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Level_3_Auto:                          ; Level 3 Autovector        27        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Level_4_Auto:                          ; Level 4 Autovector        28        BSR.W   _INT_Interrupt_Shell        ; Branch to interrupt shell;_INT_Level_5_Auto:                          ; Level 5 Autovector        29

⌨️ 快捷键说明

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