.\" Copyright (c) 1982 Regents of the University of California
.\" @(#)asdocs3.me 1.6 %G%
.SH 1 "Pseudo-operations (Directives)"
The keywords listed below introduce directives or instructions,
and influence the later behavior of the assembler for this statement.
means that 0 or more instances of the given
tokens must appear literally;
The pseudo\-operations listed below
are grouped into functional categories.
.SH 2 "Interface to a Previous Pass"
As soon as the assembler sees this directive,
it ignores all further input
(but it does read to the end of file),
It is anticipated that this would be used in a pipe interconnected
where the first major syntax error would
cause the compiler to issue this directive,
saving unnecessary work in assembling code
that would have to be discarded anyway.
This directive causes the assembler to think it is in file
so error messages reflect the proper source file.
This directive causes the assembler to think it is on line
so error messages reflect the proper source file.
The only effect of assembling multiple files specified in the command string
with the appropriate values,
at the beginning of the source from each file.
This is the only instance where a comment is meaningful to the assembler.
This meta comment causes the assembler
causes the assembler to believe it is in file
otherwise the current file name does not change.
.SH 2 "Location Counter Control"
These two pseudo-operations cause the
assembler to begin assembling into the indicated text or data
must be defined and absolute;
also control the placement of the location counter.
\&.align $align\*(USexpr$ [ \fB,\fP $fill\*(USexpr$ ]
The location counter is adjusted
lowest bits of the location counter become zero.
assembling from 0 to $2 sup align\*(USexpr$ bytes,
taken from the low order byte of $fill\*(USexpr$.
$fill\*(USexpr$ must be absolute;
otherwise it defaults to 0.
pads by null bytes to make the location counter
the subsegment concatenation convention
and the current loader conventions
may not preserve attempts at aligning
to more than 2 low-order zero bits.
\&.org $org\*(USexpr$ [ \fB,\fP $fill\*(USexpr$ ]
The location counter is set equal to the value of $org\*(USexpr$,
which must be defined and absolute.
The value of the $org\*(USexpr$
must be greater than the current value
Space between the current value of the location counter
and the desired value are filled with bytes taken from the
low order byte of $fill\*(USexpr$,
which must be absolute and defaults to 0.
\&.space $space\*(USexpr$ [ \fB,\fP $fill\*(USexpr$ ]
The location counter is advanced by
$Space\*(USexpr$ must be defined and absolute.
The space is filled in with bytes taken from the low order
which must be defined and absolute.
$Fill\*(USexpr$ defaults to 0.
directive is a more general way to accomplish the
\&.fill $rep\*(USexpr$\fB,\fP $size\*(USexpr$\fB,\fP $fill\*(USexpr$
All three expressions must be absolute.
treated as an expression of size
is assembled and replicated
The effect is to advance the current location counter
.SH 2 "Symbol Definitions"
\&.byte $expr$ [ \fB,\fP $expr$ ]
\&.word $expr$ [ \fB,\fP $expr$ ]
\&.int $expr$ [ \fB,\fP $expr$ ]
\&.long $expr$ [ \fB,\fP $expr$ ]
list are truncated to the size indicated by the key word:
and assembled in successive locations.
may optionally be of the form:
$expression sub 1$ : $expression sub 2$
the value of $expression sub 2$ is truncated
to $expression sub 1$ bits,
and assembled in the next $expression sub 1$ bit field
which fits in the natural data size being assembled.
Bits which are skipped because a field does not fit are filled with zeros.
.q "\fB.byte\fP 3:1,2:1,5:1"
assembles two bytes, containing the values 9 and 1.
Bit field initialization with the colon operator is likely
to disappear in future releases of the assembler.
\&.quad $number$ [ , $number$ ]
\&.octa $number$ [ , $number$ ]
\&.float $number$ [ , $number$ ]
\&.double $number$ [ , $number$ ]
\&.ffloat $number$ [ , $number$ ]
\&.dfloat $number$ [ , $number$ ]
\&.gfloat $number$ [ , $number$ ]
\&.hfloat $number$ [ , $number$ ]
These initialize Bignums (see \(sc3.2.2)
in successive locations whose size is a function on the key word.
(determined by the exponent field, or lack thereof)
may not agree with type implied by the key word.
The following table shows the key words,
and the data types for the Bignums they expect.
keyword format length (bits) valid $number$(s)
\&.quad quad scalar 64 scalar
\&.octa octal scalar 128 scalar
\&.float F float 32 F, D and scalar
\&.ffloat F float 32 F, D and scalar
\&.double D float 64 F, D and scalar
\&.dfloat D float 64 F, D and scalar
\&.gfloat G float 64 G scalar
\&.hfloat H float 128 H scalar
will correctly perform other floating point conversions while initializing,
but issues a warning message.
performs all floating point initializations and conversions
using only the facilities defined
in the original (native) architecture.
\&.ascii $string$ [ , $string$]
\&.asciz $string$ [ , $string$]
in the list is assembled into successive locations,
with the first letter in the string being placed
into the first location, etc.
directive will not null pad the string;
directive will null pad the string.
(Recall that strings are known by their length,
and need not be terminated with a null,
and that the \*(CL conventions for escaping are understood.)
directive is identical to:
\&.comm $name$\fB,\fP $expression$
is not defined elsewhere,
.q "undefined external" ,
in the current assembly just like an
so that all external symbols which are not otherwise defined,
and which have a non-zero value,
are defined to lie in the bss segment,
and enough space is left after the symbol to hold
\&.lcomm $name$\fB,\fP $expression$
bytes will be allocated in the bss segment and
assigned the location of the first byte,
as global and hence will be unknown to the link editor.
If it is otherwise defined (by
it acts within the assembly exactly as if
statement were not given;
the link editor may be used
to combine this object module with other modules referring to this symbol.
if the given symbol is not defined
within the current assembly,
the link editor can combine the output of this assembly
with that of others which define the symbol.
The assembler makes all otherwise
undefined symbols external.
\&.set $name$\fB,\fP $expression$
The ($name$, $expression$)
pair is entered into the symbol table.
statements with the same name are legal;
the most recent value replaces all previous values.
\&.lsym\& $name$\fB,\fP $expression$
A unique and otherwise unreferencable instance of the
pair is created in the symbol table.
The Fortran 77 compiler uses this mechanism to pass local symbol definitions
to the link editor and debugger.
\&.stabs $string$, $expr sub 1$, $expr sub 2$, $expr sub 3$, $expr sub 4$
\&.stabn $expr sub 1$, $expr sub 2$, $expr sub 3$, $expr sub 4$
\&.stabd $expr sub 1$, $expr sub 2$, $expr sub 3$
directives place symbols in the symbol table for the symbolic
.i "Sdb: A Symbol Debugger."
Bell Laboratories, Holmdel,
.i "Symbol Table Format for Sdb",
Bell Laboratories, Holmdel, NJ. March 14, 1979.
is a stab not having a string,
stab that implicitly references
the current location counter.
directive is the name of a symbol.
If the symbol name is zero,
directive may be used instead.
The other expressions are stored
in the name list structure
and preserved by the loader for reference by
the value of the expressions are peculiar to formats required by
.nr ii \w'$expr sub 1$\ \ 'u
is used as a symbol table tag
is used as tag specific information
directive, this expression is nonexistent, and
is taken to be the value of the location counter
at the following instruction.
Since there is no associated name for a
only be used in circumstances where the name is zero.
directive can be achieved by one of the other
directives in the following manner:
$bold .stabn$ $expr sub 1$, $expr sub 2$, $expr sub 3$, $roman LL n$
because it does not clog the symbol
table with labels used only for the stab symbol entries.