as [-DfKLMRvw] [-a[dhlns] [=file]] [--defsym SYM=VAL] [-I path] [-M|--mri] [-o objfile] [--|files...]
i960-onlyoptions: [-ACA|-ACA_A|-ACB|-ACC|-AKA|-AKB|-AKC|-AMC] [-b] [-no-relax]
m680x0-onlyoptions: [-l] [-mc68000|-mc68010|-mc68020]
For information on the syntax and pseudo-ops used by GNU as(1), see as(1) entry in info (or the manual Using as: The GNU Assembler).
as(1) is primarily intended to assemble the output of the GNU C compiler gcc(1) for use by the linker ld(1). Nevertheless, we've tried to make as(1) assemble correctly everything that the native assembler would. This does not mean, however, that as(1) always uses the same syntax as another assembler for the same architecture. For example, there are several known incompatible versions of 680x0 assembly language syntax.
Each time you run as(1), it assembles exactly one source program. The source program is made up of one or more files. (The standard input is also a file.)
If as(1) is given no file names, it attempts to read one input file from the as(1) standard input, which is normally your terminal. You might have to type Control-D to tell as(1) that there is no more program to assemble. Use two hyphens (--) if you must explicitly name the standard input file in your command line.
as(1) may write warnings and error messages to the standard error file (usually your terminal). This should not happen when as(1) is run automatically by a compiler. Warnings report an assumption made so that as(1) could keep assembling a flawed program; errors report a grave problem that stops the assembly.
Options may be in any order, and may be before, after, or between file names. The order of file names is significant.
The option -- (two hyphens) by itself names the standard input file explicitly, as one of the files for as(1) to assemble.
Except for -- (two hyphens), any command-line argument that begins with a hyphen (-) is an option. Each option changes the behavior of as(1). No option changes the way another option works. An option is a - followed by one or more letters; the case of the letter is important. All options are, in fact, optional.
The -o option expects exactly one file name to follow. The file name may either immediately follow the option's letter (compatible with older assemblers) or it may be the next command argument (GNU standard).
These two command lines are equivalent:
as -o my-object-file.o mumble.s as -omy-object-file.o mumble.s
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English.
as(1) entry in info Using as: The GNU Assembler.