Google Search

Saturday, November 7, 2015

PROCESSOR REGISTERS

A processor includes a set of registers that provide memory that is faster and smaller than main memory.

Processor registers serve two functions: 

User-visible registers:
Enable the machine or assembly language programmer to minimize main memory references by optimizing register use.

For high level languages, an optimizing compiler will attempt to make intelligent choices of which variables to assign to registers and which to main memory locations.

Some high-level languages, such as C, allow the programmer to suggest to the compiler which variables should be held in registers.

Types of registers that are typically available are data, address, and condition code registers.

a) Data registers:
Data registers can be assigned to a variety of functions by the programmer.
 In some cases, they are general purpose in nature and can be used with any machine instruction that performs operations on data.
 Often, however, there are restrictions.
For example, there may be dedicated registers for floating-point operations and others for integer operations.

b) Address registers :
Address registers contain main memory addresses of data and instructions.
These registers may themselves be general purpose, or may be devoted to a particular way, or mode, of addressing memory.

Control and status registers:
Used by the processor to control the operation of the processor and by privileged OS routines to control the execution of programs. 

No comments:

Post a Comment