.NH 1
OPCODES SECTION.
.PP
This section is used to describe all
of the possible opcode symbolics (except the pseudo
opcodes which are always defined) and the
values of each symbolic.
Each different argument picture may be used to
select a new opcode class (a particular value
out of a class of values).
Thus - the construct
.sp
.DS L
		sub   expression
.DE
.PP
may select a value from
a list for the 'sub' instruction, while
the construct
.sp
.DS L
		sub   #expression
.DE
.PP
may be set
to select another value from the same list
for the 'sub' instruction.
The table is set out as lines of triples enclosed
in parentheses.
Each triple corresponds to a legal opcode value. The first
member of the triple is the opcode class. If this value matches the
opcode class value generated by the argument scan, the triple
is used for generating the opcode.
If there is no triple matching the class returned by the
argument scan, then this combination of argument
and opcode is illegal.
The second member of the triple is the number of a
format descriptor to use in assembling the instruction,
if no other descriptor is selected (see argument section).
The third member of the triple is the value used
by the instruction formatter for the opcode.
.sp
opcodes
add	(0 0 0x10) (2 1 0x30)
jmp	(3 2 0x7f)
sub	(0 0 0x50) (2 1 0x70)
%
.sp
.DE
.PP
In the above example there are two classes for each
of the instructions 'add' and 'sub', the first one
selected when the class returned by the argument is
0, and the second selected when the class returned is 2.
Any argument which selects a class other than 0 or 2
is illegal with 'add' or 'sub'. For the case of 'add',
if the class is 0, then the format selected is format 0,
provided the argument did not preselect the format, and
the opcode value made available to the formatter is '0x10'.
The 'jmp' instruction will only be legal with argument
pictures returning class 3.
.PP
There is no limit on the number of opcodes or classes.
However, if the listing options are to operate correctly
the largest class should be one less than the
wordsize of the machine (max class no. should
be 15 on a PDP-11, or 32 on a VAX or PERKIN-ELMER
8/32 or 3220). This limit may be raised in future releases.
.PP
The reader intending to create d-files should first look
at some of the d-files supplied with MAC.
