INTRODUCTION
THE 8088's POWERFUL 16-BIT
INSTRUCTION SET
The
8088
has the most powerful instructions
of
any 8-bit microprocessor. In addition to
the standard instruction types you would find
on
other 8-bit machines, the 8088 offers
powerful 16-bit instructions that perform the
function
of
mUltiple instructions on older
8-bit architectures. Figure
1-16
through
1-21
show the various groupings and the instruc-
tion names.
The
14
data transfer instructions (Fig.
1-16)
move single bytes and words between memory
and registers as well as between registers
AL
or
AX and 110 ports. The stack manipula-
tion instructions are included in this group as
are instructions for transferring flag contents
and for loading segment registers.
8088
arithmetic operations (Fig.
1-17)
may be
performed on four types
of
numbers: un-
signed
binary,
signed
binary
integers,
unsigned
packed
decimal
and
unsigned
GENERAL PURPOSE
MOV
Move byte or word
PUSH Push word onto stack
POP
Pop word
off
stack
XCHG
Exchange byte or word
XLAT Translate byte
INPUT/OUTPUT
IN
Input byte or word
OUT
Output byte
or
word
ADDRESS OBJECT
LEA
Load effective address
LDS
Load pointer using
DS
LES
Load pointer using
ES
FLAG TRANSFER
LAHF Load
AH
register from flags
SAHF Store
AH
register in flags
PUSHF Push flags onto stack
POPF
Pop flags
off
stack
Figure 1-16. Data Transfer
Instructions
unpacked decimal numbers. Binary numbers
may be 8-bits
or
16-bits long, decimal
numbers are stored in bytes, two digits per
byte for packed decimal, and one digit per
byte for unpacked decimal.
The
8088
provides three groups of bit manip-
ulation
instructions
(Fig.
1-18)
for
manipulating bits within bytes and words
and for performing logical shifts and rotates.
The logical instructions include the Boolean
operators NOT, inclusive OR, exclusive OR,
plus a
TEST
instruction that sets the flags
but does not alter either of its operands.
1-10
The bits in bytes or words may
be
shifted
arithmetically
or
logically by the shift instruc-
tions. Up
to
255
shifts may be performed
according to the value
of
the count operand
coded in the instruction. The count may be
specified as the constant "1"
or
as the con-
tents
of
register
eL,
allowing the shift count
to be a variable supplied during program
ADDITION
ADD
Add byte
or
word
ADC
Add byte
or
word with carry
INC
Increment byte
or
word by 1
AAA ASCII adjust for addition
DAA Decimal adjust for addition
SUBTRACTION
SUB Subtract byte
or
word
SBB Subtract byte
or
word with borrow
DEC
Decrement byte
or
word by 1
NEG
Negate byte or word
CMP Compare byte
or
word
AAS ASCII adjust for subtraction
DAS
Decimal adjust
for
subtraction
MUL
TIPLICATION
MUL Multiply byte
or
word unsigned
IMUL Integer multiply byte or word
AAM ASCII adjust for multiply
DIVISION
DIV
Divide byte
or
word unsigned
IDIV
Integer divide byte
or
word
AAD ASCII adjust for division
CBW Convert byte to word
CWD
Convert word to doubleword
Figure 1-17.
Arithmetic
Instructions