📄 start12.lst
字号:
Options : -CPUHCS12XE -D__FAR_DATA -D__NO_FLOAT__ -Env"GENPATH=D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\bin;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\prm;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\cmd;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\lib;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\src;C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\lib;*C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\src;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources\Configuration;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\defs_XEx100_M22E;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\include;C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\include" -Env"LIBPATH=D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\bin;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\prm;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\cmd;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\lib;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\src;C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\lib;*C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\src;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources\Configuration;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\defs_XEx100_M22E;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\include;C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\include" -Env"OBJPATH=D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\bin" -Env"TEXTPATH=D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\bin" -Lasm=%n.lst -Mb -ObjN="D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Example_9_Data\Flash_P&E_target\ObjectCode\start12.c.o" -WmsgSd1106 -WmsgSd12053
165: #endif
166: /* purpose: 1) initialize the stack
167: 2) initialize the RAM, copy down init data etc (Init)
168: 3) call main;
169: parameters: NONE
170: called from: _PRESTART-code generated by the Linker
171: or directly referenced by the reset vector */
172:
173: /* initialize the stack pointer */
174: INIT_SP_FROM_STARTUP_DESC(); /*lint !e522 asm code */ /* HLI macro definition in hidef.h */
0000 cf0000 [2] LDS #__SEG_END_SSTACK
175:
176: #if defined(_HCS12_SERIALMON)
177: /* for Monitor based software remap the RAM & EEPROM to adhere
178: to EB386. Edit RAM and EEPROM sections in PRM file to match these. */
179: ___INITRG = 0x00; /* lock registers block to 0x0000 */
180: ___INITRM = 0x39; /* lock Ram to end at 0x3FFF */
181: ___INITEE = 0x09; /* lock EEPROM block to end at 0x0fff */
182: #endif
183:
184: /* Here user defined code could be inserted, the stack could be used */
185: #if defined(_DO_DISABLE_COP_)
186: _DISABLE_COP();
187: #endif
188:
189: /* Example : Set up WinDef Register to allow Paging */
190: #ifdef HC812A4 /* HC12 A4 derivative needs WINDEF to configure which pages are available */
191: #if (__ENABLE_EPAGE__ != 0 || __ENABLE_DPAGE__ != 0 || __ENABLE_PPAGE__ != 0)
192: WINDEF= __ENABLE_EPAGE__ | __ENABLE_DPAGE__ | __ENABLE_PPAGE__;
193: #endif
194: #endif
195:
196:
197: #ifndef __ONLY_INIT_SP
198:
199: Init(); /* zero out, copy down, call constructors */
0003 4a000000 [7] CALL Init,PAGE(Init)
200: #endif
201:
202: /* Here user defined code could be inserted, all global variables are initilized */
203: #if defined(_DO_ENABLE_COP_)
204: _ENABLE_COP(1);
205: #endif
206:
207: /* call main() */
208: main();
0007 4a000000 [7] CALL main,PAGE(main)
209: }
210:
211:
212: #ifndef __ONLY_INIT_SP
213: #if (!defined(FAR_DATA) || defined(__HCS12X__)) && (defined( __BANKED__) || defined(__LARGE__) || defined(__BANKED_COPY_DOWN))
214: static void __far Init(void)
215: #else
216: static void Init(void)
217: #endif
218: {
Function: Init
Source : D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources\start12.c
Options : -CPUHCS12XE -D__FAR_DATA -D__NO_FLOAT__ -Env"GENPATH=D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\bin;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\prm;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\cmd;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\lib;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\src;C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\lib;*C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\src;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources\Configuration;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\defs_XEx100_M22E;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\include;C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\include" -Env"LIBPATH=D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\bin;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\prm;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\cmd;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\lib;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\src;C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\lib;*C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\src;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources\Configuration;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\defs_XEx100_M22E;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\include;C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\include" -Env"OBJPATH=D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\bin" -Env"TEXTPATH=D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\bin" -Lasm=%n.lst -Mb -ObjN="D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Example_9_Data\Flash_P&E_target\ObjectCode\start12.c.o" -WmsgSd1106 -WmsgSd12053
219: /* purpose: 1) zero out RAM-areas where data is allocated */
220: /* 2) copy initialization data from ROM to RAM */
221: /* 3) call global constructors in C++ */
222: /* called from: _Startup, LibInits */
223: __asm {
224: ZeroOut:
225: #if defined(__HIWARE_OBJECT_FILE_FORMAT__) && defined(__LARGE__)
226: LDX _startupData.pZeroOut:1 ; in the large memory model in the HIWARE format, pZeroOut is a 24 bit pointer
227: #else
228: LDX _startupData.pZeroOut ; *pZeroOut
0000 fe0000 [3] LDX _startupData:2
229: #endif
230: LDY _startupData.nofZeroOuts ; nofZeroOuts
0003 fd0000 [3] LDY _startupData
231: BEQ CopyDown ; if nothing to zero out
0006 2718 [3/1] BEQ *+26 ;abs = 0020
232:
233: NextZeroOut: PSHY ; save nofZeroOuts
0008 35 [2] PSHY
234: #if defined(FAR_DATA)
235: LDAB 1,X+ ; load page of destination address
0009 e630 [3] LDAB 1,X+
236: LDY 2,X+ ; load offset of destination address
000b ed31 [3] LDY 2,X+
237: #if defined(__HCS12X__)
238: STAB __GPAGE_ADR__
000d 5b10 [2] STAB 16
239: #else /* defined(__HCS12X__) */
240: __PIC_JSR(_SET_PAGE) ; sets the page in the correct page register
241: #endif /* defined(__HCS12X__) */
242: #else /* FAR_DATA */
243: LDY 2,X+ ; start address and advance *pZeroOut (X = X+4)
244: #endif /* FAR_DATA */
245:
246: #if defined(__HCS12X__) && defined(FAR_DATA)
247: PSHX
000f 34 [2] PSHX
248: LDX 0,X ; byte count
0010 ee00 [3] LDX 0,X
249: #if defined(__OPTIMIZE_FOR_SIZE__)
250: CLRA
0012 87 [1] CLRA
251: NextWord: GSTAA 1,Y+ ; clear memory byte
0013 186a70 [3] GSTAA 1,Y+
252: __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */
253: DBNE X, NextWord ; dec byte count
0016 0435fa [3] DBNE X,*-3 ;abs = 0013
254: #else
255: LDD #0
256: LSRX
257: BEQ LoopClrW1 ; do we copy more than 1 byte?
258: NextWord: GSTD 2,Y+ ; clear memory word
259: __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */
260: DBNE X, NextWord ; dec word count
261: LoopClrW1:
262: BCC LastClr ; handle last byte
263: GSTAA 1,Y+ ; handle last byte
264: LastClr:
265: #endif
266: PULX
0019 30 [3] PULX
267: LEAX 2,X
001a 1a02 [2] LEAX 2,X
268: #elif defined(__OPTIMIZE_FOR_SIZE__) /* -os, default */
269: LDD 2,X+ ; byte count
270: NextWord: CLR 1,Y+ ; clear memory byte
271: __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */
272: DBNE D, NextWord ; dec byte count
273: #else /* __OPTIMIZE_FOR_TIME__ */
274: LDD 2,X+ ; byte count
275: LSRD ; /2 and save bit 0 in the carry
276: BEQ LoopClrW1 ; do we copy more than 1 byte?
277: PSHX
278: LDX #0
279: LoopClrW: STX 2,Y+ ; Word-Clear
280: __FEED_COP_IN_HLI() ; feed the COP if necessary /*lint !e505 !e522 asm code */
281: DBNE D, LoopClrW
282: PULX
283: LoopClrW1:
284: BCC LastClr ; handle last byte
285: CLR 1,Y+
286: LastClr:
287: #endif /* __OPTIMIZE_FOR_SIZE__/__OPTIMIZE_FOR_TIME__ */
288: PULY ; restore nofZeroOuts
001c 31 [3] PULY
289: DEY ; dec nofZeroOuts
001d 03 [1] DEY
290: BNE NextZeroOut
001e 26e8 [3/1] BNE *-22 ;abs = 0008
291: CopyDown:
292: #if defined(__BANKED_COPY_DOWN)
293: LDAA _startupData.toCopyDownBeg:0 ; get PAGE address of .copy section
294: STAA __PPAGE_ADR__ ; set PPAGE address
295: LDX _startupData.toCopyDownBeg:1 ; load address of copy down desc.
296: #elif defined(__ELF_OBJECT_FILE_FORMAT__)
297: LDX _startupData.toCopyDownBeg ; load address of copy down desc.
0020 fe0000 [3] LDX _startupData:4
298: #else
299: LDX _startupData.toCopyDownBeg:2 ; load address of copy down desc.
300: #endif
301: NextBlock:
302: LDD 2,X+ ; size of init-data -> D
0023 ec31 [3] LDD 2,X+
303: BEQ funcInits ; end of copy down desc.
0025 2714 [3/1] BEQ *+22 ;abs = 003b
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -