Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ as(1) — sysv — mips UMIPS RISC/os 4.52

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cc(1)

what(1)



AS(1-SysV)          RISC/os Reference Manual           AS(1-SysV)



NAME
     as - MIPS assembler

SYNOPSIS
     as [ option ] ... file

DESCRIPTION
     as, the MIPS assembler, produces files in the following for-
     mats: MIPS object code in MIPS extended coff format (the
     normal result) and binary assembly language.  as never runs
     the loader.  as accepts one type of argument:

     The argument file is assumed to be symbolic assembly
     language source program.  It is assembled, producing an
     object file.

     Mas always defines the C preprocessor macros mips,
     hostmips, unix and LANGUAGEASSEMBLY to the C macro prepro-
     cessor.  It also defines SYSTYPESYSV by default but this
     changes if the -systype name option is specified (see the
     description below).

     The following options are interpreted by as and have the
     same meaning in cc(1).

     -g0  Have the assembler produce no symbol table information
          for symbolic debugging.  This is the default.

     -g1  Have the assembler produce additional symbol table
          information for accurate but limited symbolic debugging
          of partially optimized code.

     -g or -g2
          Have the assembler produce additional symbol table
          information for full symbolic debugging and not do
          optimizations that limit full symbolic debugging.

     -g3  Have the assembler produce additional symbol table
          information for full symbolic debugging for fully
          optimized code.  This option makes the debugger inaccu-
          rate.

     -w   Suppress warning messages.

     -P   Run only the C macro preprocessor and put the result in
          a file with the suffix of the source file changed to
          `.i' or if the file has no suffix then a `.i' is added
          to the source file name.  The `.i' file has no `#'
          lines in it.  This sets the -cpp option.

     -E   Run only the C macro preprocessor on the file and send
          the result to the standard output.  This sets the -cpp



                         Printed 1/15/91                   Page 1





AS(1-SysV)          RISC/os Reference Manual           AS(1-SysV)



          option.

     -C
     -M
     -Q   These three options are passed directly to cpp(1).
          Please see cpp(1) for details.

     -o output
          Name the final output file output.  If this option is
          used, the file `a.out' is undisturbed.

     -Dname=def
     -Dname
          Define the name to the C macro preprocessor, as if by
          `#define'.  If no definition is given, the name is
          defined as "1".

     -Uname
          Remove any initial definition of name.

     -Idir
          `#include' files whose names do not begin with `/' are
          always sought first in the directory of the file argu-
          ment, then in directories specified in -I options, and
          finally in the standard directory (/usr/include).

     -I   This option will cause `#include' files never to be
          searched for in the standard directory (/usr/include).

     -G num
          Specify the maximum size, in bytes, of a data item that
          is to be accessed from the global pointer.  num is
          assumed to be a decimal number.  If num is zero, no
          data is accessed from the global pointer.  The default
          value for num is 8 bytes.

     -v   Print the passes as they execute with their arguments
          and their input and output files.

     -V   Print the version of the driver and the versions of all
          passes.  This is done with the what(1) command.

     -cpp Run the C macro preprocessor on assembly source files
          before compiling.  This is the default for as.

     -nocpp
          Do not run the C macro preprocessor on assembly source
          files before compiling.

     Either object file target byte ordering can be produced by
     as.  The default target byte ordering matches the machine
     where the assembler is running.  The options -EB and -EL



 Page 2                  Printed 1/15/91





AS(1-SysV)          RISC/os Reference Manual           AS(1-SysV)



     specify the target byte ordering (big-endian and little-
     endian, respectively).  The assembler also defines a C
     preprocessor macro for the target byte ordering.  These C
     preprocessor macros are MIPSEB and MIPSEL for big-endian and
     little-endian byte ordering respectively.

     -EB  Produce object files targeted for big-endian byte ord-
          ering.  The C preprocessor macro MIPSEB is defined by
          the assembler.

     -EL  Produce object files targeted for little-endian byte
          ordering.  The C preprocessor macro MIPSEL is defined
          by the assembler.

     The following option is specific for as:

     -m   Apply the M4 preprocessor to the source file before
          assembling it.

     The option described below is primarily used to provide UNIX
     compilation environments other than the native compilation
     environment.

     -systype name
          Use the named compilation environment name. The names
          of the compilation environments supported are bsd43 and
          sysv.  This has the effect of changing the standard
          directory for `#include' files.  The new items are
          located in their usual paths but with /name prepended
          to their paths.  Also a preprocessor macro of the form
          SYSTYPENAME (with name capitalized) is defined in
          place of the default SYSTYPESYSV.

     -mips1
          Generate code using the instruction set of the
          R2000/R3000 RISC architecture.  This is the default for
          all R2000/R3000 based systems.

     -mips2
          Generate code using the instruction set of the R6000
          RISC architecture.  This is the default for all R6000
          based systems.

     The options described below primarily aid compiler develop-
     ment and are not generally used:

     -Hc  Halt compiling after the pass specified by the charac-
          ter c, producing an intermediate file for the next
          pass.  The c can be [ a ]. It selects the assembler
          pass in the same way as the -t option.  If this option
          is used, the symbol table file produced and used by the
          passes, is the last component of the source file with



                         Printed 1/15/91                   Page 3





AS(1-SysV)          RISC/os Reference Manual           AS(1-SysV)



          the suffix changed to `.T', or a `.T' is added if the
          source file has no suffix. This file is not removed.

     -K   Build and use intermediate file names with the last
          component of the source file's  name replacing its suf-
          fix with the conventional suffix for the type of file
          (for example `.G' file for binary assembly language).
          If the source file has no suffix the conventional suf-
          fix is added to the source file name.  These intermedi-
          ate files are never removed even when a pass encounters
          a fatal error.

     -Wc[c...],arg1[,
          Pass the argument[s] argi to the compiler pass[es]
          c[c..].  The c's are one of [pab].  The c's selects the
          compiler pass in the same way as the -t option.

     The options -t[hpab], -hpath, and -Bstring select a name to
     use for a particular pass.  These arguments are processed
     from left to right so their order is significant.  When the
     -B option is encountered, the selection of names takes place
     using the last -h and -t options.  Therefore, the -B option
     is always required when using -h or -t.  Sets of these
     options can be used to select any combination of names.

     -t[hpab]
          Select the names.  The names selected are those desig-
          nated by the characters following the -t option accord-
          ing to the following table:
               Name     Character
               include   h  (see note below)
               cpp       p
               as0       a
               as1       b

          If the character `h' is in the -t argument then a
          directory is added to the list of directories to be
          used in searching for `#include' files.  This directory
          name has the form COMP_TARGET_ROOT/usr/includestring.
          This directory is to contain the include files for the
          string release of the compiler.  The standard directory
          is still searched.

     -hpath
          Use path rather than the directory where the name is
          normally found.

     -Bstring
          Append string to all names specified by the -t option.
          If no -t option has been processed before the -B, the
          -t option is assumed to be ``hpab''.  This list desig-
          nates all names.



 Page 4                  Printed 1/15/91





AS(1-SysV)          RISC/os Reference Manual           AS(1-SysV)



     Invoking the assembler with a name of the form asstring has
     the same effect as using a -Bstring option on the command
     line.

     If the environment variable COMP_HOST_ROOT is set, the value
     is used as the root directory for all pass names rather than
     the default /. If the environment variable COMP_TARGET_ROOT
     is set, the value is used as the root directory for the
     includes rather than the default /.

     If the environment variable ROOTDIR is set, the value is
     used as the root directory for all names rather than the
     default /usr/. This also affects the standard directory for
     `#include' files, /usr/include.

     If the environment variable TMPDIR is set, the value is used
     as the directory to place any temporary files rather than
     the default /tmp/.

     Other arguments are ignored.

FILES
     file.o         object file

     a.out          assembler output

     /tmp/ctm?      temporary

     /usr/lib/cpp   C macro preprocessor

     /usr/lib/as0   symbolic to binary assembly language transla-
                    tor

     /usr/lib/as1   binary assembly language assembler and reor-
                    ganizer

     /usr/include   standard directory for `#include' files

SEE ALSO
     Assembly Language Programmer's Guide
     cc(1), what(1).

DIAGNOSTICS
     The diagnostics produced by the assembler are intended to be
     self-explanatory.










                         Printed 1/15/91                   Page 5



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026