Hardware Reference
In-Depth Information
C.4 THE 8088 INSTRUCTION SET
The heart of every computer is the set of instructions it can carry out. To really
understand a computer, it is necessary to have a good understanding of its instruc-
tion set. In the following sections, we will discuss the most important of the
8088's instructions. Some of them are shown in Fig. C-4, where they are divided
into 10 groups.
C.4.1 Move, Copy and Arithmetic
The first group of instructions is the copy and move instructions. By far, the
most common is the instruction MOV , which has an explicit source and an explicit
destination. If the source is a register, the destination can be an effective address.
In this table a register operand is indicated by an r and an effective address by an e ,
so this operand combination is denoted by e
r . This is the first entry in the
Operands column for MOV . Since, in the instruction syntax, the destination is the
first operand and the source is the second operand, the arrow
is used to indicate
the operands. Thus, e
r means that a register is copied to an effective address.
For the MOV instruction, the source can also be an effective address and the
destination a register, which will be denoted by r
e , the second entry in the
Operands column of the instruction. The third possibility is immediate data as
source, and effective address as destination, which yields e
# . Immediate data in
the table is indicated by the sharp sign (#). Since both the word move MOV and the
byte move MOVB exist, the instruction mnemonic ends with a B between parenthe-
ses. Thus, the line really represents six different instructions.
None of the flags in the condition code register are affected by a move in-
struction, so the last four columns have the entry ''-''. Note that the move instruct-
ions do not move data. They make copies, meaning that the source is not modified
as would happen with a true move.
The second instruction in the table is XCHG , which exchanges the contents of a
register with the contents of an effective address. For the exchange the table uses
the symbol
. In this case, there exists a byte version as well as a word version.
Thus, the instruction is denoted by XCHG and the Operand field contains r
e .
The next instruction is LEA , which stands for Load Effective Address. It computes
the numerical value of the effective address and stores it in a register.
Next is PUSH , which pushes its operand onto the stack. The explicit operand
can either be a constant (# in the Operands column) or an effective address ( e in
the Operands column). There is also an implicit operand, SP , which is not men-
tioned in the instruction syntax. What the instruction does is decrement SP by 2,
then store the operand at the location now pointed to by SP .
Then comes POP , which removes an operand from the stack to an effective
address. The next two instructions, PUSHF and POPF , also have implied operands,
and push and pop the flags register, respectively.
This is also the case for XLAT
 
 
 
Search WWH ::




Custom Search