General Purpose Registers Engineering Study material

General Purpose Registers in microprocessor and microcontrollers uploaded by Engineering Study material

General Purpose Registers in microprocessor and microcontrollers uploaded by Gust M uploaded in Engineering Study material at lecturenotes.net


 Apart from accumulator 8085 consists of six special types of registers called General Purpose Registers. What do these general purpose registers do?


 These general purpose registers are used to hold data like any other registers. The general purpose registers in 8085 processors are B, C, D, E, H and L. Each register can hold 8-bit data. Apart from the above function these registers can also be used to work in pairs to hold 16-bit data. 


They can work in pairs such as B-C, D-E and H-L to store 16-bit data. The H-L pair works as a memory pointer. A memory pointer holds the address of a particular memory location. They can store 16-bit address as they work in pair.  

Program Counter and Stack Pointer 

Program counter is a special purpose register.  

Consider that an instruction is being executed by processor. As soon as the ALU finished executing the instruction, the processor looks for the next instruction to be executed. So, there is a necessity for holding the address of the next instruction to be executed in order to save time. This is taken care by the program counter. A program counter stores the address of the next instruction to be  executed.  In  other  words  the  program  counter  keeps  track  of  the  memory  address  of  the instructions that are being executed by the microprocessor and the memory address  of the next instruction that is going to be executed.

 

Microprocessor increments the program whenever an instruction is being executed, so that the program  counter points to the memory address of the next instruction that is going to be executed. Program counter is a 16-bit register. Stack pointer is also a 16-bit register which is used as a memory pointer. A stack is nothing but the portion of RAM (Random access memory).

So does that mean the stack pointer points to portion of RAM?

Yes. Stack pointer maintains the address of the last byte that is entered into stack.

Each time when the data is loaded into stack, Stack pointer gets decremented. Conversely it is incremented when data is retrieved from stack. 


Note:

No summary found



Title:

General Purpose Registers

Subject:

microprocessor and microcontrollers

Institute:

Engineering Study material