DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

as(1)


as -- assembler

Synopsis

   as [-VTm] [-Q yn] [-Y key,dir] [-o objfile] [-t cpu] file . . .

Description

The as command produces an object file from the concatenation of the specified assembly language input files. At least one source file must be specified, except when the -V option is given. The name ``-''' designates the standard input, and may be specified anywhere within the list of files.

The recognized assembly language does not include a general macro processing capability. Instead, as provides for optional preprocessing of the input by the m4 command. [See m4(1).]

The following options may be specified in any order:


-V
Writes the assembler's packaging, release, and version information on the standard error output. As a special case, the assembler does no other processing if no input files are specified.

-T
Accepts input that contains old-style (COFF) directives. Nevertheless, most such directives are still ineffective, as the assembler generates an ELF object file.

-m
Sends the input through the m4 macro processing command prior to assembly. All file operands are passed unmodified to the m4 command. (By using the ``--'' option-terminator, m4 options can be preserved and passed through to the m4 command; see the EXAMPLES section, below.) If present, the predefined macros file, LIBDIR/cm4defs, will be given to the m4 command as the initial input file.

-Q yn
Appends the assembler's release information to the ``.comment'' section of the generated output object file if yn is ``y''; otherwise (if yn is ``n'' or if no -Q option is specified), nothing is added.

-Y key,dir
Uses the directory dir to find the files specified by key: the m4 macro processing command (m), the predefined macros file (d), or both.

-o objfile
Causes objfile to be the name of the generated output object file. If no -o is specified, then the output object file is created in the current directory with a name that depends on the specified input files. If an input file with a name that ends with ``.s'' is present, the output file name is formed by replacing the suffix of the first such name with ``.o''; otherwise, the output file is ``a.out''.

-t cpu
Specifies the target processor to be cpu, which may be ``486'' (the default), ``386'', or ``pentium''. This option causes code generation specifically tuned to the selected processor.

Examples

Send, in order, ./cm4defs (if it exists) and mydefs and sys/file.s through m4 with the macro K predefined to be ``7'', assemble the output of m4, and generate the ELF object file output in ./file.o:
   as -m -Yd,. -- -DK=7 mydefs sys/file.s

Files


BINDIR/m4

LIBDIR/cm4defs

/usr/lib/locale/locale/LC_MESSAGES/uxcds
language-specific message file [See LANG on environ(5).]

References

a.out(4), cc(1), Intro(3elf), ld(1), m4(1), nm(1), strip(1)

Notices

The m4 macro processor is not line-oriented and recognizes many regular identifiers as its keywords (index and len, for example). Thus, preprocessing compiler-generated assembly language with m4 requires care.

Whenever possible, you should access the assembler through a compilation system interface program such as cc.

This command has been updated to handle Intel Pentium III Streaming SIMD instructions; see ``Pentium III extended floating point support'' in New features for more information.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004