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