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

📄 cstartup.lst

📁 740的程序的参考程序
💻 LST
📖 第 1 页 / 共 3 页
字号:
###############################################################################
#                                                                             #
#     IAR Systems 740 Assembler V2.17A/W32 16/Nov/2005  23:06:02              #
#     Copyright 1995-2003 IAR Systems. All rights reserved.                   #
#                                                                             #
#           Target option =  740 with MUL/DIV                                 #
#           Source file   =  cstartup.s31                                     #
#           List file     =  cstartup.lst                                     #
#           Object file   =  .\cstartup.r31                                   #
#           Command line  =  -uN -r -L -v0 -o .\cstartup.r31 cstartup.s31     #
#                                                                             #
###############################################################################

      1    000000          ;---------------------------------------------------
                           ------------
      2    000000          ;
      3    000000          ;          cstartup.s31
      4    000000          ;
      5    000000          ; This file contains the MELPS 740 C startup
                            routine
      6    000000          ; and must usually be tailored to suit customer's
                            hardware.
      7    000000          ;
      8    000000          ;
      9    000000          ; You probably want to set up the mode register and
                            you may
     10    000000          ; have to change the reset vector.
     11    000000          ;
     12    000000          ; $Id: cstartup.s31 1.16 2001/07/16 14:16:13Z IJON
                            Exp $
     13    000000          ;
     14    000000          ;---------------------------------------------------
                           ------------
     15    000000          
     16    000000          
     17    000000          #if 0
     18    000000          #if ((__TID__ >> 4) & 15) == 0
     19    000000          #define MELPS_MULDIV
     20    000000          #endif
     22    000000          #if ((__TID__ >> 4) & 15) == 2
     23    000000          #define MELPS_37600
     24    000000          #endif
     25    000000          #endif
     26    000000          
     27    000000          ;---------------------------------------------------
                           ------------
     28    000000          ; Turning off 'interruptable ISRs':
     29    000000          ; Do this if you need the extra byte(s)
     30    000000          ;
     31    000000          ; 1. Uncomment the define below
     32    000000          ; 2. Assemble this file
     33    000000          ; 3. Include the result in your linker command
                            file:
     34    000000          ;    -C cstartup.r31
     35    000000          ;
     36    000000          ; Variable '?IES_USAGE' and its initialization will
                            no longer
     37    000000          ; be included.
     38    000000          ;---------------------------------------------------
                           ------------
     39    000000          ;#define NO_INTERRUPTABLE_ISR
     40    000000          
     41    000000          
     42    000000          
     43    000000                  NAME  CSTARTUP
     44    000000          
     45    000000                  EXTERN  main                    ; where to
                                                                    begin
                                                                    execution
     46    000000                  EXTERN  __low_level_init
     47    000000                  DEFFN   __low_level_init(32768,0,0,0)
     48    000000                  EXTERN  exit                    ; where to
                                                                    go when
                                                                    program is
                                                                    done
     49    000000                  DEFFN   exit(32770,0,0,0)
     50    000000          
     51    000000                  PUBLIC  ?INTERRUPT_EXPR_STACK   ; Start
                                                                    address for
                                                                    interrupt
     52    000000          
     53    000000                  PUBLIC  ?CSTARTUP_INTVEC ; start (base
                                                             address) of
                                                             interrupt
                                                             vector
     54    000000                  PUBLIC  ?CSTARTUP_RESETVEC      ; Location
                                                                    of reset
                                                                    vector
     55    000000          
     56    000000          
     57    000000          ;---------------------------------------------------
                           ------------;
     58    000000          ;  CSTACK - The C stack segment                     
                                       ;
     59    000000          ;                                                   
                                       ;
     60    000000          ;  Please, see in the link file lnk*.xcl how to
                            increment       ;
     61    000000          ;  the stack size without having to reassemble
                            cstartup.s31 !   ;
     62    000000          ;---------------------------------------------------
                           ------------;
     63    000000          
     64    000000                  RSEG  CSTACK:ROOT
     65    000000                  BLKB  0
     66    000000          
     67    000000          ;---------------------------------------------------
                           ------------;
     68    000000          ;  EXPR_STACK - The expression stack segment        
                                       ;
     69    000000          ;                                                   
                                       ;
     70    000000          ;  Please, see in the link file lnk*.xcl how to
                            increment       ;
     71    000000          ;  the stack size without having to reassemble
                            cstartup.s31 !   ;
     72    000000          ;---------------------------------------------------
                           ------------;
     73    000000          
     74    000000                  RSEG    EXPR_STACK:ROOT
     75    000000                  BLKB    0
     76    000000          
     77    000000          
     78    000000          ;---------------------------------------------------
                           ------------;
     79    000000          ;  INT_EXPR_STACK - The interrupt expression stack
                            segment      ;
     80    000000          ;                                                   
                                       ;
     81    000000          ;  Please, see in the link file lnk*.xcl how to
                            increment       ;
     82    000000          ;  the stack size without having to reassemble
                            cstartup.s31 !   ;
     83    000000          ;---------------------------------------------------
                           ------------;
     84    000000          
     85    000000                  RSEG    INT_EXPR_STACK:ROOT
     86    000000                  BLKB    0
     87    000000          
     88    000000          
     89    000000          #ifndef NO_INTERRUPTABLE_ISR
     90    000000          ;---------------------------------------------------
                           ------------;
     91    000000          ;  ?IES_USAGE - Determines if the IES is setup and
                            used.
     92    000000          ;
     93    000000          ;  This variable is used for interrupt functions
                            when compiling
     94    000000          ;  with the '-h' option.
     95    000000          ;---------------------------------------------------
                           ------------;
     96    000000          
     97    000000                  RSEG    ZPAGE
     98    000000                  PUBLIC  ?IES_USAGE
     99    000000          ?IES_USAGE:
    100    000000                  BLKB    1
    101    000001          #endif
    102    000001          
    103    000001          
    104    000001          ;---------------------------------------------------
                           ------------;
    105    000001          ; This will insert the information needed by
                            interrupts who use ;
    106    000001          ; the interrupt expression stack. Do not alter it!  
                                       ;
    107    000001          ;---------------------------------------------------
                           ------------;
    108    000001          
    109    000000                  RSEG  CONST
    110    000000          ?INTERRUPT_EXPR_STACK:
    111    000000 ..               BYTE  SFE(INT_EXPR_STACK)
    112    000001          
    113    000001          ;---------------------------------------------------
                           ------------;
    114    000001          ;  Forward declarations of segment used during
                            initialization   ;
    115    000001          ;---------------------------------------------------
                           ------------;
    116    000000                  RSEG  Z_UDATA
    117    000000                  RSEG  Z_IDATA
    118    000000                  RSEG  Z_CDATA
    119    000000                  RSEG  N_UDATA
    120    000000                  RSEG  N_IDATA
    121    000000                  RSEG  N_CDATA
    122    000000                  RSEG  ECSTR
    123    000000                  RSEG  RF_STACK
    124    000000          
    125    000000                  RSEG  CCSTR
    126    000000                  RSEG  CONST
    127    000000                  RSEG  CSTR
    128    000000          
    129    000000          
    130    000000          ;---------------------------------------------------
                           ------------;
    131    000000          ;  RCODE - where the execution actually begins      
                                       ;
    132    000000          ;---------------------------------------------------
                           ------------;
    133    000000                  RSEG  RCODE:ROOT
    134    000000          init_C
    135    000000 D8               CLD                             ; set
                                                                    default
                                                                    mode
    136    000001 12               CLT
    137    000002 3C0C3B           LDM  #0CH, 3BH                  ; set stack
                                                                    page : 3803
                                                                    Group
    138    000005 A2..             LDX  #LOW (SFE(CSTACK)-1)       ; set up
                                                                    stack
                                                                    pointer
    139    000007 9A               TXS
    140    000008          
    141    000008          #ifndef NO_INTERRUPTABLE_ISR
    142    000008          ;---------------------------------------------------
                           ------------;
    143    000008          ;  Initialize ?IES_USAGE:

⌨️ 快捷键说明

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