Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ as(1) — MAXION/OS 1.2var17

Media Vault

Software Library

Restoration Projects

Artifacts Sought



as(1)                    MAXION/OS 1.2v9                    as(1)



NAME
     as - assembler for MIPS processors running MAXION/OS

SYNOPSIS

     as -EB|-EL
           [-D...] [-G n] [-g] [-I...] [-K pic|PIC|xgot]
           [-m] [-mcpu=cpuname] [-mfp64] [-mipsn] [-mreg64]
           [-note] [-On] [-o outfile] [-p] [-Qc] [-U...] [-V]
           [-Wm,optlist]  [-Wp,optlist]   [-Ym,path]   [-Yp,path]
           [file]

DESCRIPTION
     The as command reads assembler source from file,  optionally
     preprocesses  it  using  the m4(1) preprocessor or the cc(1)
     preprocessor facilities, and produces the corresponding  ELF
     format object file.  If file is omitted, as reads from stan-
     dard input.

     The assembler syntax supported is as defined  in  MIPS  RISC
     Architecture,  with  the  exception of the .repeat/.endr and
     .struct directives.  Pseudo opcodes and directives which  do
     not  apply  in  an  ELF  environment are quietly ignored and
     several new ELF-specific ones are accepted: .ident,  .1byte,
     .2byte, .4byte, .size, .type, .section, and .previous.

     The assembler will insert nop instructions  and  change  the
     order of instructions in the text segment to ensure that the
     instruction pipeline  constraints  are  not  violated.   The
     reordering  can  be  totally  disabled/enabled with the .set
     noreorder and .set reorder pseudo opcodes.  The default mode
     is  reorder.  When  reordering  is  enabled,  the  moving of
     instructions  (but  not  the  insertion  of  nops)  can   be
     disabled/enabled  with the .set nomove and .set move  pseudo
     opcodes.  The default mode is move.

  Options

     -D...   This option is passed on  in  its  entirety  to  the
             cc(1)  preprocessor  facilities or the m4 preproces-
             sor, if invoked.

     -EB|-EL Selects big-endian (-EB) or little-endian (-EL) out-
             put.   For  systems running MAXION/OS, -EB should be
             specified and is the default if neither is chosen.

     -G n    Specifies the maximum size in bytes of data  objects
             which  are  to be allocated space in the global data
             area.  n is assumed to be  a  decimal  number.   The
             default value is 0.

     -g      Sets debug  mode,  suppressing  optimizations  which



                                                                1





as(1)                    MAXION/OS 1.2v9                    as(1)



             would make debugging difficult.  The default setting
             is OFF.

     -I...   This option is passed on  in  its  entirety  to  the
             cc(1) preprocessor facilities, if invoked.

     -K pic|PIC|xgot
             Causes the assembler to expand the load, store,  and
             jal  macros  into  instruction sequences that ensure
             the production of position  independent  code.   The
             xgot  option  will  generate code to use an extended
             global  offset  table  which  may  be  larger   than
             64 Kbytes.  Preprocessor flag -D__pic__ or -D__PIC__
             is automatically added to the argument list for  the
             cc(1)  preprocessing facilities or the m4(1) prepro-
             cessor, if invoked.  Flags are set in the  generated
             ELF  object  file  asserting  that  it contains code
             which  correctly  calls  position  independent  code
             (pic) or is itself position independent code (PIC or
             xgot).

     -m      Causes the assembler to preprocess its  input  using
             the m4 macro preprocessor before assembly starts.

     -mcpu=cpuname
             Optimizes the pipeline scheduling for the named pro-
             cessor  family.   cpuname can take the values r2000,
             r3000, or r4000 (or r2k,  r3k,  r4k).   The  default
             value is r3000.

     -mfp64  Permits the  use  of  odd  numbered  floating  point
             registers,  for  R4000s  with  64-bit floating point
             registers enabled.

     -mipsn  Permits use of instructions from the MIPS I,  II  or
             III  instruction  set architectures depending on the
             value of n (1, 2, or 3 respectively).   The  default
             value is 1.

     -mreg64 Permits the use of  64-bit  integer  registers,  for
             R4000s with 64-bit operation enabled.

     -note   Enables the printing (on stderr) of informative mes-
             sages  from  the  assembler  which  require  no user
             action.  The default is for  these  messages  to  be
             disabled.

     -On     Causes the assembler to reorder  instructions  where
             possible   to   make   more  efficient  use  of  the
             processor's pipeline.  When n is  omitted  or  is  a
             positive  value,  the  assembler uses more sophisti-
             cated algorithms than when it has the value zero.



                                                                2





as(1)                    MAXION/OS 1.2v9                    as(1)



     -o outfile
             Specifies outfile as the name of  the  output  file.
             If  this  option  is omitted, the assembler tries to
             create the name from the input source file  name  by
             replacing the ".s" suffix with ".o".  If this fails,
             a file called a.out is created in the current direc-
             tory.

     -p      Causes the assembler to preprocess its  input  using
             the   cc(1)  macro  preprocessor  facilities  before
             assembly starts.

     -Qc     Controls production of an entry in the output file's
             .comment  section identifying the assembler version.
             If c has the value y, the entry is produced, but  if
             it  is n, the entry is suppressed.  The default is n
             to suppress the entry.

     -U...   This option is passed on  in  its  entirety  to  the
             cc(1)  preprocessor  facilities or the m4 preproces-
             sor, if invoked.

     -V      Causes the assembler to print its version number  on
             the standard error output.

     -Wm, optlist
             If -m is also  specified,  this  option  causes  the
             assembler to unpack each comma-separated option from
             optlist and pass them all as options to the m4 macro
             preprocessor.

     -Wp, optlist
             If -p is also  specified,  this  option  causes  the
             assembler to unpack each comma-separated option from
             optlist and pass them all as options  to  the  cc(1)
             macro preprocessor facility.

     -Ym, path
             If -m is also  specified,  this  option  causes  the
             assembler  to  invoke the m4 macro preprocessor from
             path.

     -Yp, path
             If -p is also  specified,  this  option  causes  the
             assembler  to  invoke  the  cc(1) macro preprocessor
             facilities from path.

     If neither byte format  is  specified,  then  the  assembler
     issues a warning and selects a default.

  Files
     If  preprocessing  is  invoked,  the  assembler  creates   a



                                                                3





as(1)                    MAXION/OS 1.2v9                    as(1)



     temporary  file to hold the preprocessed source: by default,
     this file is placed in the /var/tmp directory.  This may  be
     overridden by setting the environment variable TMPDIR to the
     name of an alternative directory.

REFERENCES
     MIPS RISC Architecture by Gerry Kane and Joe Heinrich.  This
     manual can be ordered directly from:
                  Prentice-Hall/Paramount Publishing
                  P.O. Box 11071
                  Des Moines, Iowa  50336

Telephone: (800) 947-7700
NOTICES
Full support for R4000 64-bit mode is not yet complete,
although all the basic instructions are included.
The ADDIU, ADDI, SLTIU, SLTU instructions treat an integer
argument in the range 32768 through 65535 as a signed 16 bit
number, that is, -32768 through -1. The assembler will gen-
erate a warning when this occurs.
When assembling a BREAK instruction, the code argument is
placed in bits 16 through 25 of the instruction, not 6
through 25 as specified in the architecture manual. This is
for compatibility with other MIPS assemblers.
Modified, August 1996
4

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