📄 startup.lst
字号:
A51 MACRO ASSEMBLER STARTUP 09/19/2005 08:41:27 PAGE 1
MACRO ASSEMBLER A51 V7.01
OBJECT MODULE PLACED IN STARTUP.OBJ
ASSEMBLER INVOKED BY: C:\keil\C51\BIN\A51.EXE STARTUP.ASM SET(SMALL) DEBUG EP
LOC OBJ LINE SOURCE
1
2 ; CODE form Keil
3 ; Modified by geweidong
4 ; - remove all memory initialization instructions
5
6 $nomod51
7 ;------------------------------------------------------------------------------
8 ; This file is part of the C51 Compiler package
9 ; Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
10 ;------------------------------------------------------------------------------
11 ; STARTUP.A51: This code is executed after processor reset.
12 ;
13 ; To translate this file use A51 with the following invocation:
14 ;
15 ; A51 STARTUP.A51
16 ;
17 ; To link the modified STARTUP.OBJ file to your application use the following
18 ; BL51 invocation:
19 ;
20 ; BL51 <your object file list>, STARTUP.OBJ <controls>
21 ;
22 ;------------------------------------------------------------------------------
23 ;
24 ; User-defined Power-On Initialization of Memory
25 ;
26 ; With the following EQU statements the initialization of memory
27 ; at processor reset can be defined:
28 ;
29 ; ; the absolute start-address of IDATA memory is always 0
0080 30 IDATALEN EQU 80H ; the length of IDATA memory in bytes.
31 ;
0000 32 XDATASTART EQU 0H ; the absolute start-address of XDATA memory
0000 33 XDATALEN EQU 0H ; the length of XDATA memory in bytes.
34 ;
0000 35 PDATASTART EQU 0H ; the absolute start-address of PDATA memory
0000 36 PDATALEN EQU 0H ; the length of PDATA memory in bytes.
37 ;
38 ; Notes: The IDATA space overlaps physically the DATA and BIT areas of the
39 ; 8051 CPU. At minimum the memory space occupied from the C51
40 ; run-time routines must be set to zero.
41 ;------------------------------------------------------------------------------
42 ;
43 ; Reentrant Stack Initilization
44 ;
45 ; The following EQU statements define the stack pointer for reentrant
46 ; functions and initialized it:
47 ;
48 ; Stack Space for reentrant functions in the SMALL model.
0000 49 IBPSTACK EQU 0 ; set to 1 if small reentrant is used.
0100 50 IBPSTACKTOP EQU 0FFH+1 ; set top of stack to highest location+1.
51 ;
52 ; Stack Space for reentrant functions in the LARGE model.
0000 53 XBPSTACK EQU 0 ; set to 1 if large reentrant is used.
0000 54 XBPSTACKTOP EQU 0FFFFH+1; set top of stack to highest location+1.
55 ;
56 ; Stack Space for reentrant functions in the COMPACT model.
0000 57 PBPSTACK EQU 0 ; set to 1 if compact reentrant is used.
0000 58 PBPSTACKTOP EQU 0FFFFH+1; set top of stack to highest location+1.
A51 MACRO ASSEMBLER STARTUP 09/19/2005 08:41:27 PAGE 2
59 ;
60 ;------------------------------------------------------------------------------
61 ;
62 ; Page Definition for Using the Compact Model with 64 KByte xdata RAM
63 ;
64 ; The following EQU statements define the xdata page used for pdata
65 ; variables. The EQU PPAGE must conform with the PPAGE control used
66 ; in the linker invocation.
67 ;
0000 68 PPAGEENABLE EQU 0 ; set to 1 if pdata object are used.
69 ;
0000 70 PPAGE EQU 0 ; define PPAGE number.
71 ;
00A0 72 PPAGE_SFR DATA 0A0H ; SFR that supplies uppermost address byte
73 ; (most 8051 variants use P2 as uppermost address byte)
74 ;
75 ;------------------------------------------------------------------------------
76
77 ; Standard SFR Symbols
00E0 78 ACC DATA 0E0H
00F0 79 B DATA 0F0H
0081 80 SP DATA 81H
0082 81 DPL DATA 82H
0083 82 DPH DATA 83H
83
84 NAME ?C_STARTUP
85
86
87 ?C_C51STARTUP SEGMENT CODE
88 ?STACK SEGMENT IDATA
89
---- 90 RSEG ?STACK
0000 91 DS 1
92
93 EXTRN CODE (?C_START)
94 PUBLIC ?C_STARTUP
95
---- 96 CSEG AT 0
0000 020000 F 97 ?C_STARTUP: LJMP STARTUP1
98
---- 99 RSEG ?C_C51STARTUP
100
0000 101 STARTUP1:
102
103 ; no initializtion on idata - by geweidong
104 ;IF IDATALEN <> 0
105 ; MOV R0,#IDATALEN - 1
106 ; CLR A
107 ;IDATALOOP: MOV @R0,A
108 ; DJNZ R0,IDATALOOP
109 ;ENDIF
110
111 ; no initializtion on xdata - by geweidong
112 ;IF XDATALEN <> 0
113 ; MOV DPTR,#XDATASTART
114 ; MOV R7,#LOW (XDATALEN)
115 ; IF (LOW (XDATALEN)) <> 0
116 ; MOV R6,#(HIGH (XDATALEN)) +1
117 ; ELSE
118 ; MOV R6,#HIGH (XDATALEN)
119 ; ENDIF
120 ; CLR A
121 ;XDATALOOP: MOVX @DPTR,A
122 ; INC DPTR
123 ; DJNZ R7,XDATALOOP
124 ; DJNZ R6,XDATALOOP
A51 MACRO ASSEMBLER STARTUP 09/19/2005 08:41:27 PAGE 3
125 ;ENDIF
126
127 ; no initializtion on xdata - by geweidong
128 ;IF PPAGEENABLE <> 0
129 ; MOV PPAGE_SFR,#PPAGE
130 ;ENDIF
131 ;
132 ;IF PDATALEN <> 0
133 ; MOV R0,#LOW (PDATASTART)
134 ; MOV R7,#LOW (PDATALEN)
135 ; CLR A
136 ;PDATALOOP: MOVX @R0,A
137 ; INC R0
138 ; DJNZ R7,PDATALOOP
139 ;ENDIF
140
141 ; reentrant functions not used, but may be used later. - by geweidong
142 IF IBPSTACK <> 0
EXTRN DATA (?C_IBP)
MOV ?C_IBP,#LOW IBPSTACKTOP
ENDIF
147
148 IF XBPSTACK <> 0
EXTRN DATA (?C_XBP)
MOV ?C_XBP,#HIGH XBPSTACKTOP
MOV ?C_XBP+1,#LOW XBPSTACKTOP
ENDIF
154
155 IF PBPSTACK <> 0
EXTRN DATA (?C_PBP)
MOV ?C_PBP,#LOW PBPSTACKTOP
ENDIF
159
0000 758100 F 160 MOV SP,#?STACK-1
161 ; This code is required if you use L51_BANK.A51 with Banking Mode 4
162 ; EXTRN CODE (?B_SWITCH0)
163 ; CALL ?B_SWITCH0 ; init bank mechanism to code bank 0
0003 020000 F 164 LJMP ?C_START
165
166 END
A51 MACRO ASSEMBLER STARTUP 09/19/2005 08:41:27 PAGE 4
SYMBOL TABLE LISTING
------ ----- -------
N A M E T Y P E V A L U E ATTRIBUTES
?C_C51STARTUP. . . C SEG 0006H REL=UNIT
?C_START . . . . . C ADDR ----- EXT
?C_STARTUP . . . . C ADDR 0000H A
?STACK . . . . . . I SEG 0001H REL=UNIT
ACC. . . . . . . . D ADDR 00E0H A
B. . . . . . . . . D ADDR 00F0H A
DPH. . . . . . . . D ADDR 0083H A
DPL. . . . . . . . D ADDR 0082H A
IBPSTACK . . . . . N NUMB 0000H A
IBPSTACKTOP. . . . N NUMB 0100H A
IDATALEN . . . . . N NUMB 0080H A
PBPSTACK . . . . . N NUMB 0000H A
PBPSTACKTOP. . . . N NUMB 0000H A
PDATALEN . . . . . N NUMB 0000H A
PDATASTART . . . . N NUMB 0000H A
PPAGE. . . . . . . N NUMB 0000H A
PPAGEENABLE. . . . N NUMB 0000H A
PPAGE_SFR. . . . . D ADDR 00A0H A
SP . . . . . . . . D ADDR 0081H A
STARTUP1 . . . . . C ADDR 0000H R SEG=?C_C51STARTUP
XBPSTACK . . . . . N NUMB 0000H A
XBPSTACKTOP. . . . N NUMB 0000H A
XDATALEN . . . . . N NUMB 0000H A
XDATASTART . . . . N NUMB 0000H A
REGISTER BANK(S) USED: 0
ASSEMBLY COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -