Page 119 - Understanding Automotive Electronics
P. 119
2735 | CH 4 Page 106 Tuesday, March 10, 1998 11:06 AM
4 MICROCOMPUTER INSTRUMENTATION AND CONTROL
Figure 4.4
Registers Available
in a Typical
Microcomputer
FPO
CPU REGISTERS
The programmer (the person who writes the sequences of instructions
for a particular task) uses a different model (a programming model) of the
microprocessor used in a system than does the hardware designer. This model
shows the programmer which registers in the CPU are available for program
use, and what function the registers perform. By way of illustration Figure 4.4
shows a programming model microprocessor for a typical 8-bit (now obsolete)
microcomputer. The computer has two 8-bit registers and three 16-bit
registers. The 16-bit registers are discussed later; the 8-bit registers are
discussed here.
Accumulator Register
The accumulator regis- One of the 8-bit registers is an accumulator, a general-purpose register that
ter, also called the A reg- is used for arithmetic and logical operations. The accumulator can be loaded
ister, is used for with data from a memory location, or its data can be stored in a memory
arithmetic and logical location. The number held in the accumulator can be added to, subtracted
operations. from, or compared with another number from memory. The accumulator is the
basic work register of a computer. It is commonly called the A register.
106 UNDERSTANDING AUTOMOTIVE ELECTRONICS