Lecture-05: Registers in 8085 Microprocessor(MPU)

 Registers in 8085 Microprocessor


Registers in microprocessor 8085

1.     General Purpose Registers

2.     Specific Purpose Registers

3.     Memory Register / 16-bit register

4.      Temporary Register

 

1.    General purpose register

There are 6 general purpose registers in 8085 processor, i.e. B, C, D, E, H & L. Each register can hold 8-bit data.



These registers can work in pair to hold 16-bit data and their pairing combination is like B-C, D-E & H-L.

2.    Specific Purpose Registers


 


It is an 8-bit register used to perform arithmetic, logical, I/O & LOAD/STORE operations. It is connected to internal data bus & ALU.


Accumulator

It is an 8-bit register used to perform arithmetic, logical, I/O & LOAD/STORE operations. It is connected to internal data bus & ALU.


Flag Register

It is an 8-bit register having five 1-bit flip-flops, which holds either 0 or 1 depending upon the result stored in the accumulator.

These are the set of 5 flip-flops −

  • Sign (S)
  • Zero (Z)
  • Auxiliary Carry (AC)
  • Parity (P)
  • Carry (C)

Its bit position is shown in the following table −

D7

D6

D5

D4

D3

D2

D1

D0

S

Z

X

AC

X

P

X

CY


Sign Flag:

·       It occupies the seventh bit of the flag register, which is also known as the most significant bit.

·       It helps the programmer to know whether the number stored in the accumulator is positive or negative.

·       If the sign flag is set, it means that number stored in the accumulator is negative, and if reset, then the number is positive.

 

Zero Flag:

·       It occupies the sixth bit of the flag register.

·       It is set, when the operation performed in the ALU results in zero(all 8 bits are zero), otherwise it is reset. 

 

Auxiliary Carry Flag:

·       It occupies the fourth bit of the flag register.

·       In an arithmetic operation, when a carry flag is generated by the third bit and passed on to the fourth bit, then Auxiliary Carry flag is set,  If not flag is reset.

 

Parity Flag:

·       This flag tests for number of 1’s in the accumulator.

·       If the accumulator holds even number of 1’s, then this flag is set and it is said to even parity. On the other hand, if the number of 1’s is odd, then it is reset and it is said to be odd parity.

 

Carry Flag:

·       It occupies the zeroth bit of the flag register.

·       If the arithmetic operation results in a carry (if result is more than 8 bit), then Carry Flag is set; otherwise, it is reset.


D7      D6         D5      D4      D3      D2      D1      D0

1        0        0        1        1        0        0        0

1        1        0        0        1        1        0        1

1        0        1        1        0        0        1        0        1


The term "memory register" refers to how the microprocessor interacts with memory through its registers. While the 8085 itself does not have dedicated "memory registers," it uses its internal registers and instructions to access and manipulate memory.

                Memory Register - 


   1) Program Counter (PC)     2)  Stack Pointer (SP)




 

Program Counter (PC)

 

·       Function: Holds the address of the next instruction to be executed.

·       Interaction with Memory: The PC is used to fetch instructions from memory. It increments after each fetch to point to the next instruction.

 

Stack Pointer (SP)

 

·       Function: Points to the top of the stack in memory.

·       Interaction with Memory: The SP is used to manage the stack, allowing the microprocessor to store return addresses, save register contents, and handle subroutine calls and interrupts.



Post a Comment

0 Comments