Hardware Reference
In-Depth Information
these registers, the processor also contains all the necessary equipment to perform
the instructions, but these parts are available to the programmer only through the
instructions.
C.2.1 The Processor Cycle
The operation of the 8088 (and all other computers) consists of executing
instructions, one after another. The execution of a single instruction can be broken
down into the following steps:
1.
Fetch the instruction from memory from the code segment using PC .
2.
Increment the program counter.
3.
Decode the fetched instruction.
4.
Fetch the necessary data from memory and/or processor registers.
5.
Perform the instruction.
6.
Store the results of the instruction in memory and/or registers.
7.
Go back to step 1 to start the next instruction.
The execution of an instruction is somewhat like running a very small program. In
fact, some machines really do have a little program, called a microprogram ,to
execute their instructions. Microprograms are described in detail in Chap. 4.
From the point of view of an assembly programmer, the 8088 has a set of 14
registers. These registers are in some sense the scratch pad where the instructions
operate and are in constant use, although the results stored in them are very
volatile. Figure C-2 gives an overview of these 14 registers. It is clear that this fig-
ure and the register window of the tracer of Fig. C-1 are very similar because they
represent the same information.
The 8088 registers are 16 bits wide. No two registers are completely function-
ally equivalent, but some of them share certain features, so they are subdivided into
groups in Fig. C-2. We will now discuss the different groups.
C.2.2 The General Registers
The registers in the first group, AX , BX , CX , and DX are the general registers .
The first register of this group, AX , is called the accumulator register . It is used
to collect results of computations and is the target of many of the instructions.
Although each of the registers can perform a host of tasks, in some instructions this
AX is the implied destination, for example, in multiplication.
The second register of this group is BX , the base register . For many purposes
BX can be used in the same way as AX , but it has one power AX does not have. It is
 
 
 
Search WWH ::




Custom Search