Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ as(1) — UTek 3.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

adb(1)

cc(1)

ld(1)

a.out(5)



AS(1)                   COMMAND REFERENCE                   AS(1)



NAME
     as - an MC68000 assembler

SYNOPSIS
     as [-68010] [-68020] [-l[n] listfile] [-o outfile] [-D
     name[=def]]
     [-U name] [-I dir] [-R] [-L] [-M[x]] [-a size] [filename]

DESCRIPTION
     The assembler as is an assembler for the MC68000 family of
     microprocessors.  With the -68010 option, as assembles
     MC68010 instructions; with the -68020 option, as assembles
     instructions for the MC68010, MC68020, MC68881, and MC68882
     processors.

     Two language syntaxes are supported by as: Motorola format,
     and MIT format.  The default format is MIT.  The -M option
     selects Motorola format and, unless it is followed by an x,
     also preprocesses the source file using the C preprocessor
     cpp.

     If filename is omitted and the -o option is used, standard
     input is read for source.  Otherwise, filename is required
     and is the name of the file containing the source.  If the
     filename does not have a .s suffix, one is assumed.

OPTIONS
     Options are interpreted by the as assembler as shown.

     -68010
        Accept 68010 opcodes.

     -68020
        Accept 68010, 68020 and 68881 (68882) opcodes.

     -l[n] le
        Produce an assembler listing in the file listfile.  If
        the n is included, the listing contains line numbers.

     -R Place all initialized data in the text segment (i.e., the
        .data pseudo-operation becomes a synonym for .text).

     -o outfile
        Name the output file outfile.  If this option is not used
        the output file will have the same name as the input file
        except that the .s suffix is replaced by .o.  If filename
        is omitted, this option must be used; the source is read
        from standard input.

     -Dname=def

     -Dname



Printed 5/12/88                                                 1





AS(1)                   COMMAND REFERENCE                   AS(1)



        Define the name to the preprocessor, as if by #define. If
        def is not given, the name is defined as 1.  If the -M
        option is not used, or it includes the x, this option is
        ignored.

     -Uname
        Remove any initial definition of name.  If the -M is not
        used, or it includes the x, this option is ignored.

     -Idir
        #include files whose names do not begin with a slash ( /
        ) are always sought first in the directory of the
        filename argument, then in directories named in -I
        options, then in directories on a standard list.  If the
        -M is not used, or it includes the x, this option is
        ignored.

     -L Save defined labels beginning with an L, which are
        normally discarded to save space in the resultant symbol
        table; the C and FORTRAN compilers generate such
        temporary labels.

     -a size
        Set the automatic alignment of data to the specified
        size, where the size specifier is either b (for byte
        alignment), w (for word alignment), or l (for long word
        alignment).  Only the first character of the size
        specifier is examined.  This option only affects the
        .zerow , .zerol , .word , .long , .single , and .double
        assembler directives.  If the automatic alignment size is
        set to long, and a long word or double long word datum (
        .zerol , .long , .single , or .double) instruction is
        encountered, the current segment is padded until the
        current program counter is long-aligned.

        If the automatic alignment size is set to long, and a
        word datum (.zerow or .word) instruction is encountered,
        or if the automatic alignment size is set to word, and a
        word, long word, or double long word datum ( .zerow ,
        .zerol , .word , .long , .single , or .double)
        instruction is encountered, the current segment is padded
        until the current program counter is word-aligned.

        If the automatic alignment size is set to byte, no
        padding is done.  The default alignment size is word.

     -M[x]
        Use an input format that more closely resembles the
        standard Motorola format.  The comment character is an
        exclamation point ( ! ), circumventing a conflict with
        one of the expression operators.




Printed 5/12/88                                                 2





AS(1)                   COMMAND REFERENCE                   AS(1)



        If the x is included with the -M option, the input is not
        first processed by the C preprocessor cpp, as is normally
        the case when the -M option is used.  If the -M option is
        not specified, the input format matches the assembly
        output of the 68000 compiler cc.

        In MIT format, the input file must be lowercase (unless
        it is enclosed in double quotes, for example, an operand
        of a .print pseudo-op); a length specifier must be
        appended to the opcode with no intervening characters;
        the move opcode is spelled mov.

        In Motorola format, the opcodes and register names may be
        either uppercase or lowercase (but not mixed-case); the
        length specifier is optional except with 68880
        instructions (if omitted, a default is assumed), but if
        present, the length specifier must be separated from the
        opcode by a period; move is spelled move.

FILES
     file.s       Input file

     file.o       Object file

     /tmp/asB??????
                  Temporary for source if preprocessor used

     /tmp/ast??????
                  Temporary for text portion of object

     /tmp/asd??????
                  Temporary for data portion of object

     /lib/cpp     Preprocessor

DIAGNOSTICS
     The diagnostics produced by as are intended to be self-
     explanatory. Messages labeled Error: indicate cases in which
     the generated code is incorrect.  Messages labeled Warning:
     indicate some minor problem for which the assembler has had
     to make an assumption about the user's intentions, and has
     then generated usable code based on those assumptions.
     Messages labeled cpp68: are generated during the
     preprocessing phase (if used).

CAVEATS
     The generalized coprocessor opcodes (cpBcc, cpDBcc, cpGEN,
     cpRESTORE, cpSAVE, cpScc, and cpTRAPcc) are not supported.
     All 68880 floating-point coprocessor opcodes are prefaced by
     the letter F (for example, FRESTORE), and assume that the
     coprocessor ID is 1.




Printed 5/12/88                                                 3





AS(1)                   COMMAND REFERENCE                   AS(1)



REFERENCES
     For a complete description of the Motorola 68020 and 68880
     processor instruction sets, refer to the MC68020 32-Bit
     Microprocessor User's Manual and the MC68881 Floating-Point
     Coprocessor User's Manual.

SEE ALSO
     adb(1), cc(1), ld(1), and a.out(5).















































Printed 5/12/88                                                 4





































































%%index%%
na:192,77;
sy:269,646;
de:915,1226;
op:2141,1221;3626,2907;6797,1102;
fi:7899,446;
di:8345,814;
ca:9159,452;
se:10371,194;
re:9875,496;
%%index%%000000000169

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