📄 startup.lst
字号:
A51 MACRO ASSEMBLER STARTUP 07/11/2007 23:11:06 PAGE 1
MACRO ASSEMBLER A51 V7.10b
NO OBJECT MODULE REQUESTED
ASSEMBLER INVOKED BY: D:\Keil\C51\BIN\A51.EXE STARTUP.A51 SET(SMALL) DEBUG EP
LOC OBJ LINE SOURCE
1 $nomod51
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.00
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 <h> 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 ;<o> IDATA memory length <0x0-0x100>
28 ;<i> Note: The absolute start-address of IDATA memory is always 0
29 ;<i> The IDATA space overlaps physically the DATA and BIT areas.
0080 30 IDATALEN EQU 80H
31 ;
32 ; <o> XDATA memory start address <0x0-0xFFFF>
33 ; <i> absolute start-address of XDATA memory
0000 34 XDATASTART EQU 0
35 ;
36 ; <o> XDATA memory length <0x0-0xFFFF>
37 ; <i> length of XDATA memory in bytes.
0000 38 XDATALEN EQU 0
39 ;
40 ; <o> PDATA memory start address <0x0-0xFFFF>
41 ; <i> absolute start-address of PDATA memory
0000 42 PDATASTART EQU 0H
43 ;
44 ; <o> PDATA memory length <0x0-0xFF>
45 ; <i> length of PDATA memory in bytes.
0000 46 PDATALEN EQU 0H
47 ;
48 ; </h>
49 ;------------------------------------------------------------------------------
50 ;
51 ; <h> Reentrant Stack Initilization
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 ; <e> Activate reentrant Stack (SMALL model)
0000 58 IBPSTACK EQU 0 ; set to 1 if small reentrant is used.
A51 MACRO ASSEMBLER STARTUP 07/11/2007 23:11:06 PAGE 2
59 ; <o> top of stack <0x0-0xFF>
60 ; <i> set top of stack to highest location+1
0100 61 IBPSTACKTOP EQU 0xFF +1 ; default 0FFH+1
62 ; </e>
63 ;
64 ; Stack Space for reentrant functions in the LARGE model.
65 ; <e> Activate reentrant Stack (LARGE model)
0000 66 XBPSTACK EQU 0 ; set to 1 if large reentrant is used.
67 ; <o> top of stack <0x0-0xFFFF>
68 ; <i> set top of stack to highest location+1.
0000 69 XBPSTACKTOP EQU 0xFFFF +1 ; default 0FFFFH+1
70 ; </e>
71 ;
72 ; Stack Space for reentrant functions in the COMPACT model.
73 ; <e> Activate reentrant Stack (COMPACT model)
0000 74 PBPSTACK EQU 0 ; set to 1 if compact reentrant is used.
75 ;
76 ; <o> top of stack <0x0-0xFF>
77 ; <i> set top of stack to highest location+1.
0100 78 PBPSTACKTOP EQU 0xFF +1 ; default 0FFH+1
79 ; </e>
80 ; </h>
81 ;------------------------------------------------------------------------------
82 ;
83 ; <e>Set Memory Page for Using the Compact Model with 64 KByte xdata RAM
84 ;
85 ; <i>Define the xdata page used for pdata variables.
86 ; <i>PPAGE must conform with the PPAGE set in the linker invocation.
87 ;
88 ; Enable pdata memory page initalization
0000 89 PPAGEENABLE EQU 0 ; set to 1 if pdata object are used.
90 ;
91 ; <o> PPAGE number <0x0-0xFF>
92 ; <i> uppermost 256-byte address of the page used for pdata variables.
0000 93 PPAGE EQU 0
94 ;
95 ; <o> SFR address which supplies uppermost address byte <0x0-0xFF>
96 ; <i> most 8051 variants use P2 as uppermost address byte
00A0 97 PPAGE_SFR DATA 0A0H
98 ;
99 ; </e>
100 ;------------------------------------------------------------------------------
101
102 ; Standard SFR Symbols
00E0 103 ACC DATA 0E0H
00F0 104 B DATA 0F0H
0081 105 SP DATA 81H
0082 106 DPL DATA 82H
0083 107 DPH DATA 83H
108
109 NAME ?C_STARTUP
110
111
112 ?C_C51STARTUP SEGMENT CODE
113 ?STACK SEGMENT IDATA
114
---- 115 RSEG ?STACK
0000 116 DS 1
117
118 EXTRN CODE (?C_START)
119 PUBLIC ?C_STARTUP
120
---- 121 CSEG AT 0
0000 020000 F 122 ?C_STARTUP: LJMP STARTUP1
123
---- 124 RSEG ?C_C51STARTUP
A51 MACRO ASSEMBLER STARTUP 07/11/2007 23:11:06 PAGE 3
125
0000 126 STARTUP1:
127
128 IF IDATALEN <> 0
0000 787F 129 MOV R0,#IDATALEN - 1
0002 E4 130 CLR A
0003 F6 131 IDATALOOP: MOV @R0,A
0004 D8FD 132 DJNZ R0,IDATALOOP
133 ENDIF
134
135 IF XDATALEN <> 0
MOV DPTR,#XDATASTART
MOV R7,#LOW (XDATALEN)
IF (LOW (XDATALEN)) <> 0
MOV R6,#(HIGH (XDATALEN)) +1
ELSE
MOV R6,#HIGH (XDATALEN)
ENDIF
CLR A
XDATALOOP: MOVX @DPTR,A
INC DPTR
DJNZ R7,XDATALOOP
DJNZ R6,XDATALOOP
ENDIF
149
150 IF PPAGEENABLE <> 0
MOV PPAGE_SFR,#PPAGE
ENDIF
153
154 IF PDATALEN <> 0
MOV R0,#LOW (PDATASTART)
MOV R7,#LOW (PDATALEN)
CLR A
PDATALOOP: MOVX @R0,A
INC R0
DJNZ R7,PDATALOOP
ENDIF
162
163 IF IBPSTACK <> 0
EXTRN DATA (?C_IBP)
MOV ?C_IBP,#LOW IBPSTACKTOP
ENDIF
168
169 IF XBPSTACK <> 0
EXTRN DATA (?C_XBP)
MOV ?C_XBP,#HIGH XBPSTACKTOP
MOV ?C_XBP+1,#LOW XBPSTACKTOP
ENDIF
175
176 IF PBPSTACK <> 0
EXTRN DATA (?C_PBP)
MOV ?C_PBP,#LOW PBPSTACKTOP
ENDIF
180
0006 758100 F 181 MOV SP,#?STACK-1
182
183 ; <q>Enable code bank initalization when using L51_BANK.A51 with Banking Mode 4
*** WARNING #A323 IN 185 (STARTUP.A51, LINE 185): newline expected, extra characters found
0009 020000 F 188 LJMP ?C_START
189
A51 MACRO ASSEMBLER STARTUP 07/11/2007 23:11:06 PAGE 4
190 END
A51 MACRO ASSEMBLER STARTUP 07/11/2007 23:11:06 PAGE 5
SYMBOL TABLE LISTING
------ ----- -------
N A M E T Y P E V A L U E ATTRIBUTES
?C_C51STARTUP. . . C SEG 000CH 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
IDATALOOP. . . . . C ADDR 0003H R SEG=?C_C51STARTUP
PBPSTACK . . . . . N NUMB 0000H A
PBPSTACKTOP. . . . N NUMB 0100H 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), 1 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -