   This file documents the GNU Assembler "as".

   Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.

   Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

   Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided that
the entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

   Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions.

Labels
======

   A "label" is written as a symbol immediately followed by a colon
`:'.  The symbol then represents the current value of the active
location counter, and is, for example, a suitable instruction operand.
You are warned if you use the same symbol to represent two different
locations: the first definition overrides any other definitions.

   On the HPPA, the usual form for a label need not be immediately
followed by a colon, but instead must start in column zero.  Only one
label may be defined on a single line.  To work around this, the HPPA
version of `as' also provides a special directive `.label' for defining
labels more flexibly.

Giving Symbols Other Values
===========================

   A symbol can be given an arbitrary value by writing a symbol,
followed by an equals sign `=', followed by an expression (see
Expressions.).  This is equivalent to using the `.set' directive.
See `.set'.

Symbol Names
============

   Symbol names begin with a letter or with one of `._'.  On most
machines, you can also use `$' in symbol names; exceptions are noted in
Machine Dependencies.  That character may be followed by any
string of digits, letters, dollar signs (unless otherwise noted in
Machine Dependencies), and underscores.  For the AMD 29K
family, `?' is also allowed in the body of a symbol name, though not at
its beginning.

   Case of letters is significant: `foo' is a different symbol name
than `Foo'.

   Each symbol has exactly one name.  Each name in an assembly language
program refers to exactly one symbol.  You may use that symbol name any
number of times in a program.

Local Symbol Names
------------------

   Local symbols help compilers and programmers use names temporarily.
There are ten local symbol names, which are re-used throughout the
program.  You may refer to them using the names `0' `1' ... `9'.  To
define a local symbol, write a label of the form `N:' (where N
represents any digit).  To refer to the most recent previous definition
of that symbol write `Nb', using the same digit as when you defined the
label.  To refer to the next definition of a local label, write
`Nf'--where N gives you a choice of 10 forward references.  The `b'
stands for "backwards" and the `f' stands for "forwards".

   Local symbols are not emitted by the current GNU C compiler.

   There is no restriction on how you can use these labels, but
remember that at any point in the assembly you can refer to at most 10
prior local labels and to at most 10 forward local labels.

   Local symbol names are only a notation device.  They are immediately
transformed into more conventional symbol names before the assembler
uses them.  The symbol names stored in the symbol table, appearing in
error messages and optionally emitted to the object file have these
parts:

`L'
     All local labels begin with `L'. Normally both `as' and `ld'
     forget symbols that start with `L'. These labels are used for
     symbols you are never intended to see.  If you use the `-L' option
     then `as' retains these symbols in the object file. If you also
     instruct `ld' to retain these symbols, you may use them in
     debugging.

`DIGIT'
     If the label is written `0:' then the digit is `0'.  If the label
     is written `1:' then the digit is `1'.  And so on up through `9:'.

^AA'
     This unusual character is included so you do not accidentally
     invent a symbol of the same name.  The character has ASCII value
     `\001'.

`*ordinal number*'
     This is a serial number to keep the labels distinct.  The first
     `0:' gets the number `1'; The 15th `0:' gets the number `15';
     *etc.*.  Likewise for the other labels `1:' through `9:'.

   For instance, the first `1:' is named `L^AA1', the 44th `3:' is named
`L^AA44'.

The Special Dot Symbol
======================

   The special symbol `.' refers to the current address that `as' is
assembling into.  Thus, the expression `melvin: .long .' defines
`melvin' to contain its own address.  Assigning a value to `.' is
treated the same as a `.org' directive.  Thus, the expression `.=.+4'
is the same as saying `.space 4'.

Symbol Attributes
=================

   Every symbol has, as well as its name, the attributes "Value" and
"Type".  Depending on output format, symbols can also have auxiliary
attributes.

   If you use a symbol without defining it, `as' assumes zero for all
these attributes, and probably won't warn you.  This makes the symbol
an externally defined symbol, which is generally what you would want.

Value
-----

   The value of a symbol is (usually) 32 bits.  For a symbol which
labels a location in the text, data, bss or absolute sections the value
is the number of addresses from the start of that section to the label.
Naturally for text, data and bss sections the value of a symbol changes
as `ld' changes section base addresses during linking.  Absolute
symbols' values do not change during linking: that is why they are
called absolute.

   The value of an undefined symbol is treated in a special way.  If it
is 0 then the symbol is not defined in this assembler source file, and
`ld' tries to determine its value from other files linked into the same
program.  You make this kind of symbol simply by mentioning a symbol
name without defining it.  A non-zero value represents a `.comm' common
declaration.  The value is how much common storage to reserve, in bytes
(addresses).  The symbol refers to the first address of the allocated
storage.

Type
----

   The type attribute of a symbol contains relocation (section)
information, any flag settings indicating that a symbol is external, and
(optionally), other information for linkers and debuggers.  The exact
format depends on the object-code output format in use.

Symbol Attributes: `a.out'
--------------------------

Descriptor
..........

   This is an arbitrary 16-bit value.  You may establish a symbol's
descriptor value by using a `.desc' statement (see `.desc').
A descriptor value means nothing to `as'.

Other
.....

   This is an arbitrary 8-bit value.  It means nothing to `as'.

Symbol Attributes for COFF
--------------------------

   The COFF format supports a multitude of auxiliary symbol attributes;
like the primary symbol attributes, they are set between `.def' and
`.endef' directives.

Primary Attributes
..................

   The symbol name is set with `.def'; the value and type,
respectively, with `.val' and `.type'.

Auxiliary Attributes
....................

   The `as' directives `.dim', `.line', `.scl', `.size', and `.tag' can
generate auxiliary symbol table information for COFF.

Symbol Attributes for SOM
-------------------------

   The SOM format for the HPPA supports a multitude of symbol
attributes set with the `.EXPORT' and `.IMPORT' directives.

   The attributes are described in `HP9000 Series 800 Assembly Language
Reference Manual' (HP 92432-90001) under the `IMPORT' and `EXPORT'
assembler directive documentation.

Expressions
***********

   An "expression" specifies an address or numeric value.  Whitespace
may precede and/or follow an expression.

   The result of an expression must be an absolute number, or else an
offset into a particular section.  If an expression is not absolute,
and there is not enough information when `as' sees the expression to
know its section, a second pass over the source program might be
necessary to interpret the expression--but the second pass is currently
not implemented.  `as' aborts with an error message in this situation.

Empty Expressions
=================

   An empty expression has no value: it is just whitespace or null.
Wherever an absolute expression is required, you may omit the
expression, and `as' assumes a value of (absolute) 0.  This is
compatible with other assemblers.

Integer Expressions
===================

   An "integer expression" is one or more *arguments* delimited by
*operators*.

Arguments
---------

   "Arguments" are symbols, numbers or subexpressions.  In other
contexts arguments are sometimes called "arithmetic operands".  In this
manual, to avoid confusing them with the "instruction operands" of the
machine language, we use the term "argument" to refer to parts of
expressions only, reserving the word "operand" to refer only to machine
instruction operands.

   Symbols are evaluated to yield {SECTION NNN} where SECTION is one of
text, data, bss, absolute, or undefined.  NNN is a signed, 2's
complement 32 bit integer.

   Numbers are usually integers.

   A number can be a flonum or bignum.  In this case, you are warned
that only the low order 32 bits are used, and `as' pretends these 32
bits are an integer.  You may write integer-manipulating instructions
that act on exotic constants, compatible with other assemblers.

   Subexpressions are a left parenthesis `(' followed by an integer
expression, followed by a right parenthesis `)'; or a prefix operator
followed by an argument.

Operators
---------

   "Operators" are arithmetic functions, like `+' or `%'.  Prefix
operators are followed by an argument.  Infix operators appear between
their arguments.  Operators may be preceded and/or followed by
whitespace.

Prefix Operator
---------------

   `as' has the following "prefix operators".  They each take one
argument, which must be absolute.

`-'
     "Negation".  Two's complement negation.

`~'
     "Complementation".  Bitwise not.

Infix Operators
---------------

   "Infix operators" take two arguments, one on either side.  Operators
have precedence, but operations with equal precedence are performed left
to right.  Apart from `+' or `-', both arguments must be absolute, and
the result is absolute.

  1. Highest Precedence

    `*'
          "Multiplication".

    `/'
          "Division".  Truncation is the same as the C operator `/'

    `%'
          "Remainder".

    `<'
    `<<'
          "Shift Left".  Same as the C operator `<<'.

    `>'
    `>>'
          "Shift Right".  Same as the C operator `>>'.

  2. Intermediate precedence

    `|'
          "Bitwise Inclusive Or".

    `&'
          "Bitwise And".

    `^'
          "Bitwise Exclusive Or".

    `!'
          "Bitwise Or Not".

  3. Lowest Precedence

    `+'
          "Addition".  If either argument is absolute, the result has
          the section of the other argument.  You may not add together
          arguments from different sections.

    `-'
          "Subtraction".  If the right argument is absolute, the result
          has the section of the left argument.  If both arguments are
          in the same section, the result is absolute.  You may not
          subtract arguments from different sections.

   In short, it's only meaningful to add or subtract the *offsets* in an
address; you can only have a defined section in one of the two
arguments.

Assembler Directives
********************

   All assembler directives have names that begin with a period (`.').
The rest of the name is letters, usually in lower case.

   This chapter discusses directives that are available regardless of
the target machine configuration for the GNU assembler.  Some machine
configurations provide additional directives.  See Machine Dependencies.

`.abort'
========

   This directive stops the assembly immediately.  It is for
compatibility with other assemblers.  The original idea was that the
assembly language source would be piped into the assembler.  If the
sender of the source quit, it could use this directive tells `as' to
quit also.  One day `.abort' will not be supported.

`.ABORT'
========

   When producing COFF output, `as' accepts this directive as a synonym
for `.abort'.

   When producing `b.out' output, `as' accepts this directive, but
ignores it.

`.align ABS-EXPR , ABS-EXPR'
============================

   Pad the location counter (in the current subsection) to a particular
storage boundary.  The first expression (which must be absolute) is the
number of low-order zero bits the location counter must have after
advancement.  For example `.align 3' advances the location counter
until it a multiple of 8.  If the location counter is already a
multiple of 8, no change is needed.

   For the HPPA, the first expression (which must be absolute) is the
alignment request in bytes.  For example `.align 8' advances the
location counter until it is a multiple of 8.  If the location counter
is already a multiple of 8, no change is needed.

   The second expression (also absolute) gives the value to be stored in
the padding bytes.  It (and the comma) may be omitted.  If it is
omitted, the padding bytes are zero.

`.app-file STRING'
==================

   `.app-file' (which may also be spelled `.file') tells `as' that we
are about to start a new logical file.  STRING is the new file name.
In general, the filename is recognized whether or not it is surrounded
by quotes `"'; but if you wish to specify an empty file name is
permitted, you must give the quotes-`""'.  This statement may go away in
future: it is only recognized to be compatible with old `as' programs.

`.ascii "STRING"'...
====================

   `.ascii' expects zero or more string literals (see Strings.)
separated by commas.  It assembles each string (with no automatic
trailing zero byte) into consecutive addresses.

`.asciz "STRING"'...
====================

   `.asciz' is just like `.ascii', but each string is followed by a
zero byte.  The "z" in `.asciz' stands for "zero".

`.byte EXPRESSIONS'
===================

   `.byte' expects zero or more expressions, separated by commas.  Each
expression is assembled into the next byte.

`.comm SYMBOL , LENGTH '
========================

   `.comm' declares a named common area in the bss section.  Normally
`ld' reserves memory addresses for it during linking, so no partial
program defines the location of the symbol.  Use `.comm' to tell `ld'
that it must be at least LENGTH bytes long.  `ld' allocates space for
each `.comm' symbol that is at least as long as the longest `.comm'
request in any of the partial programs linked.  LENGTH is an absolute
expression.

   The syntax for `.comm' differs slightly on the HPPA.  The syntax is
`SYMBOL .comm, LENGTH'; SYMBOL is optional.

`.data SUBSECTION'
==================

   `.data' tells `as' to assemble the following statements onto the end
of the data subsection numbered SUBSECTION (which is an absolute
expression).  If SUBSECTION is omitted, it defaults to zero.

`.def NAME'
===========

   Begin defining debugging information for a symbol NAME; the
definition extends until the `.endef' directive is encountered.

   This directive is only observed when `as' is configured for COFF
format output; when producing `b.out', `.def' is recognized, but
ignored.

`.desc SYMBOL, ABS-EXPRESSION'
==============================

   This directive sets the descriptor of the symbol (see Symbol Attributes.)
to the low 16 bits of an absolute expression.

   The `.desc' directive is not available when `as' is configured for
COFF output; it is only for `a.out' or `b.out' object format.  For the
sake of compatibility, `as' accepts it, but produces no output, when
configured for COFF.

`.dim'
======

   This directive is generated by compilers to include auxiliary
debugging information in the symbol table.  It is only permitted inside
`.def'/`.endef' pairs.

   `.dim' is only meaningful when generating COFF format output; when
`as' is generating `b.out', it accepts this directive but ignores it.

`.double FLONUMS'
=================

   `.double' expects zero or more flonums, separated by commas.  It
assembles floating point numbers.  The exact kind of floating point
numbers emitted depends on how `as' is configured.  See Machine Dependencies.

`.eject'
========

   Force a page break at this point, when generating assembly listings.

`.else'
=======

   `.else' is part of the `as' support for conditional assembly; see
`.if'.  It marks the beginning of a section of code to be
assembled if the condition for the preceding `.if' was false.

`.endef'
========

   This directive flags the end of a symbol definition begun with
`.def'.

   `.endef' is only meaningful when generating COFF format output; if
`as' is configured to generate `b.out', it accepts this directive but
ignores it.

`.endif'
========

   `.endif' is part of the `as' support for conditional assembly; it
marks the end of a block of code that is only assembled conditionally.
See `.if'.

`.equ SYMBOL, EXPRESSION'
=========================

   This directive sets the value of SYMBOL to EXPRESSION.  It is
synonymous with `.set'; see `.set'.

   The syntax for `equ' on the HPPA is `SYMBOL .equ EXPRESSION'.

`.extern'
=========

   `.extern' is accepted in the source program--for compatibility with
other assemblers--but it is ignored.  `as' treats all undefined symbols
as external.

`.file STRING'
==============

   `.file' (which may also be spelled `.app-file') tells `as' that we
are about to start a new logical file.  STRING is the new file name.
In general, the filename is recognized whether or not it is surrounded
by quotes `"'; but if you wish to specify an empty file name, you must
give the quotes-`""'.  This statement may go away in future: it is only
recognized to be compatible with old `as' programs.  In some
configurations of `as', `.file' has already been removed to avoid
conflicts with other assemblers.  See Machine Dependencies.

`.fill REPEAT , SIZE , VALUE'
=============================

   RESULT, SIZE and VALUE are absolute expressions.  This emits REPEAT
copies of SIZE bytes.  REPEAT may be zero or more.  SIZE may be zero or
more, but if it is more than 8, then it is deemed to have the value 8,
compatible with other people's assemblers.  The contents of each REPEAT
bytes is taken from an 8-byte number.  The highest order 4 bytes are
zero.  The lowest order 4 bytes are VALUE rendered in the byte-order of
an integer on the computer `as' is assembling for.  Each SIZE bytes in
a repetition is taken from the lowest order SIZE bytes of this number.
Again, this bizarre behavior is compatible with other people's
assemblers.

   SIZE and VALUE are optional.  If the second comma and VALUE are
absent, VALUE is assumed zero.  If the first comma and following tokens
are absent, SIZE is assumed to be 1.

`.float FLONUMS'
================

   This directive assembles zero or more flonums, separated by commas.
It has the same effect as `.single'.  The exact kind of floating point
numbers emitted depends on how `as' is configured.  See Machine Dependencies.

`.global SYMBOL', `.globl SYMBOL'
=================================

   `.global' makes the symbol visible to `ld'.  If you define SYMBOL in
your partial program, its value is made available to other partial
programs that are linked with it.  Otherwise, SYMBOL takes its
attributes from a symbol of the same name from another file linked into
the same program.

   Both spellings (`.globl' and `.global') are accepted, for
compatibility with other assemblers.

   On the HPPA, `.global' is not always enough to make it accessible to
other partial programs.  You may need the HPPA-only `.EXPORT' directive
as well.  See HPPA Assembler Directives.

`.hword EXPRESSIONS'
====================

   This expects zero or more EXPRESSIONS, and emits a 16 bit number for
each.

   This directive is a synonym for `.short'; depending on the target
architecture, it may also be a synonym for `.word'.

`.ident'
========

   This directive is used by some assemblers to place tags in object
files.  `as' simply accepts the directive for source-file compatibility
with such assemblers, but does not actually emit anything for it.

`.if ABSOLUTE EXPRESSION'
=========================

   `.if' marks the beginning of a section of code which is only
considered part of the source program being assembled if the argument
(which must be an ABSOLUTE EXPRESSION) is non-zero.  The end of the
conditional section of code must be marked by `.endif' (see `.endif');
optionally, you may include code for the alternative
condition, flagged by `.else' (see `.else'.

   The following variants of `.if' are also supported:
`.ifdef SYMBOL'
     Assembles the following section of code if the specified SYMBOL
     has been defined.

`.ifndef SYMBOL'
`ifnotdef SYMBOL'
     Assembles the following section of code if the specified SYMBOL
     has not been defined.  Both spelling variants are equivalent.

`.include "FILE"'
=================

   This directive provides a way to include supporting files at
specified points in your source program.  The code from FILE is
assembled as if it followed the point of the `.include'; when the end
of the included file is reached, assembly of the original file
continues.  You can control the search paths used with the `-I'
command-line option (see Command-Line Options).  Quotation
marks are required around FILE.

`.int EXPRESSIONS'
==================

   Expect zero or more EXPRESSIONS, of any section, separated by commas.
For each expression, emit a number that, at run time, is the value of
that expression.  The byte order and bit size of the number depends on
what kind of target the assembly is for.

`.lcomm SYMBOL , LENGTH'
========================

   Reserve LENGTH (an absolute expression) bytes for a local common
denoted by SYMBOL.  The section and value of SYMBOL are those of the
new local common.  The addresses are allocated in the bss section, so
that at run-time the bytes start off zeroed.  SYMBOL is not declared
global (see `.global'), so is normally not visible to `ld'.

   The syntax for `.lcomm' differs slightly on the HPPA.  The syntax is
`SYMBOL .lcomm, LENGTH'; SYMBOL is optional.

`.lflags'
=========

   `as' accepts this directive, for compatibility with other
assemblers, but ignores it.

`.line LINE-NUMBER'
===================

   Change the logical line number.  LINE-NUMBER must be an absolute
expression.  The next line has that logical line number.  Therefore any
other statements on the current line (after a statement separator
character) are reported as on logical line number LINE-NUMBER - 1.  One
day `as' will no longer support this directive: it is recognized only
for compatibility with existing assembler programs.

   *Warning:* In the AMD29K configuration of as, this command is not
available; use the synonym `.ln' in that context.

   Even though this is a directive associated with the `a.out' or
`b.out' object-code formats, `as' still recognizes it when producing
COFF output, and treats `.line' as though it were the COFF `.ln' *if*
it is found outside a `.def'/`.endef' pair.

   Inside a `.def', `.line' is, instead, one of the directives used by
compilers to generate auxiliary symbol information for debugging.

`.ln LINE-NUMBER'
=================

   `.ln' is a synonym for `.line'.

`.list'
=======

   Control (in conjunction with the `.nolist' directive) whether or not
assembly listings are generated.  These two directives maintain an
internal counter (which is zero initially).   `.list' increments the
counter, and `.nolist' decrements it.  Assembly listings are generated
whenever the counter is greater than zero.

   By default, listings are disabled.  When you enable them (with the
`-a' command line option; see Command-Line Options), the
initial value of the listing counter is one.

`.long EXPRESSIONS'
===================

   `.long' is the same as `.int', see `.int'.

`.nolist'
=========

   Control (in conjunction with the `.list' directive) whether or not
assembly listings are generated.  These two directives maintain an
internal counter (which is zero initially).   `.list' increments the
counter, and `.nolist' decrements it.  Assembly listings are generated
whenever the counter is greater than zero.

`.octa BIGNUMS'
===============

   This directive expects zero or more bignums, separated by commas.
For each bignum, it emits a 16-byte integer.

   The term "octa" comes from contexts in which a "word" is two bytes;
hence *octa*-word for 16 bytes.

`.org NEW-LC , FILL'
====================

   Advance the location counter of the current section to NEW-LC.
nEW-LC is either an absolute expression or an expression with the same
section as the current subsection.  That is, you can't use `.org' to
cross sections: if NEW-LC has the wrong section, the `.org' directive
is ignored.  To be compatible with former assemblers, if the section of
NEW-LC is absolute, `as' issues a warning, then pretends the section of
NEW-LC is the same as the current subsection.

   `.org' may only increase the location counter, or leave it
unchanged; you cannot use `.org' to move the location counter backwards.

   Because `as' tries to assemble programs in one pass, NEW-LC may not
be undefined.  If you really detest this restriction we eagerly await a
chance to share your improved assembler.

   Beware that the origin is relative to the start of the section, not
to the start of the subsection.  This is compatible with other people's
assemblers.

   When the location counter (of the current subsection) is advanced,
the intervening bytes are filled with FILL which should be an absolute
expression.  If the comma and FILL are omitted, FILL defaults to zero.

`.psize LINES , COLUMNS'
========================

   Use this directive to declare the number of lines--and, optionally,
the number of columns--to use for each page, when generating listings.

   If you do not use `.psize', listings use a default line-count of 60.
You may omit the comma and COLUMNS specification; the default width is
200 columns.

   `as' generates formfeeds whenever the specified number of lines is
exceeded (or whenever you explicitly request one, using `.eject').

   If you specify LINES as `0', no formfeeds are generated save those
explicitly specified with `.eject'.

`.quad BIGNUMS'
===============

   `.quad' expects zero or more bignums, separated by commas.  For each
bignum, it emits an 8-byte integer.  If the bignum won't fit in 8
bytes, it prints a warning message; and just takes the lowest order 8
bytes of the bignum.

   The term "quad" comes from contexts in which a "word" is two bytes;
hence *quad*-word for 8 bytes.

`.sbttl "SUBHEADING"'
=====================

   Use SUBHEADING as the title (third line, immediately after the title
line) when generating assembly listings.

   This directive affects subsequent pages, as well as the current page
if it appears within ten lines of the top of a page.

`.scl CLASS'
============

   Set the storage-class value for a symbol.  This directive may only be
used inside a `.def'/`.endef' pair.  Storage class may flag whether a
symbol is static or external, or it may record further symbolic
debugging information.

   The `.scl' directive is primarily associated with COFF output; when
configured to generate `b.out' output format, `as' accepts this
directive but ignores it.

`.section NAME, SUBSECTION'
===========================

   Assemble the following code into end of subsection numbered
SUBSECTION in the COFF named section NAME.  If you omit SUBSECTION,
`as' uses subsection number zero.  `.section .text' is equivalent to
the `.text' directive; `.section .data' is equivalent to the `.data'
directive.  This directive is only supported for targets that actually
support arbitrarily named sections; on `a.out' targets, for example, it
is not accepted, even with a standard `a.out' section name as its
parameter.

`.set SYMBOL, EXPRESSION'
=========================

   Set the value of SYMBOL to EXPRESSION.  This changes SYMBOL's value
and type to conform to EXPRESSION.  If SYMBOL was flagged as external,
it remains flagged. (see Symbol Attributes.)

   You may `.set' a symbol many times in the same assembly.

   If you `.set' a global symbol, the value stored in the object file
is the last value stored into it.

   The syntax for `set' on the HPPA is `SYMBOL .set EXPRESSION'.

`.short EXPRESSIONS'
====================

   `.short' is normally the same as `.word'.  See `.word'.

   In some configurations, however, `.short' and `.word' generate
numbers of different lengths; see Machine Dependencies..

`.single FLONUMS'
=================

   This directive assembles zero or more flonums, separated by commas.
It has the same effect as `.float'.  The exact kind of floating point
numbers emitted depends on how `as' is configured.  See Machine Dependencies.

`.size'
=======

   This directive is generated by compilers to include auxiliary
debugging information in the symbol table.  It is only permitted inside
`.def'/`.endef' pairs.

   `.size' is only meaningful when generating COFF format output; when
`as' is generating `b.out', it accepts this directive but ignores it.

`.space SIZE , FILL'
====================

   This directive emits SIZE bytes, each of value FILL.  Both SIZE and
FILL are absolute expressions.  If the comma and FILL are omitted, FILL
is assumed to be zero.

     *Warning:* `.space' has a completely different meaning for HPPA
     targets; use `.block' as a substitute.  See `HP9000 Series 800
     Assembly Language Reference Manual' (HP 92432-90001) for the
     meaning of the `.space' directive.  See HPPA Assembler Directives,
     for a summary.

   On the AMD 29K, this directive is ignored; it is accepted for
compatibility with other AMD 29K assemblers.

     *Warning:* In most versions of the GNU assembler, the directive
     `.space' has the effect of `.block'  Machine Dependencies.

`.stabd, .stabn, .stabs'
========================

   There are three directives that begin `.stab'.  All emit symbols
(see Symbols.), for use by symbolic debuggers.  The symbols are not
entered in the `as' hash table: they cannot be referenced elsewhere in
the source file.  Up to five fields are required:

STRING
     This is the symbol's name.  It may contain any character except
     `\000', so is more general than ordinary symbol names.  Some
     debuggers used to code arbitrarily complex structures into symbol
     names using this field.

TYPE
     An absolute expression.  The symbol's type is set to the low 8
     bits of this expression.  Any bit pattern is permitted, but `ld'
     and debuggers choke on silly bit patterns.

OTHER
     An absolute expression.  The symbol's "other" attribute is set to
     the low 8 bits of this expression.

DESC
     An absolute expression.  The symbol's descriptor is set to the low
     16 bits of this expression.

VALUE
     An absolute expression which becomes the symbol's value.

   If a warning is detected while reading a `.stabd', `.stabn', or
`.stabs' statement, the symbol has probably already been created; you
get a half-formed symbol in your object file.  This is compatible with
earlier assemblers!

`.stabd TYPE , OTHER , DESC'
     The "name" of the symbol generated is not even an empty string.
     It is a null pointer, for compatibility.  Older assemblers used a
     null pointer so they didn't waste space in object files with empty
     strings.

     The symbol's value is set to the location counter, relocatably.
     When your program is linked, the value of this symbol is the
     address of the location counter when the `.stabd' was assembled.

`.stabn TYPE , OTHER , DESC , VALUE'
     The name of the symbol is set to the empty string `""'.

`.stabs STRING ,  TYPE , OTHER , DESC , VALUE'
     All five fields are specified.

`.string' "STR"
===============

   Copy the characters in STR to the object file.  You may specify more
than one string to copy, separated by commas.  Unless otherwise
specified for a particular machine, the assembler marks the end of each
string with a 0 byte.  You can use any of the escape sequences
described in Strings.

`.tag STRUCTNAME'
=================

   This directive is generated by compilers to include auxiliary
debugging information in the symbol table.  It is only permitted inside
`.def'/`.endef' pairs.  Tags are used to link structure definitions in
the symbol table with instances of those structures.

   `.tag' is only used when generating COFF format output; when `as' is
generating `b.out', it accepts this directive but ignores it.

`.text SUBSECTION'
==================

   Tells `as' to assemble the following statements onto the end of the
text subsection numbered SUBSECTION, which is an absolute expression.
If SUBSECTION is omitted, subsection number zero is used.

`.title "HEADING"'
==================

   Use HEADING as the title (second line, immediately after the source
file name and pagenumber) when generating assembly listings.

   This directive affects subsequent pages, as well as the current page
if it appears within ten lines of the top of a page.

`.type INT'
===========

   This directive, permitted only within `.def'/`.endef' pairs, records
the integer INT as the type attribute of a symbol table entry.

   `.type' is associated only with COFF format output; when `as' is
configured for `b.out' output, it accepts this directive but ignores it.

`.val ADDR'
===========

   This directive, permitted only within `.def'/`.endef' pairs, records
the address ADDR as the value attribute of a symbol table entry.

   `.val' is used only for COFF output; when `as' is configured for
`b.out', it accepts this directive but ignores it.

`.word EXPRESSIONS'
===================

   This directive expects zero or more EXPRESSIONS, of any section,
separated by commas.

   The size of the number emitted, and its byte order, depend on what
target computer the assembly is for.

     *Warning: Special Treatment to support Compilers*

   Machines with a 32-bit address space, but that do less than 32-bit
addressing, require the following special treatment.  If the machine of
interest to you does 32-bit addressing (or doesn't require it; see
Machine Dependencies.), you can ignore this issue.

   In order to assemble compiler output into something that works, `as'
occasionlly does strange things to `.word' directives.  Directives of
the form `.word sym1-sym2' are often emitted by compilers as part of
jump tables.  Therefore, when `as' assembles a directive of the form
`.word sym1-sym2', and the difference between `sym1' and `sym2' does
not fit in 16 bits, `as' creates a "secondary jump table", immediately
before the next label.  This secondary jump table is preceded by a
short-jump to the first byte after the secondary table.  This
short-jump prevents the flow of control from accidentally falling into
the new table.  Inside the table is a long-jump to `sym2'.  The
original `.word' contains `sym1' minus the address of the long-jump to
`sym2'.

   If there were several occurrences of `.word sym1-sym2' before the
secondary jump table, all of them are adjusted.  If there was a `.word
sym3-sym4', that also did not fit in sixteen bits, a long-jump to
`sym4' is included in the secondary jump table, and the `.word'
directives are adjusted to contain `sym3' minus the address of the
long-jump to `sym4'; and so on, for as many entries in the original
jump table as necessary.

Deprecated Directives
=====================

   One day these directives won't work.  They are included for
compatibility with older assemblers.
.abort
.app-file
.line

Machine Dependent Features
**************************

   The machine instruction sets are (almost by definition) different on
each machine where `as' runs.  Floating point representations vary as
well, and `as' often supports a few additional directives or
command-line options for compatibility with other assemblers on a
particular platform.  Finally, some versions of `as' support special
pseudo-instructions for branch optimization.

   This chapter discusses most of these differences, though it does not
include details on any machine's instruction set.  For details on that
subject, see the hardware manufacturer's manual.

VAX Dependent Features
======================

VAX Command-Line Options
------------------------

   The Vax version of `as' accepts any of the following options, gives
a warning message that the option was ignored and proceeds.  These
options are for compatibility with scripts designed for other people's
assemblers.

``-D' (Debug)'
``-S' (Symbol Table)'
``-T' (Token Trace)'
     These are obsolete options used to debug old assemblers.

``-d' (Displacement size for JUMPs)'
     This option expects a number following the `-d'.  Like options
     that expect filenames, the number may immediately follow the `-d'
     (old standard) or constitute the whole of the command line
     argument that follows `-d' (GNU standard).

``-V' (Virtualize Interpass Temporary File)'
     Some other assemblers use a temporary file.  This option commanded
     them to keep the information in active memory rather than in a
     disk file.  `as' always does this, so this option is redundant.

``-J' (JUMPify Longer Branches)'
     Many 32-bit computers permit a variety of branch instructions to
     do the same job.  Some of these instructions are short (and fast)
     but have a limited range; others are long (and slow) but can
     branch anywhere in virtual memory.  Often there are 3 flavors of
     branch: short, medium and long.  Some other assemblers would emit
     short and medium branches, unless told by this option to emit
     short and long branches.

``-t' (Temporary File Directory)'
     Some other assemblers may use a temporary file, and this option
     takes a filename being the directory to site the temporary file.
     Since `as' does not use a temporary disk file, this option makes
     no difference.  `-t' needs exactly one filename.

   The Vax version of the assembler accepts two options when compiled
for VMS.  They are `-h', and `-+'.  The `-h' option prevents `as' from
modifying the symbol-table entries for symbols that contain lowercase
characters (I think).  The `-+' option causes `as' to print warning
messages if the FILENAME part of the object file, or any symbol name is
larger than 31 characters.  The `-+' option also inserts some code
following the `_main' symbol so that the object file is compatible with
Vax-11 "C".

VAX Floating Point
------------------

   Conversion of flonums to floating point is correct, and compatible
with previous assemblers.  Rounding is towards zero if the remainder is
exactly half the least significant bit.

   `D', `F', `G' and `H' floating point formats are understood.

   Immediate floating literals (*e.g.* `S`$6.9') are rendered
correctly.  Again, rounding is towards zero in the boundary case.

   The `.float' directive produces `f' format numbers.  The `.double'
directive produces `d' format numbers.