📄 crtbegin.lis
字号:
GAS LISTING C:\DOCUME~1\REF\LOCALS~1\Temp\cc001908.s page 1
1 # 1 "../startup/crtbegin.spp"
2
1 /*
2 * crtbegin.spp
3 *
4 * ST9+ Software Development Toolchain - Version 6.0.0 Apr 5 2000
5 *
6 * This file is part of GNU C Compiler for ST9+ Micro-controllers.
7 *
8 * This file described initialization part for an application.
9 * All instructions go to the '.init' ELF standard sections.
10 * This document is organized as follow:
11 *
12 * Part 1: MACROS DEFINITION
13 * Define and describe cpp macros to be used later in
14 * the implementation part of the startup,
15 *
16 * Part 2: INTERRUPT VECTOR DECLARATION
17 * It defines the default interrupt vectors.
18 *
19 * Part 3: DEFAULT HANDLERS
20 * It defines the following two default handlers:
21 * (1) divide by zero trap,
22 * (2) interrupt handler (just doing iret)
23 *
24 * Part 4: SYSTEM SETUP
25 * Reset some registers to be up to date according to
26 * the programming models to be used,
27 * This part not including the MMU setup.
28 *
29 * Part 5: MEMORY/REGISTER FILE INITIALIZATION
30 * Initialize all memories and register files areas
31 * using the 'secinfo table' mechanism
32 * (see Libraries and Startup Files Reference Guide
33 * for more details on this mechanism).
34 *
35 * Part 6: MMU SETUP
36 * Set MMU registers according to the programming
37 * models used, and initialize DPRs.
38 *
39 * Part 7: CALL MAIN
40 * Call 'main' routine after having enabled interruption.
41 *
42 * Part 8: TERMINATION
43 * Terminate program by looping indefinitely.
44 *
45 * IMPORTANT NOTE: all parts are divided using comments.
46 * Refer to the 'Libraries and Startup Files
47 * Reference Guide for more details on default
48 * startup codes and how to customize this
49 * generic startup file.
50 */
51
52 /* +------------------------------------------------------------+
53 | PART 1 : MACROS DEFINITION |
54 +------------------------------------------------------------+
55 Here is the list of macros used in this file, how the value
56 is set and which is the default value:
57 +---------------------+--------------------------------------+
58 | NAME | DESCRIPTION |
59 +---------------------+--------------------------------------+
60 | SPECMED | defined specific instruction for the |
61 | | specmedprogramming model. |
GAS LISTING C:\DOCUME~1\REF\LOCALS~1\Temp\cc001908.s page 2
62 | | Set: -mspecmed command line |
63 | | Default: undefined. |
64 +---------------------+--------------------------------------+
65 | MEDIUM | defined specific instruction for the |
66 | | medium programming model. |
67 | | Set: -mmedium command line |
68 | | Default: undefined. |
69 +---------------------+--------------------------------------+
70 | PARMUSP | defined specific instruction when |
71 | | user stack is used. |
72 | | Set: -mparmusp command line |
73 | | Default: undefined. |
74 +---------------------+--------------------------------------+
75 | UNDERSCORE | add underscore of global symbols. |
76 | | Set: -munderscore command line |
77 | | Default: undefined |
78 +---------------------+--------------------------------------+
79 | NDEBUG | when this macro is defined, all |
80 | | intermediate symbols used for loops |
81 | | are declared as temporary symbols |
82 | | (prefixed by a '.L_'). |
83 | | Set: -DNDEBUG on command line |
84 | | or by uncommented the |
85 | | specific below. |
86 | | Default: undefined. |
87 +---------------------+--------------------------------------+
88 | DIVIDE_BY_ZERO_TRAP | define the routine name for the |
89 | | default by zero trap handler. |
90 | | Set: -DDIVIDE_BY_ZERO_TRAP=... |
91 | | on command line |
92 | | Default: undefined. |
93 +---------------------+--------------------------------------+
94 | NO_SECINFO | remove code generation for memory |
95 | | and register file area initializa- |
96 | | tion using the secinfo table |
97 | | mechanism. |
98 | | Set: -DNO_SECINFO on command |
99 | | line |
100 | | Default: undefined. |
101 +---------------------+--------------------------------------+ */
102
103 #include "config.spp"
1 /*
2 * config.spp
3 *
4 * ST9+ Software Development Toolchain - Version 6.0.0 Apr 5 2000
5 *
6 * This file is part of GNU C Compiler for ST9+ Micro-controllers.
7 *
8 * This file defines useful macros to dump according without
9 * regarding the programming model.
10 *
11 * General macros value are under the control of command
12 * line options of gcc9.
13 */
14
15 #ifndef _CONFIG_SPP
16 #define _CONFIG_SPP
17
18 /* Definition of the ST9+ _call/_ret instructions */
19 #if defined(MEDIUM) || defined(SPECMED)
20 #define DESC(SYMBOL) .desc SYMBOL, far
21 #define _call calls
GAS LISTING C:\DOCUME~1\REF\LOCALS~1\Temp\cc001908.s page 3
22 #define _ret rets
23 #else /* MEDIUM */
24 #define DESC(SYMBOL) .desc SYMBOL, near
25 #define _call call
26 #define _ret ret
27 #endif /* MEDIUM */
28
29 /* Definition of the ST9+ _pushw/_push/_popw/_pop instructions */
30 #if defined(PARMUSP)
31 #define _pushw pushuw
32 #define _push pushu
33 #define _popw popuw
34 #define _pop popu
35 #define SP RR236
36 #else /* PARMUSP */
37 #define _pushw pushw
38 #define _push push
39 #define _popw popw
40 #define _pop pop
41 #define SP RR238
42 #endif /* PARMUSP */
43
44 /* Enable code optimization of libgcc1 by default */
45 #define CODE_OPTIMIZATION
46
47 /* Use local label (beginning with .L) instead of symbols
48 that go to the sym table, when compiling under the NDEBUG
49 macro control. */
50 /* Uncomment the following macro if you does not want
51 temporary symbols */
52 /* #define NDEBUG */
53 #ifdef NDEBUG
54 #define LABEL(SYMBOL) .L_ ## SYMBOL
55 #else /* NDEBUG */
56 #define LABEL(SYMBOL) __ ## SYMBOL
57 #endif /* NDEBUG */
58
59 /* Define the programming used according to programming macros
60 definition. */
61 #if defined(MEDIUM)
62 #define MEMORY_MODEL medium
63 #elif defined (SPECMED)
64 #define MEMORY_MODEL specmed
65 #else /* MEDIUM */
66 #define MEMORY_MODEL compact
67 #endif /* MEDIUM */
68
69
70 #if defined(PARMUSP)
71 #define PARMS_MODEL parmusp
72 #else /* PARMUSP */
73 #define PARMS_MODEL no-parmusp
74 #endif /* PARMUSP */
75
76 #if defined(FP_ON)
77 #define FP_MODEL fp-on
78 #else /* FP_ON */
79 #define FP_MODEL no-fp-on
80 #endif /* FP_ON */
81
82 #define PROGRAMMING_MODEL .assume MEMORY_MODEL, PARMS_MODEL, FP_MODEL
83
84 #endif /* _CONFIG_SPP */
GAS LISTING C:\DOCUME~1\REF\LOCALS~1\Temp\cc001908.s page 4
85 ...
104
105 /* Prepend an additional underscore before external
106 symbols , depending on '-munderscore' command line
107 option. */
108
109 #define _CONCATIFY(x,y) x ## y
110 #define CONCATIFY(x,y) _CONCATIFY(x,y)
111
112 #if defined(UNDERSCORE)
113 #define M_(x) CONCATIFY(_,x)
114 #else /* UNDERSCORE */
115 #define M_(x) x
116 #endif /* UNDERSCORE */
117
118 /* Name of the divide by zero trap handler. */
119 #if !defined(DIVIDE_BY_ZERO_TRAP)
120 #define DIVIDE_BY_ZERO_TRAP_DEFAULT __Divide_by_Zero_Trap
121 #define DIVIDE_BY_ZERO_TRAP_LABEL DIVIDE_BY_ZERO_TRAP_DEFAULT
122 #else /* !DIVIDE_BY_ZERO_TRAP */
123 #define DIVIDE_BY_ZERO_TRAP_LABEL DIVIDE_BY_ZERO_TRAP
124 #endif /* !DIVIDE_BY_ZERO_TRAP */
125
126 /* Define macro HAS_SECINFO if macro NO_SECINFO
127 is not defined. */
128 #if !defined(NO_SECINFO)
129 #define HAS_SECINFO
130 #endif /* !NO_SECINFO */
131
132 /* Required include files */
133 #include <sys/page_0.spp>
1 /*
2 * page_0.spp
3 *
4 * ST9+ Software Development Toolchain - Version 6.1.3 Sep 10 2001
5 *
6 * This file is part of GNU C Compiler for ST9+ Micro-controllers.
7 *
8 * This file describes External Interrupts, Timer Watchdog
9 * and SPI control registers.
10 *
11 * Register Page: 0
12 *
13 * Device: any
14 *
15 */
16
17 #ifndef _SYS_PAGE_0_SPP
18 #define _SYS_PAGE_0_SPP
19
20 .sbttl "ST9+ Family: External Interrupts, Timer Watchdog"
21
363 .list
364
365 #endif /* !_SYS_PAGE_0_SPP */
366 ...
134 #include <sys/system.spp>
1 /*
2 * system.spp
3 *
4 * ST9+ Software Development Toolchain - Version 6.1.3 Sep 10 2001
5 *
6 * This file is part of GNU C Compiler for ST9+ Micro-controllers.
GAS LISTING C:\DOCUME~1\REF\LOCALS~1\Temp\cc001908.s page 5
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -