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

📄 ini93ml.c

📁 本程序为某企业的税控机固件程序.基于东芝TMP93CS41 16位单片机编写,符合国家标准.该程序已经经过多次长期调试.
💻 C
字号:
/*===================================================================*/
/*            Program setting for TLCS-900/L  [ SAMPLE ]             */
/*                    (On-chip Hardware setting)                     */
/*                      [TMP93CM40]                      */
/*                          Revision: 1.00                           */
/*  This program is examples of program for TMP93CM40.  */
/*  When you use this sample program, you must rewrite to fit your   */
/*  system. And please confirm that there is no mistake about        */
/*  generated object code.                                           */
/*===================================================================*/
/*     Copyright(C) TOSHIBA CORPORATION 2000  All rights reserved    */
/*===================================================================*/
/*===================================================================*/
/*  [ File include part ]                                            */
/*===================================================================*/
#include    "io900l.h"   /* for the reference of I/O */
#include    <stdlib.h>   /* for '__EI()','abort()' and 'exit()' */

/*===================================================================*/
/* [ Prototype of function definition part ]                         */
/*   This part is necessary for main function calling.               */
/*===================================================================*/
void    main(void);         /* For main function calling */

/*===================================================================*/
/* [ Sample of initialize and EI and call main ]                     */
/*   This function is jumped from start up routine in 'stc93ml.mac'. */
/*   Rewrite this part to fit your program.                          */
/*===================================================================*/
void    _Initial(void){
  /*==  Write your initialize routine.      ==*/

  /*===[ Interrupt enable ]==========================================*/
  /*  __EI();                                                 SAMPLE */

  /*===[ Call main function ]========================================*/
  /*  main();                                                 SAMPLE */

  /*===[ Dummy Loop ]================================================*/
  /*  for(;;);                                                SAMPLE */
}

/*===================================================================*/
/* [ Sample of interrupt function ]                                  */
/*   Make interrupt routine to fit your program.                     */
/*===================================================================*/
/*===[ Sample for interrupt :                               ]========*/
/*===[       This function has only one instruction 'RETI'  ]========*/
void    __interrupt    _Int_dummy(void){
}

/*===================================================================*/
/* [ Define interrupt table ]                                        */
/*   Rewrite the base address of interrupt table to fit your target  */
/*   MCU. Write interrupt functions name you made, as initializer    */
/*   of table.                                                       */
/*===================================================================*/
#define  _SecInt_Name  inttbl     /* Section name of interrupt table */
#define _BaseIntTbl     0x8000       /* Interrupt table base address */
#define  _SecInt_Attr  const /* Section attribute of interrupt table */
void     _startup(void);    /* Prototype definition for reset vector */
                      /* This function is defined in a 'stc93ml.mac' */

#pragma  section  _SecInt_Attr  _SecInt_Name  _BaseIntTbl
void * const _IntTbl[] = {
          _startup           /* Reset/SWI 0    */
         ,_Int_dummy         /* SWI 1          */
         ,_Int_dummy         /* INTUNDEF/SWI 2 */
         ,_Int_dummy         /* SWI 3          */
         ,_Int_dummy         /* SWI 4          */
         ,_Int_dummy         /* SWI 5          */
         ,_Int_dummy         /* SWI 6          */
         ,_Int_dummy         /* SWI 7          */
         ,_Int_dummy         /* NMI            */
         ,_Int_dummy         /* INTWD          */
         ,_Int_dummy         /* INT0           */
         ,_Int_dummy         /* INT4           */
         ,_Int_dummy         /* INT5           */
         ,_Int_dummy         /* INT6           */
         ,_Int_dummy         /* INT7           */
         ,_Int_dummy         /* Reserved1      */
         ,_Int_dummy         /* INTT0          */
         ,_Int_dummy         /* INTT1          */
         ,_Int_dummy         /* INTT2          */
         ,_Int_dummy         /* INTT3          */
         ,_Int_dummy         /* INTTR4         */
         ,_Int_dummy         /* INTTR5         */
         ,_Int_dummy         /* INTTR6         */
         ,_Int_dummy         /* INTTR7         */
         ,_Int_dummy         /* INTRX0         */
         ,_Int_dummy         /* INTTX0         */
         ,_Int_dummy         /* INTRX1         */
         ,_Int_dummy         /* INTTX1         */
         ,_Int_dummy         /* INTAD          */
    };

#pragma  section  _SecInt_Attr

/*===================================================================*/
/*    Standard C Library setting for TLCS-900/L  [ SAMPLE ]          */
/*                      [TMP93CM40]                      */
/*                          Revision: 1.00                           */
/*===================================================================*/
/*===================================================================*/
/* [ Configuration part ]                                            */
/*   Following macro value means that:                               */
/*   0 : The function is not used.                                   */
/*   1 : The function is used.                                       */
/*   When you use 'abort' or 'exit' or 'heap area',                  */
/*   Rewrite each program to fit your use.                           */
/*===================================================================*/
#define  __USE_FLOAT    0   /* Change 0 to 1, if use floating point. */
#define  __USE_ABORT    0   /* Change 0 to 1, if use abort function. */
#define  __USE_EXIT     0   /* Change 0 to 1, if use exit function.  */
#define  __USE_HEAP     0   /* Change 0 to 1, if use heap area.      */

#if __USE_FLOAT
/*===================================================================*/
/* [ Define public variable ]                                        */
/*  When use floating point, this part is necessary.                 */
/*  Do not change this part.                                         */
/*  'errno' is reserved word. Do not access to this variable.        */
/*===================================================================*/
int     errno;                        /* Refer from standard library */

#endif      /* __USE_FLOAT */

#if __USE_ABORT
/*===================================================================*/
/* [ Standard library function: abort() ]                            */
/*   When use abort function, this part is necessary.                */
/*   Rewrite this part to fit your program.                          */
/*===================================================================*/
void    abort(void){
  /*=================================================================*/
  /*  Write the process before reset, then jump to your start up     */
  /*  routine.                                                       */
  /*=================================================================*/
  /*  __asm("    j    __startup");                            SAMPLE */
  /*=================================================================*/
}
#endif      /* __USE_ABORT */

#if __USE_EXIT
/*===================================================================*/
/* [ Standard library function: exit() ]                             */
/*   When use exit function, this part is necessary.                 */
/*   Rewrite this part to fit your program.                          */
/*===================================================================*/
void    exit(int status){
  /*=================================================================*/
  /*  Write the process as same as normal program ending.            */
  /*=================================================================*/
  /*  __asm("    halt");                                      SAMPLE */
  /*=================================================================*/
}
#endif      /* __USE_EXIT */

#if __USE_HEAP





#endif      /* __USE_HEAP */

/* End of file */

⌨️ 快捷键说明

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