.\" Copyright (c) 1982 Regents of the University of California
.\" @(#)asdocs4.me 1.9 %G%
.SH 1 "Machine instructions"
The syntax of machine instruction statements accepted by
is generally similar to the syntax of \*(DM.
Opcodes and register names
are spelled with lower-case rather than upper-case letters.
.SH 2 "Specifying Displacement Lengths"
Under certain circumstances,
the following constructs are (optionally) recognized by
to indicate the number of bytes to allocate for
the displacement used when constructing
displacement and displacement deferred addressing modes:
L\` L^ long word (4 bytes)
One can also use lower case
There must be no space between the size specifier letter and the
as they are by the \*(DM assembler.
It is preferred to use the
.q "\`" displacement specifier,
(including floating-point literals used where the
hardware expects a floating-point operand)
If the displacement length modifier is present,
assembled with that displacement,
even if it will fit into a smaller field,
or if significance is lost.
If the length modifier is not present,
and if the value of the displacement is known exactly in
determines the length automatically,
assembling it in the shortest possible way,
will use the value specified by the
which defaults to 4 bytes.
.SH 2 "case\fIx\fP Instructions"
considers the instructions
The displacements must be explicitly computed by
.SH 2 "Extended branch instructions"
These opcodes (formed in general
take as branch destinations
the name of a label in the current subsegment.
It is an error if the destination is known to be in a different subsegment,
and it is a warning if the destination is not defined within
the object module being assembled.
If the branch destination is close enough,
instruction is assembled.
Otherwise the assembler choses a sequence
of one or more instructions which together have the same effect as if the
instruction had a larger span.
chooses the inverse branch followed by a
is sometimes pooled among several
instructions with the same destination.
is unable to perform the same long/short branch generation
for other instructions with a fixed byte displacement,
family of instructions which has a fixed word displacement.
but is prohibitive because of the complexity of these instructions.
assembler option is given,
instruction is used instead of a
instructions with distant destinations.
This makes assembly of large (>32K bytes)
does not try to use clever combinations of
instructions use PC relative addressing,
with the length of the offset given by the
These are the extended branch instructions
if its target is close enough;
Diagnostics are intended to be self explanatory and appear on
Diagnostics either report an
Error diagnostics complain about lexical, syntactic and some
semantic errors, and abort the assembly.
The majority of the warnings complain about the use of \*(VX
features not supported by all implementations of the architecture.
will warn if new opcodes are used,
floating point numbers are used
and will complain about mixed floating conversions.
Arbitrary\** Files to assemble
BUFSIZ Significant characters per name
Arbitrary Characters per input line
Arbitrary Characters per string
\**Although the number of characters available to the \fIargv\fP line
is restricted by \*(UX to 10240.
.SH 1 "Annoyances and Future Work"
Most of the annoyances deal with restrictions on the extended
only uses a two level algorithm for resolving extended branch
instructions into short or long displacements.
What is really needed is a general mechanism
to turn a short conditional jump into a
reverse conditional jump over one of
possible unconditional branches,
The assembler should also recognize extended branch instructions for
instructions will be easy,
will be harder because the synthesized instruction
uses the index operand twice,
so one must be careful of side effects,
family will be much harder (in the general case)
because the comparison depends on the sign of the addend operand,
and two operands are used more than once.
with these extended loop instructions
will allow the peephole optimizer to produce much better
since it currently assumes the worst
case about the size of the loop body.
The string temporary file is not put in memory when the -V flag is set.
The string table in the generated a.out contains some strings
and names that are never referenced from the symbol table;
the loader removes these unreferenced strings, however.