Patches from Jerry Blakely <gerry_blakley@wellfleet.com>:
[deliverable/binutils-gdb.git] / gas / doc / as.1
1 .\" Copyright (c) 1991, 1992 Free Software Foundation
2 .\" See section COPYING for conditions for redistribution
3 .TH as 1 "21 January 1992" "cygnus support" "GNU Development Tools"
4
5 .SH NAME
6 GNU as\-\-the portable GNU assembler.
7
8 .SH SYNOPSIS
9 .na
10 .B as
11 .RB "[\|" \-a "[\|" dhlns "\|]" \c
12 \&\[\|\=\c
13 .I file\c
14 \&\|]\|]
15 .RB "[\|" \-D "\|]"
16 .RB "[\|" \-f "\|]"
17 .RB "[\|" \-I
18 .I path\c
19 \&\|]
20 .RB "[\|" \-K "\|]"
21 .RB "[\|" \-L "\|]"
22 .RB "[\|" \-o
23 .I objfile\c
24 \&\|]
25 .RB "[\|" \-R "\|]"
26 .RB "[\|" \-v "\|]"
27 .RB "[\|" \-w "\|]"
28 .RB "[\|" \-\^\- "\ |\ " \c
29 .I files\c
30 \&\|.\|.\|.\|]
31
32 .I i960-only options:
33 .br
34 .RB "[\|" \-ACA "\||\|" \-ACA_A "\||\|" \-ACB\c
35 .RB "\||\|" \-ACC "\||\|" \-AKA "\||\|" \-AKB\c
36 .RB "\||\|" \-AKC "\||\|" \-AMC "\|]"
37 .RB "[\|" \-b "\|]"
38 .RB "[\|" \-no-relax "\|]"
39
40 .I m680x0-only options:
41 .br
42 .RB "[\|" \-l "\|]"
43 .RB "[\|" \-mc68000 "\||\|" \-mc68010 "\||\|" \-mc68020 "\|]"
44 .ad b
45
46 .SH DESCRIPTION
47 GNU \c
48 .B as\c
49 \& is really a family of assemblers.
50 If you use (or have used) the GNU assembler on one architecture, you
51 should find a fairly similar environment when you use it on another
52 architecture. Each version has much in common with the others,
53 including object file formats, most assembler directives (often called
54 \c
55 .I pseudo-ops)\c
56 \& and assembler syntax.
57
58 For information on the syntax and pseudo-ops used by GNU \c
59 .B as\c
60 \&, see `\|\c
61 .B as\c
62 \|' entry in \c
63 .B info \c
64 (or the manual \c
65 .I
66 .I
67 Using as: The GNU Assembler\c
68 \&).
69
70 \c
71 .B as\c
72 \& is primarily intended to assemble the output of the GNU C
73 compiler \c
74 .B gcc\c
75 \& for use by the linker \c
76 .B ld\c
77 \&. Nevertheless,
78 we've tried to make \c
79 .B as\c
80 \& assemble correctly everything that the native
81 assembler would.
82 This doesn't mean \c
83 .B as\c
84 \& always uses the same syntax as another
85 assembler for the same architecture; for example, we know of several
86 incompatible versions of 680x0 assembly language syntax.
87
88 Each time you run \c
89 .B as\c
90 \& it assembles exactly one source
91 program. The source program is made up of one or more files.
92 (The standard input is also a file.)
93
94 If \c
95 .B as\c
96 \& is given no file names it attempts to read one input file
97 from the \c
98 .B as\c
99 \& standard input, which is normally your terminal. You
100 may have to type \c
101 .B ctl-D\c
102 \& to tell \c
103 .B as\c
104 \& there is no more program
105 to assemble. Use `\|\c
106 .B \-\^\-\c
107 \|' if you need to explicitly name the standard input file
108 in your command line.
109
110 .B as\c
111 \& may write warnings and error messages to the standard error
112 file (usually your terminal). This should not happen when \c
113 .B as\c
114 \& is
115 run automatically by a compiler. Warnings report an assumption made so
116 that \c
117 .B as\c
118 \& could keep assembling a flawed program; errors report a
119 grave problem that stops the assembly.
120
121 .SH OPTIONS
122 .TP
123 .BR \-a
124 Turn on assembly listings. There are various suboptions.
125 .B d
126 omits debugging directives.
127 .B h
128 includes the high level source code; this is only available if the
129 source file can be found, and the code was compiled with
130 .B \-g.
131 .B l
132 includes an assembly listing.
133 .B n
134 omits forms processing.
135 .B s
136 includes a symbol listing.
137 .B =
138 .I file
139 sets the listing file name; this must be the last suboption.
140 The default suboptions are
141 .B hls.
142 .TP
143 .B \-D
144 This option is accepted only for script compatibility with calls to
145 other assemblers; it has no effect on \c
146 .B as\c
147 \&.
148 .TP
149 .B \-f
150 ``fast''--skip preprocessing (assume source is compiler output).
151 .TP
152 .BI "\-I\ " path
153 Add
154 .I path
155 to the search list for
156 .B .include
157 directives.
158 .TP
159 .B \-K
160 Issue warnings when difference tables altered for long displacements.
161 .TP
162 .B \-L
163 Keep (in symbol table) local symbols, starting with `\|\c
164 .B L\c
165 \|'
166 .TP
167 .BI "\-o\ " objfile
168 Name the object-file output from \c
169 .B as
170 .TP
171 .B \-R
172 Fold data section into text section
173 .TP
174 .B \-v
175 Announce \c
176 .B as\c
177 \& version
178 .TP
179 .B \-W
180 Suppress warning messages
181 .TP
182 .IR "\-\^\-" "\ |\ " "files\|.\|.\|."
183 Source files to assemble, or standard input (\c
184 .BR "\-\^\-" ")"
185 .TP
186 .BI \-A var
187 .I
188 (When configured for Intel 960.)
189 Specify which variant of the 960 architecture is the target.
190 .TP
191 .B \-b
192 .I
193 (When configured for Intel 960.)
194 Add code to collect statistics about branches taken.
195 .TP
196 .B \-no-relax
197 .I
198 (When configured for Intel 960.)
199 Do not alter compare-and-branch instructions for long displacements;
200 error if necessary.
201 .TP
202 .B \-l
203 .I
204 (When configured for Motorola 68000).
205 .br
206 Shorten references to undefined symbols, to one word instead of two.
207 .TP
208 .BR "\-mc68000" "\||\|" "\-mc68010" "\||\|" "\-mc68020"
209 .I
210 (When configured for Motorola 68000).
211 .br
212 Specify what processor in the 68000 family is the target (default 68020)
213
214 .PP
215 Options may be in any order, and may be
216 before, after, or between file names. The order of file names is
217 significant.
218
219 `\|\c
220 .B \-\^\-\c
221 \|' (two hyphens) by itself names the standard input file
222 explicitly, as one of the files for \c
223 .B as\c
224 \& to assemble.
225
226 Except for `\|\c
227 .B \-\^\-\c
228 \|' any command line argument that begins with a
229 hyphen (`\|\c
230 .B \-\c
231 \|') is an option. Each option changes the behavior of
232 \c
233 .B as\c
234 \&. No option changes the way another option works. An
235 option is a `\|\c
236 .B \-\c
237 \|' followed by one or more letters; the case of
238 the letter is important. All options are optional.
239
240 The `\|\c
241 .B \-o\c
242 \|' option expects exactly one file name to follow. The file
243 name may either immediately follow the option's letter (compatible
244 with older assemblers) or it may be the next command argument (GNU
245 standard).
246
247 These two command lines are equivalent:
248 .br
249 .B
250 as\ \ \-o\ \ my\-object\-file.o\ \ mumble.s
251 .br
252 .B
253 as\ \ \-omy\-object\-file.o\ \ mumble.s
254
255 .SH "SEE ALSO"
256 .RB "`\|" as "\|'"
257 entry in
258 .B
259 info\c
260 \&;
261 .I
262 Using as: The GNU Assembler\c
263 \&;
264 .BR gcc "(" 1 "),"
265 .BR ld "(" 1 ")."
266
267 .SH COPYING
268 Copyright (c) 1991, 1992 Free Software Foundation, Inc.
269 .PP
270 Permission is granted to make and distribute verbatim copies of
271 this manual provided the copyright notice and this permission notice
272 are preserved on all copies.
273 .PP
274 Permission is granted to copy and distribute modified versions of this
275 manual under the conditions for verbatim copying, provided that the
276 entire resulting derived work is distributed under the terms of a
277 permission notice identical to this one.
278 .PP
279 Permission is granted to copy and distribute translations of this
280 manual into another language, under the above conditions for modified
281 versions, except that this permission notice may be included in
282 translations approved by the Free Software Foundation instead of in
283 the original English.
This page took 0.03974 seconds and 4 git commands to generate.