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