×
单片机 > 单片机程序设计 > 详情

单片机成长之路(51基础篇) - 018 keil51的STARTUP.A51

发布时间:2020-12-31 发布时间:
|

STARTUP.A51原始文件:


  1 $NOMOD51;Ax51宏汇编器控制命令,禁止预定义的8051。使编译器不使能预定义的;8051符号,避免产生重复定义的错误。

  2 ;------------------------------------------------------------------------------

  3 ;  This file is part of the C51 Compiler package

  4 ;  Copyright (c) 1988-2005 Keil Elektronik GmbH and Keil Software, Inc.

  5 ;  Version 8.01

  6 ;

  7 ;  *** <<< Use Configuration Wizard in Context Menu >>> ***

  8 ;------------------------------------------------------------------------------

  9 ;  STARTUP.A51:  This code is executed after processor reset.

 10 ;

 11 ;  To translate this file use A51 with the following invocation:

 12 ;

 13 ;     A51 STARTUP.A51

 14 ;

 15 ;  To link the modified STARTUP.OBJ file to your application use the following

 16 ;  Lx51 invocation:

 17 ;

 18 ;     Lx51 your object file list, STARTUP.OBJ  controls

 19 ;

 20 ;------------------------------------------------------------------------------

 21 ;

 22 ;  User-defined Power-On Initialization of Memory

 23 ;

 24 ;  With the following EQU statements the initialization of memory

 25 ;  at processor reset can be defined:

 26 ;

 27 ; IDATALEN: IDATA memory size <0x0-0x100>

 28 ;      Note: The absolute start-address of IDATA memory is always 0

 29 ;            The IDATA space overlaps physically the DATA and BIT areas.

 30 IDATALEN        EQU     80H

 31 ;

 32 ; XDATASTART: XDATA memory start address <0x0-0xFFFF> 

 33 ;      The absolute start address of XDATA memory

 34 XDATASTART      EQU     0     

 35 ;

 36 ; XDATALEN: XDATA memory size <0x0-0xFFFF> 

 37 ;      The length of XDATA memory in bytes.

 38 XDATALEN        EQU     0      

 39 ;

 40 ; PDATASTART: PDATA memory start address <0x0-0xFFFF> 

 41 ;      The absolute start address of PDATA memory

 42 PDATASTART      EQU     0H

 43 ;

 44 ; PDATALEN: PDATA memory size <0x0-0xFF> 

 45 ;      The length of PDATA memory in bytes.

 46 PDATALEN        EQU     0H

 47 ;

 48 ;

 49 ;------------------------------------------------------------------------------

 50 ;

 51 ; Reentrant Stack Initialization

 52 ;

 53 ;  The following EQU statements define the stack pointer for reentrant

 54 ;  functions and initialized it:

 55 ;

 56 ; Stack Space for reentrant functions in the SMALL model.

 57 ;  IBPSTACK: Enable SMALL model reentrant stack

 58 ;      Stack space for reentrant functions in the SMALL model.

 59 IBPSTACK        EQU     0       ; set to 1 if small reentrant is used.

 60 ;  IBPSTACKTOP: End address of SMALL model stack <0x0-0xFF>

 61 ;      Set the top of the stack to the highest location.

 62 IBPSTACKTOP     EQU     0xFF +1     ; default 0FFH+1  

 63 ;

 64 ;

 65 ; Stack Space for reentrant functions in the LARGE model.      

 66 ;  XBPSTACK: Enable LARGE model reentrant stack

 67 ;      Stack space for reentrant functions in the LARGE model.

 68 XBPSTACK        EQU     0       ; set to 1 if large reentrant is used.

 69 ;  XBPSTACKTOP: End address of LARGE model stack <0x0-0xFFFF>

 70 ;      Set the top of the stack to the highest location.

 71 XBPSTACKTOP     EQU     0xFFFF +1   ; default 0FFFFH+1 

 72 ;

 73 ;

 74 ; Stack Space for reentrant functions in the COMPACT model.    

 75 ;  PBPSTACK: Enable COMPACT model reentrant stack

 76 ;      Stack space for reentrant functions in the COMPACT model.

 77 PBPSTACK        EQU     0       ; set to 1 if compact reentrant is used.

 78 ;

 79 ;    PBPSTACKTOP: End address of COMPACT model stack <0x0-0xFFFF>

 80 ;      Set the top of the stack to the highest location.

 81 PBPSTACKTOP     EQU     0xFF +1     ; default 0FFH+1  

 82 ;

 83 ;

 84 ;------------------------------------------------------------------------------

 85 ;

 86 ;  Memory Page for Using the Compact Model with 64 KByte xdata RAM

 87 ;  Compact Model Page Definition

 88 ;

 89 ;  Define the XDATA page used for PDATA variables. 

 90 ;  PPAGE must conform with the PPAGE set in the linker invocation.

 91 ;

 92 ; Enable pdata memory page initalization

 93 PPAGEENABLE     EQU     0       ; set to 1 if pdata object are used.

 94 ;

 95 ; PPAGE number <0x0-0xFF> 

 96 ; uppermost 256-byte address of the page used for PDATA variables.

 97 PPAGE           EQU     0

 98 ;

 99 ; SFR address which supplies uppermost address byte <0x0-0xFF> 

100 ; most 8051 variants use P2 as uppermost address byte

101 PPAGE_SFR       DATA    0A0H

102 ;

103 ;

104 ;------------------------------------------------------------------------------

105 

106 ; Standard SFR Symbols 

107 ACC     DATA    0E0H

108 B       DATA    0F0H

109 SP      DATA    81H

110 DPL     DATA    82H

111 DPH     DATA    83H

112 

113                 NAME    ?C_STARTUP

114 

115 

116 ?C_C51STARTUP   SEGMENT   CODE

117 ?STACK          SEGMENT   IDATA

118 

119                 RSEG    ?STACK

120                 DS      1

121 

122                 EXTRN CODE (?C_START)

123                 PUBLIC  ?C_STARTUP

124 

125                 CSEG    AT      0

126


『本文转载自网络,版权归原作者所有,如有侵权请联系删除』

热门文章 更多
51单片机CO2检测显示程序解析