User's Manual

APPENDIX
B
THE
80286
INSTRUCTION
SET
This section presents the 80286 instruction set using Intel's ASM286 notation. All possible operand
types are shown. Instructions are organized alphabetically according
to
generic operations. Within each
operation, many different instructions are possible depending
on
the operand. The pages are presented
in a standardized format, the elements of which are described in the following paragraphs.
Ope
ode
This column gives the complete object code produced for each form of the instruction. Where possible,
the codes are given
as
hexadecimal bytes, presented in the order in which they
will
appear in memory,
Several shorthand conventions are used for the parts of instructions which specify operands. These
conventions are as follows:
In:
(n
is
a digit from 0 through
7)
A ModRM byte, plus a possible immediate and displacement field
follow the opcode. See figure
B-1
for the encoding of the fields. The digit n
is
the value of the
REG
field of the ModRM byte.
To
obtain the possible hexadecimal values for /
n,
refer
to
column n of
table
B-1.
Each
row
gives a possible value for the effective address operand to the instruction. The
entry at the end
of
the
row
indicates whether the effective address operand
is
a register
or
memory; if
memory, the entry indicates what kind of indexing
and/or
displacement
is
used. Entries with
D8
or
Dl6
signify
that
a one-byte or two-byte displacement quantity immediately follows the ModRM and
optional immediate field bytes. The signed displacement
is
added
to
the effective address offset.
I r: A ModRM byte
that
contains both a register operand and an effective address operand, followed
by a possible immediate and displacement field. See figure
B-2
for the encoding of the fields. The
ModRM byte could be any value appearing
in
table
B-1.
The column determines which register operand
was selected; the
row
determines the form of effective address.
If
the
row
entry mentions
D8
or D
16,
then a one-byte or two-byte displacement follows,
as
described in the previous paragraph.
cb: A one-byte signed displacement in the range of
-128
to +
127
follows
the opcode. The displace-
ment
is
sign-extended to
16
bits, and added modulo 65536
to
the offset of the instruction FOLLOW-
ING
this instruction to obtain the new IP value.
cw: A two-byte displacement
is
added modulo 65536
to
the offset of the instruction FOLLOWING
this instruction to obtain the
new
IP value.
cd: A two-word pointer which
will
be the
new
CS:IP value. The offset
is
given first, followed by the
selector.
db: An immediate byte operand to the instruction which
follows
the opcode and ModRM bytes. The
opcode determines if it
is
a signed value.
dw: An immediate word operand to the instruction which
follows
the opcode and ModRM bytes. All
words are given in the
80286 with the low-order byte first.
+ rb: A register code from 0 through 7 which
is
added to the hexadecimal byte given at the left of
the plus sign
to
form a single opcode byte. The codes are: AL=O,
CL=
1,
DL=2,
BL=3,
AH=4,
CH=5,
DH=6,
and
BH=7.
8-1