architecturemicriprocessor
architecturemicriprocessor
1. Register Unit:
There are two types of registers
1. General purpose Registers
2. Special purpose Registers
General Purpose Registers:
There are 6, 8bit general purpose registers,
namely
B, C, D, E, H & L . They can also be used as register
pairs of 16bit length.
1. BC 2. DE 3. HL
Any of them can be used to point the memory
but HL pair is also known as default memory or
data pointer.
Ex. MOV D,M
‘M’ –indicates memory content or memory
location whose address is present in HL pair only.
Instruction Register:
It is an 8 bit register which contains the opcode of
present instruction. It does not contain data.
Stack Pointer: SP
It is a 16bit register which contains the address of
the data present at the top of stack memory or it
points to top of the stack.
Stack: It is a part of Read/Write memory,
used to store temporary data and also the
content of program counter when
subroutines are used.
The technique involved in stack is LIFO i.e.
Last in First out.
When data is stored in to STACK, SP is
decremented, similarly SP is incremented when
data is accessed from stack.
Flag Register:
D7 D6 D5 D4 D3 D2 D1 D0
S Z X AC X P X CY
Temporary Registers:
W & Z are the two 8 bit temporary registers
which cannot be accessible by programmer. They
are used by the processor in some instructions.