Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ as(1) — 4D1 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cc(1)

what(1)



     AS(1)                                                       AS(1)



     NAME
          as - MIPS assembler

     SYNOPSIS
          as [ option ] ... file ...

     DESCRIPTION
          As, the MIPS assembler, runs on MIPS machines under UNIX
          System 4.3bsd and System V. It produces files in the
          following formats: MIPS object code in MIPS extended coff(5)
          format (the normal result) and binary assembly language.  As
          never runs the loader.  As accepts several types of
          arguments:

          Arguments whose names end with `.s' are assumed to be
          symbolic assembly language source programs.  They are
          assembled, producing a `.o' file.

          Arguments whose names end with `.G' are assumed to be binary
          assembly language.  Files that are assumed to be binary
          assembly language by the suffix convention are also assumed
          to have their corresponding symbol table in a file with a
          `.T' suffix.

          As always defines the C preprocessor macros mips, hostmips
          and unix to the C macro preprocessor and defines the C
          preprocessor macro LANGUAGEASSEMBLY when a `.s' file is
          being compiled.

          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
               inaccurate.

          -w   Suppress warning messages.

          -p0  Do not permit any profiling.  This is only for programs



     Page 1                                        (last mod. 8/20/87)





     AS(1)                                                       AS(1)



               that must be as small as possible.  This option is the
               default.


          -p1  Permits profiling by periodically sampling the value of
               the program counter.  Unless the environment variable
               PROFSAMP is set before execution, no profiling takes
               place and the program is as compact and fast as if it
               was created with -p0.  If profiling happens, the
               startup routine calls monstartup(3) and produces a file
               mon.out that contains execution-profiling data for use
               with the postprocessor prof(1).

          -p2 or -p
               Cause the assembler to generate code that counts the
               invocations of each routine (and permit pc-sampling,
               depending on the environment variable PROFSAMP as in
               -p1).  This provides the same level of profiling as the
               System V or 4.3bsd -p option.  The profiling is then
               done in the same way as -p1.

          -p3  Cause the assembler to generate code that counts now
               many times each basic block of a program executes (and
               permit pc-sampling, depending on the environment
               variable PROFSAMP as in -p1).  The profiling is then
               done in the same way as -p1.

          -P   Run only the C macro preprocessor and put the result
               for each `.s' file in a corresponding `.i' file.  The
               `.i' file has no `#' lines in it.

          -E   Run only the C macro preprocessor on the specified
               assembly source files, and send the result to the
               standard output.

          -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
               argument, then in directories specified in -I options,



     Page 2                                        (last mod. 8/20/87)





     AS(1)                                                       AS(1)



               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 512 bytes.  Please note that this
               switch is non-standard and may not be supported across
               product lines.

          -Zv  Print the passes as they execute with their arguments
               and their input and output files.  Also prints resource
               usage in the C-shell time format on UNIX 4.3bsd
               systems.

          -V   Print the version of the driver and the versions of all
               passes.  This is done with the what(1) command.  Please
               note that this switch is non-standard and may not be
               supported across product lines.

          The options described below primarily aid compiler
          development and are not generally used:

          -Hc  Halt compiling after the pass specified by the
               character 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 the suffix changed to `.T' and is not
               removed.  Please note that this switch is non-standard
               and may not be supported across product lines.

          -K   Build and use intermediate file names with the last
               component of the source file's  name replacing its
               suffix with the conventional suffix for the type of
               file (for example `.G' file for binary assembly
               language) These intermediate files are never removed
               even when a pass encounters a fatal error.  Please note
               that this switch is non-standard and may not be
               supported across product lines.

          -Wc,arg1[,arg2...]
               Pass the argument[s] argi to the assembler pass c. The
               c is one of [ pab ]. The c selects the assembler pass
               in the same way as the -t option.




     Page 3                                        (last mod. 8/20/87)





     AS(1)                                                       AS(1)



          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
               designated by the characters following the -t option
               according to the following table:
               Name     Character
               include      h
               cpp          p
               as0          a
               as1          b

          -hpath
               Use path rather than the directory where the name is
               normally found.  Please note that this switch is non-
               standard and may not be supported across product lines.

          -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
               designates all names.

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

          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
          translator
          /usr/lib/as1  binary assembly language assembler and
          reorganizer
          /usr/include  standard directory for `#include' files

     SEE ALSO
          MIPS Assembler Manual
          cc(1), what(1)

     DIAGNOSTICS
          The diagnostics produced by the assembler are intended to be



     Page 4                                        (last mod. 8/20/87)





     AS(1)                                                       AS(1)



          self-explanatory.

     BUGS
          Profiling (-p, -p1, -p2, -p3) are not yet supported.

     ORIGIN
          MIPS Computer Systems
















































     Page 5                                        (last mod. 8/20/87)



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