530
Digital Electronics
to the address pins of the microprocessor and holds the absolute memory address of the data or
instruction to be accessed. The MBR, also known as the memory data register, is connected to the data
pins of the microprocessor. It stores all data written to and read from memory.
13.3.2.4 Status Register
The status register stores the status outputs of the result of an operation and gives additional information
about the result of an ALU operation. The status of bits stored in the status register tells about the
occurrence or nonoccurrence of different conditions, and one or more bits may be updated at the end
of an operation. Each bit is a Boolean flag representing a particular condition. The most common
conditions are the carry, overflow, zero and negative. For instance, a ‘1’ in the carry status bit position
shows that the result of the operation generates a carry. The significance of the status register lies in
the fact that the condition code set by the status of different bits in the status register forms the basis
of decision-making by the microprocessor during the execution of a program.
13.3.2.5 Stack Pointer
The stack pointer is a register used to store the address of a memory location belonging to the most
recent entry in the stack. In fact, a stack is a block of memory locations designated for temporary
storage of data. It is used to save data of another general-purpose register during execution of a
subroutine or when an interrupt is serviced. The data are moved from a general register to the stack
by a PUSH instruction at the beginning of a subroutine call, and back to the general register by a POP
instruction at the end of the subroutine call. Microprocessors use a stack because it is faster to move
data using PUSH and POP instructions than to move data to/from memory using a MOVE instruction.
13.3.2.6 General-purpose Registers
There is a set of registers for general-purpose use, designated as general-purpose registers. They are
used explicitly to store data and address information. Data registers are used for arithmetic operations,
while the address registers are used for indexing and indirect addressing. These enhance the processing
speed of the microprocessor by avoiding a large number of external memory read/write operations
while an ALU operation is being performed, as it is much easier and faster to read from or write into an
internal register than to read from or write into an external memory location. Earlier microprocessors
had only one register called the accumulator for ALU operations. It needed at least four assembly
language instructions to perform a simple addition, including carrying data from an external memory
location to the accumulator, adding the contents of the accumulator to those of another memory
location, storing the result in the accumulator and transferring the contents of the accumulator back to
the external memory location. With the availability of a greater number of general-purpose registers,
it would be possible to perform many ALU operations without even a need to store data in external
memory.
13.3.2.7 Temporary Registers
These are used when data have to be stored during the execution of a machine instruction. They are
completely hidden from the user of the microprocessor.
Précédent

- 547/741

Suivant