annotate docs/ccguide/chap1.chapter @ 530:c43b678c0055

Mainly section structures added.
author roug
date Sat, 12 Oct 2002 12:03:22 +0000
parents f0c8d53e5a50
children b8ed2006640e
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 <chapter>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
2 <title>The C Compiler System</title>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
3
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
4 <section>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
5 <title>Introduction</title>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
6 <para>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
7 The "C" programming language is rapidly growing in popularity
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
8 and seems destined to become one of the most popular programming
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
9 languages used for microcomputers. The rapid rise in the use of C
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
10 is not surprising. C is an incredibly versatile and efficient
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
11 language that can handle tasks that previously would have required
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
12 complex assembly language programming.
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
13 </para>
530
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
14 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
15 C was originally developed at Bell Telephone Laboratories as an
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
16 implementation language for the UNIX operating system by Brian
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
17 Kernighan and Dennis Ritchie. They also wrote a book titled <quote>The
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
18 C Programming Language</quote> which is universally accepted as the standard
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
19 for the language. It is an interesting reflection on the language
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
20 that although no formal industry-wide <quote>standard</quote> was ever developed
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
21 for C, programs written in C tend to be far more portable between
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
22 radically different computer systems as compared to so-called
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
23 <quote>standardized</quote> languages such as BASIC, COBOL, and PASCAL. The
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
24 reason C is so portable is that the language is so inherently
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
25 expandable that is some special function is required, the user can
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
26 create a portable extension to the language, as opposed to the
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
27 common practice of adding additional statements to the language.
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
28 For example, the number of special-purpose BASIC dialects defies all
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
29 reason. A lesser factor is the underlying UNIX operating system,
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
30 which is also sufficiently versatile to discourage bastardization of
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
31 the language. Indeed, standard C compilers and Unix are intimately
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
32 related.
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
33 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
34 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
35 Fortunately, the 6809 microprocessor, the OS-9 operating
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
36 system, and the C language form an outstanding combination. The
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
37 6809 was specifically designed to efficiently run high-level
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
38 languages, and its stack-oriented instruction set and versatile
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
39 repertoire of addressing modes handle the C language very well. As
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
40 mentioned previously, UNIX and C are closely related, and because
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
41 OS-9 is derived from UNIX, it also supports C to the degree that
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
42 almost any application written in C can be transported from a UNIX
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
43 system to an OS-9 system, recompiled, and correctly executed.
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
44 </para>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
45 </section>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
46 <section>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
47 <title>The Language Implementation</title>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
48 <para>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
49 OS-9 C is implemented almost exactly as described in 'The C
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
50 Programming Language' by Kernighan and Ritchie (hereafter referred
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
51 to as K&amp;R).
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
52 </para>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
53 <para>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
54 Allthough this version of C follows the specification faithfully,
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
55 there are some differences. The differences mostly reflect
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
56 parts of C that are obsolete or the constraints imposed by memory
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
57 size limitations.
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
58 </para>
530
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
59 </section>
472
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
60
530
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
61 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
62 <title>Differences from the K &amp; R Specification</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
63 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
64 </para>
472
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
65 </section>
530
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
66
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
67 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
68 <title>Enhancements and Extensions</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
69
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
70 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
71 <title>The <quote>Direct</quote> Storage Class</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
72 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
73 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
74 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
75
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
76 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
77 <title>Embedded Assembly Language</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
78 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
79 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
80 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
81
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
82 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
83 <title>Control Character Escape Sequences</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
84 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
85 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
86 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
87 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
88
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
89 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
90 <title>Implementation-dependent Characteristics</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
91 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
92 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
93
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
94 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
95 <title>Data Representation and Storage Requirements</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
96 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
97 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
98 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
99
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
100 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
101 <title>Register Variables</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
102 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
103 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
104 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
105
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
106 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
107 <title>Access To Command Line Parameters</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
108 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
109 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
110 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
111 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
112
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
113 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
114 <title>System Calls and the Standard Library</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
115
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
116 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
117 <title>Operating System Calls</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
118 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
119 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
120 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
121
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
122 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
123 <title>The Standard Library</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
124 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
125 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
126 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
127 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
128
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
129 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
130 <title>Run-time Arithmetic Error Handling</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
131 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
132 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
133 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
134
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
135 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
136 <title>Achieving Maximum Program Performance</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
137 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
138 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
139
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
140 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
141 <title>Programming Considerations</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
142 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
143 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
144 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
145
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
146 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
147 <title>The Optimizer Pass</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
148 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
149 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
150 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
151
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
152 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
153 <title>The Profiler</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
154 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
155 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
156 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
157 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
158
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
159 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
160 <title>C Compiler Component Files and File Usage</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
161 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
162 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
163
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
164 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
165 <title>Temporary Files</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
166 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
167 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
168 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
169 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
170
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
171 <section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
172 <title>Running the Compiler</title>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
173 <para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
174 </para>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
175 </section>
c43b678c0055 Mainly section structures added.
roug
parents: 472
diff changeset
176
472
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
177 <section>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
178 <title>Compiler Option Flags</title>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
179 <para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
180 The compiler recognizes several command-line option flags which
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
181 modify the compilation process where needed. All flags are
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
182 recognized before compilation commences so the flags may be placed
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
183 anywhere on the command line. Flags may be ran together as in "-ro",
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
184 except where a flag is followed by something else; see "-f=" and
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
185 "-d" for examples.
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
186 </para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
187 <para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
188 -A
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
189 suppresses assembly, leaving the output as assembler code in a
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
190 file whose name is postfixed ".a".
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
191 </para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
192 <para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
193 -E=&lt;number&gt;
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
194 Set the edition number constant byte to the number given. This is
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
195 an OS-9 convention for memory modules.
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
196 </para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
197 <para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
198 -O
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
199 inhibits the assembly code optimizer pass. The optimizer will
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
200 shorten object code by about 11% with a comparable increase in speed
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
201 and is recommended for production versions of de-bugged programs.
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
202 </para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
203 <para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
204 -P
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
205 invokes the profiler to generate function frequency
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
206 statistics after program execution.
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
207 </para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
208 <para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
209 -R
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
210 suppresses linking library modules into an executable program.
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
211 Outputs are left in files with postfixes ".r".
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
212 </para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
213 <para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
214 -M=&lt;memory size&gt;
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
215 will instruct the linker to allocate &lt;memory size&gt;
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
216 for data, stack, and parameter area. Memory size may be expressed
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
217 in pages (an integer) or in kilobytes by appending "k" to an
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
218 integer. For more details of the use of this option, see the
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
219 "Memory Management" section of this manual.
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
220 </para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
221 <para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
222 -L=&lt;filename&gt;
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
223 specifies a library to be searched by the linker
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
224 before the Standard Library and system interface.
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
225 </para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
226 <para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
227 -F=&lt;path&gt;
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
228 overrides the above output file naming. The output file
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
229 will be left with &lt;filename&gt; as its name. This flag does not make
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
230 sense in multiple source mode, and either the -a or -r flag is also
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
231 present. The module will be called the last name in &lt;path&gt;.
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
232 </para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
233 <para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
234 -C
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
235 will output the source code as comments with the assembler code.
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
236 </para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
237 <para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
238 -S
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
239 stops the generation of stack-checking code. -S should only be
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
240 used with great care when the appication is extremely time-critical
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
241 and when the use of the stack by compiler generated code is fully
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
242 understood.
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
243 </para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
244 <para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
245 -D&lt;identifier&gt;
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
246 is equivalent to "#define &lt;identifier&gt;" written in
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
247 the source file. -D is useful where different versions of a program
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
248 are maintained in one source file and differentiated by means of the
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
249 "#ifdef" of "#ifndef" pre-processor directives. If the &lt;identifier&gt;
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
250 is used as a macro for expansion by the pre-processor, "1"(one) will
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
251 be the expanded "value" unless the form "-d&lt;identifier&gt;=&lt;string&gt;" is
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
252 used in which case the expansion will be &lt;string&gt;.
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
253 </para>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
254 <table frame="none">
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
255 <title>Command Line and Option Flag Examples</title>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
256 <tgroup cols="3">
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
257 <colspec colwidth="1.5in" colname="c1">
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
258 <colspec colwidth="1.5in" colname="c2">
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
259 <colspec colwidth="1.5in" colname="c3">
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
260 <thead>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
261 <row>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
262 <entry>command line</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
263 <entry>action</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
264 <entry>output file(s)</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
265 </row>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
266 </thead>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
267 <tbody>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
268 <row>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
269 <entry>cc prg.c</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
270 <entry>compile to an executable program</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
271 <entry>prg</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
272 <entry></entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
273 </row>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
274 <row>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
275 <entry>cc prg.c -a</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
276 <entry>compile to assembly language source code</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
277 <entry>prg.a</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
278 </row>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
279 <row>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
280 <entry>cc prg.c -r</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
281 <entry>compile to relocatable module</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
282 <entry>prg.r</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
283 </row>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
284 <row>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
285 <entry>cc prg1.c prg2.c prg3.c</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
286 <entry>compile to executable program</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
287 <entry>prg1.r, prg2.r, prg3.r, output</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
288 </row>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
289 <row>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
290 <entry>cc prg1.c prg2.a prg3.r</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
291 <entry>compile prg1.c, assemble prg2.a and combine all into
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
292 and executable program</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
293 <entry>prg1.r, prg2.r</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
294 </row>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
295 <row>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
296 <entry>cc prg1.c prg2.c -a</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
297 <entry>compile to assembly language source code</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
298 <entry>prg1.a, prg2.a</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
299 </row>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
300 <row>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
301 <entry>cc prg1.c prg2.c -f=prg</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
302 <entry>compile to executable program</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
303 <entry>prg</entry>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
304 </row>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
305 </tbody>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
306 </tgroup>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
307 </table>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
308
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
309 </section>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
310 </chapter>