📄 int.s
字号:
;/*************************************************************************/
;/* */
;/* Copyright (c) 1993-1994 Accelerated Technology, Inc. */
;/* */
;/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */
;/* subject matter of this material. All manufacturing, reproduction, */
;/* use, and sales rights pertaining to this subject matter are governed */
;/* by the license agreement. The recipient of this software implicitly */
;/* accepts the terms of the license. */
;/* */
;/*************************************************************************/
;
;/*************************************************************************/
;/* */
;/* FILE NAME VERSION */
;/* */
;/* int.s PLUS/68HC11/I 1.2 */
;/* */
;/* COMPONENT */
;/* */
;/* IN - Initialization */
;/* */
;/* DESCRIPTION */
;/* */
;/* This file contains the target processor dependent initialization */
;/* routines and data. */
;/* */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Accelerated Technology, Inc. */
;/* */
;/* DATA STRUCTURES */
;/* */
;/* INT_Vectors Interrupt vector table */
;/* */
;/* FUNCTIONS */
;/* */
;/* INT_Initialize Target initialization */
;/* INT_Vectors_Loaded Returns a NU_TRUE if all the */
;/* default vectors are loaded */
;/* INT_Setup_Vector Sets up an actual vector */
;/* */
;/* DEPENDENCIES */
;/* */
;/* nucleus.h System constants */
;/* */
;/* HISTORY */
;/* */
;/* NAME DATE REMARKS */
;/* */
;/* W. Lamie 06-01-1993 Created initial version 1.0 */
;/* D. Lamie 06-01-1993 Verified version 1.0 */
;/* W. Lamie 08-09-1993 Removed timer task setup and */
;/* modified timer HISR comment, */
;/* resulting in version 1.0a */
;/* D. Lamie 08-09-1993 Verified version 1.0a */
;/* K. Homer 03-01-1994 Changed copyright, resulting in */
;/* version 1.1 */
;/* D. Lamie 03-18-1994 Verified version 1.1 */
;/* M. Trippi 06-12-1996 New NUCLEUS.H created version 1.2*/
;/* */
;/*************************************************************************/
;#define NU_SOURCE_FILE
;
;#include "nucleus.h" /* System constants */
;
;
;/* Define the global system stack variable. This is setup by the
; initialization routine. */
;
;extern VOID *TCD_System_Stack;
;
.external _TCD_System_Stack
;
;
;/* Define the global data structures that need to be initialized by this
; routine. These structures are used to define the system timer management
; HISR. */
;
;extern VOID *TMD_HISR_Stack_Ptr;
;extern UNSIGNED TMD_HISR_Stack_Size;
;extern INT TMD_HISR_Priority;
;
.external _TMD_HISR_Priority
.external _TMD_HISR_Stack_Size
.external _TMD_HISR_Stack_Ptr
.external _INT_Vectors
;
;
;/* Define extern function references. */
;
;VOID INC_Initialize(VOID *first_available_memory);
;VOID TCT_Interrupt_Context_Save(VOID);
;VOID TCT_Interrupt_Context_Restore(VOID);
;VOID TCC_Dispatch_LISR(INT vector_number);
;STATUS TCT_Activate_HISR(TC_HCB *hisr);
;VOID TMT_Timer_Interrupt(void);
;
.external _INC_Initialize
.external _TCT_Interrupt_Context_Save
.external _TCT_Interrupt_Context_Restore
.external _TCC_Dispatch_LISR
.external _TCT_Activate_HISR
.external _TMT_Timer_Interrupt
.external __stext
;
;
.psect _bss
;/* Define the initialization flag that indicates whether or not all of the
; default vectors have been loaded during initialization. */
;
;INT INT_Loaded_Flag;
;
.public _INT_Loaded_Flag
_INT_Loaded_Flag:
.byte [2]
;
;
;/* Normally, the interrupt vector table is defined in INT.S. However, the
; tools do not provide a mechanism for creating new sections and therefore
; the vector table must be in a separate file in order for it to be loaded
; at the absolute address 0xFFD6. See INT_Vectors.s for the vector table
; description. */
;
;
;/* Define equates for the timer HISR stack size and priority. */
;
.define HISRSIZE = 0200H
.define HISRPRI = 0H
.define VECTORS = 0FFD6H
;
;/* Define equates for access to 68HC11 peripherals. */
;
.define TMSK2 = 00024H
.define TFLG2 = 00025H
.define PACTL = 00026H
;
;/* Define values for the on-chip peripherals. */
;
.define TMSK2_VALUE = 040H ; RTI Interrupt mode
.define TFLG2_VALUE = 040H ; Clear RTI interrupt flag
.define PACTL_VALUE = 002H ; Define 16ms RTI interrupt
; for an 8MHz part
;
;
.psect _text
;/*************************************************************************/
;/* */
;/* FUNCTION */
;/* */
;/* INT_Initialize */
;/* */
;/* DESCRIPTION */
;/* */
;/* This function sets up the global system stack variable and */
;/* transfers control to the target independent initialization */
;/* function INC_Initialize. Responsibilities of this function */
;/* include the following: */
;/* */
;/* - Setup necessary processor/system control registers */
;/* - Initialize the vector table */
;/* - Setup the system stack */
;/* - Setup the timer interrupt */
;/* - Calculate the timer HISR stack and priority */
;/* - Calculate the first available memory address */
;/* - Transfer control to INC_Initialize to initialize all of */
;/* the system components. */
;/* */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Accelerated Technology, Inc. */
;/* */
;/* CALLED BY */
;/* */
;/* startup code (__stext) */
;/* */
;/* CALLS */
;/* */
;/* INC_Initialize Common initialization */
;/* */
;/* INPUTS */
;/* */
;/* None */
;/* */
;/* OUTPUTS */
;/* */
;/* None */
;/* */
;/* HISTORY */
;/* */
;/* NAME DATE REMARKS */
;/* */
;/* W. Lamie 06-01-1993 Created initial version 1.0 */
;/* D. Lamie 06-01-1993 Verified version 1.0 */
;/* W. Lamie 08-09-1993 Removed timer task setup and */
;/* modified timer HISR comment, */
;/* resulting in version 1.0a */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -