Professional Documents
Culture Documents
LANGUAGE PROGRAMMING
(Course Code: 3330705)
COURSE OFFERED IN :
SEMESTER : 3, DIPLOMA COMPUTER ENGINEERING
Architecture of 8085
Architecture of 8085
and their pairing combination looks like B-C, D-E & H-L.
Continue..
3. Program counter (PC) :
◦ Program counter is a special purpose register.
◦ It is 16-bits in size.
◦ It stores the address of the next instruction/ byte which is
fetch from memory after executing current instruction.
◦ 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.
◦ The content (i.e. address) of Program counter is increment
automatically after successful execution of current
instruction.
Continue..
4. Stack Pointer (SP):
◦ 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).
◦ Generally stack is defined by using last location of Memory in
8085 which is FFFF H.
◦ 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 SP
when data is
-> FFFFH ->retrieved
XX from
byte
stack. FFFEH -> XY byte
FFFCH -> 00
Continue..
5. Temporary registers (W & Z):
◦ This temporary registers can only be accessed by the
microprocessor and it is completely inaccessible to programmer
◦ Temporary register is an 8-bit register.
◦ This register is used by control systems to hold operand,
intermediate operand, and address of memory and I/O devices
temporarily.
6. Flag Register :
◦ Flag register is a group of flip flops used to give status of
different operations result.
◦ The flag register is connected with ALU.
◦ Once an operation is performed by ALU the result is transferred
on internal data bus and status of result will be stored in flip
flops.
D7 D6 D5 D4 D3 D2 D1 D0
S Z X AC X P X CY
Continue..
6. Flag Register :
1. Sign flag(S) : This flag is set using MSB of result. If MSB bit =0 then the
answer is consider as positive, else it is negative.
CY -> 1 1 0 1 1
A=67H 0 1 1 0 0 1 1 1
B=E2 H 1 1 1 0 0 0 1 0
CY -> 1 0 1 0 0 1 0 0 1