annotate docs/ccguide/phases.appendix @ 2106:c4c7facbd082

Fixed up some warnings
author boisy
date Sat, 07 Oct 2006 12:11:22 +0000
parents db5f03aa3544
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
1 <appendix>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
2 <title>Compiler Phase Command Lines</title>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
3 <para>
643
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
4 This appendix describes the command lines and options for the
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
5 individual compiler phases. Each phase of the compiler may be
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
6 executed separately. The following information describes the
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
7 options available to each phase.
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
8 </para>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
9
643
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
10 <section><title>cc1 &amp; cc2 (C executives)</title>
631
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
11 <cmdsynopsis>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
12 <command>cc</command>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
13 <arg>options</arg>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
14 <arg rep="repeat" choice="plain"><replaceable>file</replaceable></arg>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
15 <arg>options</arg>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
16 </cmdsynopsis>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
17 <para>
631
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
18 Recognized file suffixes:
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
19 </para>
631
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
20 <informaltable frame="none">
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
21 <tgroup cols="2">
643
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
22 <colspec colwidth="0.9in"/>
639
e53c35cea83f Convert to Docbook XML format
roug
parents: 631
diff changeset
23 <colspec colwidth="3.0in"/>
631
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
24 <tbody>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
25 <row>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
26 <entry>.c</entry>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
27 <entry>C source file</entry>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
28 </row>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
29 <row>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
30 <entry>.a</entry>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
31 <entry>Assembly language source file</entry>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
32 </row>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
33 <row>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
34 <entry>.r</entry>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
35 <entry>Relocatable module format file</entry>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
36 </row>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
37 </tbody>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
38 </tgroup>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
39 </informaltable>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
40 <para>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
41 Recognized options: (UPPER and lower case is equiv.)
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
42 </para>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
43 <informaltable frame="none">
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
44 <tgroup cols="2">
643
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
45 <colspec colwidth="0.9in"/>
639
e53c35cea83f Convert to Docbook XML format
roug
parents: 631
diff changeset
46 <colspec colwidth="3.0in"/>
631
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
47 <tbody>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
48 <row>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
49 <entry>-a</entry>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
50 <entry>Suppress assembly. Leave output in ".a" file.</entry>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
51 </row>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
52 <row>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
53 <entry>-e=n</entry>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
54 <entry>Edition number (n) is supplied to c.prep for
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
55 inclusion in module psect and/or to c.link for
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
56 inclusion as the edition number of the linked
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
57 module.</entry>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
58 </row>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
59 <row>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
60 <entry>-o</entry>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
61 <entry>Inhibits assembly code optimizer pass.</entry>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
62 </row>
643
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
63 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
64 <entry>-p</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
65 <entry>Invoke compiler function profiler.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
66 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
67 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
68 <entry>-r</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
69 <entry>Suppress link step. Leave output in ".r" file.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
70 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
71 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
72 <entry>-m=<replaceable>size</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
73 <entry>Size in pages (in kbytes if followed by a K) of
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
74 additional memory the linker should allocate to
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
75 object module.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
76 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
77 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
78 <entry>-l=<replaceable>path</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
79 <entry>Library file for linker to search before the standard library.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
80 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
81 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
82 <entry>-f=<replaceable>path</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
83 <entry>Override other output naming. Module name (in
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
84 object module) is the last name in the pathlist.
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
85 -f is not allowed with -a or -r.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
86 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
87 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
88 <entry>-c</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
89 <entry>Output comments in assembly language code.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
90 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
91 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
92 <entry>-s</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
93 <entry>Suppress generation of stack-checking code.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
94 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
95 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
96 <entry>-d<replaceable>NAME</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
97 <entry>Is equivalent to #define <replaceable>NAME</replaceable> 1 in the
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
98 preprocessor. -d<replaceable>NAME</replaceable>=<replaceable>STRING</replaceable>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
99 is equivalent
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
100 to #define <replaceable>NAME</replaceable> <replaceable>STRING</replaceable>.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
101 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
102 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
103 <entry>-n=<replaceable>name</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
104 <entry>output module name. <replaceable>name</replaceable> is used to override
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
105 the -f default output name.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
106 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
107 </tbody>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
108 </tgroup>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
109 </informaltable>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
110 <para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
111 CC1 only:
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
112 </para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
113 <informaltable frame="none">
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
114 <tgroup cols="2">
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
115 <colspec colwidth="0.9in"/>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
116 <colspec colwidth="3.0in"/>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
117 <tbody>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
118 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
119 <entry>-x</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
120 <entry>Create, but do not execute c.com command file.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
121 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
122 </tbody>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
123 </tgroup>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
124 </informaltable>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
125 <para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
126 CC2 only:
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
127 </para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
128 <informaltable frame="none">
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
129 <tgroup cols="2">
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
130 <colspec colwidth="0.9in"/>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
131 <colspec colwidth="3.0in"/>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
132 <tbody>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
133 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
134 <entry>-q</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
135 <entry>Quiet mode. Suppress echo of file names.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
136 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
137 </tbody>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
138 </tgroup>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
139 </informaltable>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
140 </section>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
141
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
142 <section><title>c.prep (C macro preprocessor)</title>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
143 <cmdsynopsis>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
144 <command>c.prep</command>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
145 <arg>options</arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
146 <arg choice="plain"><replaceable>path</replaceable></arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
147 <arg>options</arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
148 </cmdsynopsis>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
149 <para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
150 <replaceable>path</replaceable> is read as input. C.prep causes c.comp to generate
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
151 psect directive with last element of pathlist and _c as the
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
152 psect name. If <replaceable>path</replaceable> is /d0/myprog.c, psect name is myprog_c.
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
153 Output is always to stdout.
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
154 </para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
155 <para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
156 Recognized options:
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
157 </para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
158 <informaltable frame="none">
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
159 <tgroup cols="2">
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
160 <colspec colwidth="0.9in"/>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
161 <colspec colwidth="3.0in"/>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
162 <tbody>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
163 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
164 <entry>-l</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
165 <entry>Cause c.comp to copy source lines to assembly output as comments.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
166 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
167 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
168 <entry>-E=<replaceable>n</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
169 <entry></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
170 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
171 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
172 <entry>-e=<replaceable>n</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
173 <entry>Use <replaceable>n</replaceable> as psect edition number.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
174 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
175 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
176 <entry>-D<replaceable>NAME</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
177 <entry>Same as described above for cc1/cc2.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
178 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
179 </tbody>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
180 </tgroup>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
181 </informaltable>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
182 </section>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
183
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
184 <section><title>c.comp (One-pass compiler)</title>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
185 <cmdsynopsis>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
186 <command>c.comp</command>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
187 <arg>options</arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
188 <arg><replaceable>file</replaceable></arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
189 <arg>options</arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
190 </cmdsynopsis>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
191 <para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
192 If <replaceable>file</replaceable> is not present, c.comp will read stdin. Input text
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
193 need not be c.prep output, but no preprocessor directives are
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
194 recognized (#include, #define, macros etc.). Output assembly
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
195 code is normally to stdout. Error message output is always
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
196 written to stdout.
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
197 </para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
198 <para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
199 Recognized options:
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
200 </para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
201 <informaltable frame="none">
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
202 <tgroup cols="2">
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
203 <colspec colwidth="0.9in"/>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
204 <colspec colwidth="3.0in"/>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
205 <tbody>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
206 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
207 <entry>-s</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
208 <entry>Suppress generation of stack checking code.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
209 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
210 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
211 <entry>-p</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
212 <entry>Generate profile code.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
213 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
214 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
215 <entry>-o=<replaceable>path</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
216 <entry>Write assembly output to <replaceable>path</replaceable>.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
217 </row>
631
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
218 </tbody>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
219 </tgroup>
594a34d027f8 Some progres on the BASIC09 examples
roug
parents: 468
diff changeset
220 </informaltable>
643
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
221 </section>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
222
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
223 <section><title>c.pass (Pass One/Two of Two-pass Compiler)</title>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
224 <cmdsynopsis>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
225 <command>c.pass1</command>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
226 <arg>options</arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
227 <arg><replaceable>file</replaceable></arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
228 <arg>options</arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
229 </cmdsynopsis>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
230 <cmdsynopsis>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
231 <command>c.pass2</command>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
232 <arg>options</arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
233 <arg><replaceable>file</replaceable></arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
234 <arg>options</arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
235 </cmdsynopsis>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
236 <para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
237 Command line and options are the same as c.comp. If the
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
238 options given to c.pass1 are not given to c.pass2 also, c.pass2
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
239 will not be able to read the c.pass1 output. Both c.pass1 and
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
240 c.pass2 read stdin and write stdout normally.
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
241 </para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
242 </section>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
243
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
244 <section><title>c.opt (Assembly code optimizer)</title>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
245 <cmdsynopsis>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
246 <command>c.opt</command>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
247 <arg><replaceable>inpath</replaceable></arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
248 <arg><replaceable>outpath</replaceable></arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
249 </cmdsynopsis>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
250 <para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
251 C.opt reads stdin and writes stdout. <replaceable>inpath</replaceable>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
252 must be present if <replaceable>outpath</replaceable> is given.
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
253 Since c.opt rearranges and changes code, comments and assembler directives
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
254 may be rearranged.
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
255 </para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
256 </section>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
257
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
258 <section><title>c.asm (Assembler)</title>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
259 <cmdsynopsis>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
260 <command>c.asm</command>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
261 <arg choice="plain"><replaceable>file</replaceable></arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
262 <arg>options</arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
263 </cmdsynopsis>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
264 <para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
265 C.asm reads <replaceable>file</replaceable> as assembly language input. Errors are
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
266 written to stderr. Options are turned on with one '-' and
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
267 negated with '--'. To turn listing on use -l. To turn
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
268 listing off use --l. To turn conditionals off use --c.
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
269 </para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
270 <para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
271 Recognized options:
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
272 </para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
273 <informaltable frame="none">
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
274 <tgroup cols="2">
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
275 <colspec colwidth="0.9in"/>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
276 <colspec colwidth="3.0in"/>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
277 <tbody>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
278 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
279 <entry>-o=<replaceable>path</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
280 <entry>Write relocatable output to path. Must be a disk file.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
281 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
282 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
283 <entry>-l</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
284 <entry>Write listing to stdout. (default off)</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
285 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
286 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
287 <entry>-c</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
288 <entry>List conditional assembly lines. (default on)</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
289 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
290 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
291 <entry>-f</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
292 <entry>Formfeed for top of form. (default off)</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
293 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
294 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
295 <entry>-g</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
296 <entry>List all code bytes generated. (default off)</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
297 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
298 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
299 <entry>-x</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
300 <entry>Suppress macro expansion listing. (default on)</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
301 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
302 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
303 <entry>-e</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
304 <entry>Print errors. (default on)</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
305 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
306 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
307 <entry>-s</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
308 <entry>Print symbol table. (default off)</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
309 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
310 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
311 <entry>-d<replaceable>n</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
312 <entry>Set lines per page to <replaceable>n</replaceable>. (default 66).</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
313 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
314 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
315 <entry>-w<replaceable>n</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
316 <entry>Set line width to <replaceable>n</replaceable>. (default 80).</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
317 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
318 </tbody>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
319 </tgroup>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
320 </informaltable>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
321 </section>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
322
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
323 <section><title>c.link (Linker)</title>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
324 <cmdsynopsis>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
325 <command>c.link</command>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
326 <arg>options</arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
327 <arg choice="plain"><replaceable>mainline</replaceable></arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
328 <arg rep="repeat" choice="plain"><replaceable>subn</replaceable></arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
329 <arg>options</arg>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
330 </cmdsynopsis>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
331 <para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
332 C.link turns c.asm output into executable form. All input
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
333 files must contain relocatable object format (ROF) files.
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
334 <replaceable>mainline</replaceable> specifies the base module from which to resolve
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
335 external references. A mainline module is indicated by setting
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
336 the type/lang value in the psect directive to non-zero. No other
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
337 ROF can contain a mainline psect. The mainline and all
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
338 subroutine files will appear in the final linked object module
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
339 whether actually referenced or not.
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
340 </para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
341 <para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
342 For the C Compiler, cstart.r is the mainline module. It is the
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
343 mainline module's job to perform the initialization of data and
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
344 the relocation of any data-text and data-data references within
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
345 the initialized data using the information in the object module
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
346 supplied be c.link.
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
347 </para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
348 <para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
349 Recognized options:
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
350 </para>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
351 <informaltable frame="none">
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
352 <tgroup cols="2">
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
353 <colspec colwidth="0.9in"/>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
354 <colspec colwidth="3.0in"/>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
355 <tbody>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
356 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
357 <entry>-o=<replaceable>path</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
358 <entry>Linker object output file. Must be a disk
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
359 file. The last element in <replaceable>path</replaceable> is used as the
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
360 module name unless overridden by -n.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
361 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
362 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
363 <entry>-n=<replaceable>name</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
364 <entry>Use <replaceable>name</replaceable> as object file name.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
365 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
366 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
367 <entry>-l=<replaceable>path</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
368 <entry>Use <replaceable>path</replaceable> as library file. A library file
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
369 consistes of one or more merged assembly ROF
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
370 files. Each psect in the file is checked to see
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
371 if it resolves any unresolved references. If
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
372 so, the module is included on the final output
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
373 module, otherwise it is skipped. No mainline
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
374 psects are allowed in a library file. Library
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
375 files are searched on the order given on the
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
376 command line.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
377 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
378 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
379 <entry>-E=<replaceable>n</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
380 <entry></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
381 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
382 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
383 <entry>-e=<replaceable>n</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
384 <entry><replaceable>n</replaceable> is used for the edition number in the final
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
385 output module. 1 is used is -e is not present.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
386 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
387 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
388 <entry>-M=<replaceable>size</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
389 <entry><replaceable>size</replaceable> indicates the number of pages (kbytes if
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
390 size is followed by a K) of additional memory,
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
391 c.link will allocate to the data area of the
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
392 final object module. If no additional memory is
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
393 given, c.link add up the total data stack
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
394 requirements found in the psect of the modules
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
395 in the input modules.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
396 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
397 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
398 <entry>-m</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
399 <entry>Prints linkage map indicating base addresses of
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
400 the psects in the final object module.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
401 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
402 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
403 <entry>-s</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
404 <entry>Prints final addresses assigned to symbols in
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
405 the final object module.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
406 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
407 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
408 <entry>-b=<replaceable>ept</replaceable></entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
409 <entry>Link C functions to be callable by BASIC09.
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
410 <replaceable>ept</replaceable> is the name of the function to be
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
411 transferred to when BASIC09 executes the RUN command.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
412 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
413 <row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
414 <entry>-t</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
415 <entry>Allows static data to appear in a BASIC09 callable
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
416 module. It is assumed the C function called
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
417 and the calling BASIC09 program have provided
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
418 a sufficiently large static storage data area
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
419 pointed to by the Y register.</entry>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
420 </row>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
421 </tbody>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
422 </tgroup>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
423 </informaltable>
db5f03aa3544 Appendix B done.
roug
parents: 639
diff changeset
424 </section>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
425 </appendix>