Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Apropos / Subsearch:
optional field

AS(1)                       General Commands Manual                      AS(1)

       as - Sun-1, Sun-2 and Sun-3, Sun-4 and Sun386i assemblers

       as  [  -L ] [ -R ] [ -o objfile ] [ -d2 ] [ -h ] [ -j ] [ -J ] [ -O ] [
       -mc68010 ]
            [ -mc68020 ] filename

       as [ -L ] [ -R ] [ -o objfile ] [ -O[n]] [ -P [[ -Ipath ] [ -Dname ]  [
       -Dname=def ]
            [ -Uname ]]...] [ -S[C]] filename ...

       as [ -k ] [ -o objfile ] [ -R ] [ -V ] [ -i386 ]

       as  translates  the  assembly  source file, filename into an executable
       object file, objfile.  The  Sun-4  assembler  recognizes  the  filename
       argument `-' as the standard input.

       All undefined symbols in the assembly are treated as global.

       The output of the assembly is left in the file objfile.

       The following options are common to all Sun architectures.  Options for
       specific Sun architectures are listed below.

       -L     Save defined labels beginning with an L, which are normally dis-
              carded to save space in the resultant symbol table.  The compil-
              ers generate many such temporary labels.

       -R     Make the initialized data segment read-only by concatenating  it
              to  the  text  segment.   This eliminates the need to run editor
              scripts on assembly code to make initialized data read-only  and

       -o objfile
              The  next argument is taken as the name of the object file to be
              produced.  If the -o flag is not used, the object file is  named

   Sun-1, Sun-2 and Sun-3 Options
       -d2    Instruction offsets that involve forward or external references,
              and with unspecified size, are two bytes long.  (See also the -j

       -h     Suppress   span-dependent  instruction  calculations.   Restrict
              branches to medium length.  Force calls to take the most general
              form.   This option is used when the assembly must be minimized,
              even at the expense of program size  and  run-time  performance.
              It  results in a smaller and faster program than one produced by
              the -J option, but some very large programs may be unable to use
              it due to the limits of medium-length branches.

       -j     Use  short  (pc-relative)  branches to resolve jump and jump-to-
              subroutine instructions to external routines.  This is for  com-
              pact  programs  for which the -d2 option is inappropriate due to
              large-program relocation.

       -J     Suppress  span-dependent  instruction  calculations  and   force
              branches  and calls to take the most general form.  This is use-
              ful when assembly time must be minimized, even at the expense of
              program size and run-time performance.

       -O     Perform  span-dependent instruction resolution over entire files
              rather than just individual procedures.

   Sun-4 Options
       -O[n]  Enable peephole optimization corresponding to optimization level
              n  (1 if n not specified) of the Sun high-level language compil-
              ers.  This option can be used safely only when  assembling  code
              produced by a Sun compiler.

       -P     Run  cpp(1),  the  C preprocessor, on the files being assembled.
              The preprocessor is run separately on each input  file,  not  on
              their  concatenation.   The preprocessor output is passed to the
       -Uname When -P is in effect, these cpp(1) options are passed to  the  C
              preprocessor, without interpretation by as.  Otherwise, they are

       -S[C]  Produce a disassembly of the emitted code to the  standard  out-
              put.   This is most useful in combination with the -O option, to
              review optimized code.  Adding the character  C  to  the  option
              prevents comment lines from appearing in the output.

   Sun386i Options
       -k     Create position independent code. Called by cc -pic.

       -V     Write the version number of the assembler being run on the stan-
              dard error output.

       -i386  Confirm that this output is intended for an 80386 processor.

       /tmp/as*            default temporary file

       adb(1), cpp(1), dbx(1), ld(1), a.out(5) coff(5)

       The Sun Pascal compiler qualifies a nested procedure name  by  chaining
       the names of the enclosing procedures.  This sometimes results in names
       long enough to abort the assembler, which currently limits  identifiers
       to 512 characters (the Sun-4 assembler does not have this restriction).

       There  can  be  only  one  forward-reference to a symbol per arithmetic

                               18 February 1988                          AS(1)