;-------------------------------------------------------------------------
; STRUCTURE OF THE INITIALIZATION INFORMATION
; -------------------------------------------
; This section describes the initialization data generated by C51 for
; explicit variable initializations (in segment ?C_INITSEC).
;
; Explicit variable initilizations at C source level are stored by C51 in
; the segment ?C_INITSEC. All partial segments are combined at linker level
; to one segment. The segment end value DB 0 is taken from this library module
; INIT.A51.
;
; Structure of the ?C_INITSEC information:
; (see below) [BYTE] ----+ repeated
; [BYTES depend on Info] ----+ repeated
; 0x00 [BYTE]
;
; has the following format:
;
; Bit 7 6 5 4 3 2 1 0
; T T B L L L L L T=Type B=BIGBIT L=LENGTH
;
; If BIGBIT is set, another LENGTH BYTE FOLLOWS. The LENGHT
; info of the first byte is then the HIGH part.
;
; Typ is one of the following:
; 0 := IDATA init values; the following bytes follow:
; - 1 byte address
; - init data bytes according LENGTH specification
;
; 1 := XDATA init values; the following bytes follow:
; - 2 byte address (high byte first)
; - init data bytes according LENGTH specification
;
; 2 := PDATA init values; the following bytes follow:
; - 1 byte address
; - init data bytes according LENGTH specification
;
; 3, BIGBIT=0 := BIT init values; the followign bytes follow:
; - 1 byte for each bit according LENGTH specification
; this byte has the following format:
;
; Bit 7 6 5 4 3 2 1 0
; I B B B B B B B I := state of the bit
; B := bit address
;
; 3, BIGBIT=1 := HDATA init values; the following bytes follow:
; - another LENGTH byte (since BIGBIT is always 1)
; - 3 byte address (MSB first)
; - data bytes according LENGTH specification
;
;----------------------------------------------------------------------
引用 2 楼 schlafenhamster 的回复:
;-------------------------------------------------------------------------
; STRUCTURE OF THE INITIALIZATION INFORMATION
; -------------------------------------------
; This section describes the i……
在http://www.keil.com/support/man/docs/c51/c51_ap_startup.htm上有说明
Startup code is executed immediately upon reset of the target system. The Keil startup code performs (optionally) the following operations in order:
Clears internal data memory
Clears external data memory
Clears paged external data memory
Initializes the small model reentrant stack and pointer
Initializes the large model reentrant stack and pointer
Initializes the compact model reentrant stack and pointer
Initializes the 8051 hardware stack pointer
Transfers control to code that initializes global variables or to the main C function if there are no initialized global variables