Microprocessor Architecture - II
Microprocessor Architecture - II
Register Organization
• The 8085 microprocessor has various types of registers as
shown below.
• It includes six , 8 – bit registers (B, C, D. E, H and L), one
8-bit Accumulator and two 16-bit registers (SP and PC).
• Also there are two 8-bit temporary registers W and Z.
• These registers W and Z are not
accessible to the user, They are used
by the processor for internal,
intermediate operations.
• These registers B, C, D. E, H
and L are known as general
purpose registers.
contd
• The registers Stack Pointer and Stack Pointer are known as the speci
purpose Registers.
• So, the total registers are classified into three groups .They are
(i).Temporary registers. (W and Z )
(ii).General purpose registers (B, C, D. E, H and L)
(iii).Special purpose registers. (SP and PC).
• The special purpose registers PC and SP are 16 bit registers.So,
indirectly they indicate that they are mainly associated with
memory address manipulation.
• Because as youknow 8085 is a 8-bit processor with 16 bit-address
bus.
• So , the address of the memory location is always16-bit .
• But a very interesting thing is there are no 16-bit general purpose
registers to hold the address of the memory location.
contd
• To overcome this limitation, Intel has provided the
feature of Register pairing.
• That is two 8-bitregisters are paired so that they can
store a 16-bt address.
• The admissible register pairs are B-C; D-E and H-L
only. No other pairs are allowed.
• These pair of register are mainly used only during the
times of address accessing .
• At all the other times they are only 8-bit data registers
(B,C,D,E,H and L).
• Let us see this with an example.
• LXI H 8509 ; It means ,load immediately the register
pair H-L with the address 8509.
contd
• Here L-register is loaded with 09 and H-register is
loaded with address 85H. Here H indicates that the
address is Hexadecimal.
• It is a three byte instruction.(Hex code = 21, 09, 85
(Three bytes)
21 = 0010 0001 8-bits = 1 byte
09 = 0000 1001 8-bits = 1 byte
85 = 1000 0110 8-bits = 1 byte
Total3-bytes
Program Counter (PC)
25 & 62.
Reg. B Reg. C
contd
• After PUSH operation the status of the Stack is as
shown below.
contd
• Let us now consider POP operation: The Figs below
explains before and after the POP operation in
detail.
• Ex: POP B
Temporary Registers
• The two temporary data registers are W register and
Z register. These are 8-bit registers.
• We have already seen in the earlier video that one
temporary data register is associated with the ALU
operations.
• Similarly W and Z are also temporary registers used
to hold 8-bit data during execution of certain
instructions.
• As these registers are internally used by the CPU,
they are not accessible to the user.
• For ex: the W and Z registers are used by the
processor during CALL instruction
contd
• When a CALL instruction is encountered in any
program, the current Program counter (PC)
contents are pushed on to the stack and the given
address is loaded on to PC.
• The given address is temporarily stored in W and Z
registers and placed on the bus for the fetch cycle.
• Thus the program control is transferred to the
address given in the instruction.
• Another example is, during the execution of
XCHG instruction, the contents of H-L pair are
exchanged with D-E pair.
• At the time of exchange W and Z registers are used
for temporary storage of data.