0% found this document useful (0 votes)
34 views7 pages

Organization of 8085 (Part 1)

The 8085 CPU contains 8 general purpose 8-bit registers that can be used individually or in pairs as 16-bit registers. It also contains registers like the Program Counter, Stack Pointer, Accumulator, Flags register, and Instruction Register. The Accumulator is used for arithmetic and logical operations. The ALU performs computations and stores results in the Accumulator and Flags register. Temporary data is stored in the Temporary Data Register during operations. The Program Counter tracks the next instruction address.

Uploaded by

Sarvesh Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views7 pages

Organization of 8085 (Part 1)

The 8085 CPU contains 8 general purpose 8-bit registers that can be used individually or in pairs as 16-bit registers. It also contains registers like the Program Counter, Stack Pointer, Accumulator, Flags register, and Instruction Register. The Accumulator is used for arithmetic and logical operations. The ALU performs computations and stores results in the Accumulator and Flags register. Temporary data is stored in the Temporary Data Register during operations. The Program Counter tracks the next instruction address.

Uploaded by

Sarvesh Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Jyoh .

Com

Architectureof 8085 CPU


itechure, it
The internal of a microprocessor is called its arch
design ng
determ ines how an d what operations are perform ed by the microprocessor.

Registers presernt in 8085:- of them can be


The 8085 MPU has 8 addressable 8-bit registers. Six
used as 8-bit registers or three 16-bit register pairs. In
addition to these, the
8085 contain two more 16-bit registers.

List of different registers present in 8085


A) 8 Bit Registers -1)Accumulator (Register A)
2) Register B
3) Register C
4) Register D
5) Register E 8, addressable 8-bit registers
6) Register H
1) Register
TyOTI D. 8) Flag Register ( Register F)J
9) Temporary Data Register (TDR)
10) Instruction Register (IR)

B) 16- Bit Register 1) Register pair BC


-

DE
2) Register pair
3) Register pair HL
4) Program counter (PC)
5) Stack Pointer (SP)

Accumulator (Register A or Acc)-


8-bit 8085. It is used in various arithm etic
register present in
It is an
subtraction, AND, OR, XOR etc.
and logical operations such as addition,
one operand must be present in
Whenever an operation is to be perdormed
register. It is an
the accumulator an d other may be in any general-purpose
accumulator in most of the
im portant register, the data moves through
source register. It is also called a destin ation
operations hence it is called a
back in the accumulator.
register as the result of the operation goes

STJC
CompJer S iene
ALU (Arithmetic Logic Unit):
The Arithm etic Logic Unit perfom s the computing functions. it is
closely associated with Accumu lator, Flag register an d Temporary Dala
register. Arithm etic and logical operations are main ly perform ed in the

ALU. The result is typically deposited in the Accumulator and the status of
the result is deposited in the
flag register.

Temporary Data Register (TDR): -


t i s an 8 - bit register used by ALU for storing data temporariiy. It is
nom ally used during arith m etic and logical operation s. ALU has no internal
m em ory register hence during arithmetic and logical operations second
operand, which comes from general-purpose register, moves through TDR.
It is also used for holding interm ediate an swers of the calcu lations.

TYOTI D.
General Purpose Registers:
There are SLX general purp0se registers present in 8085
m icroprOcessor. There nam es are B,C,D,E,H, & L.Through a program
programmer can use these registers. These registers can be used individually
as an8 bit register or two registers together as one 16 bit register but while
form ing pairs only following pairs are allowed BC, DE, & HL. The higher
byte is stored in right register for
byte is stored in left register and the lower
e.g. suppose a no. 153AH is to be stored in register pair BC then higher byte
1SH will get tran sferred in register B and 3AH will get tran sferred in reg ister
C. HL 16 egisterfunctions as a data pointerfeference mem ory address that
is eith er the source or destin ation in many operations. Mem ory location
HL register pair is called "M".
pointed by

D
H

Program Counter
It is a l6 bit register used to keep the track of the address of an
in stru ction in the mem ory that is to be executed. A program is a series of
in stru ctions stored in a memory. If the program is to be run successfully then
all the instructions must occur in corect sequence. PC holds the address of
the instruction to be executed and it autom atically increm ents during the
execution of the in stru ction so that at the end of the execution of the
in struction PC poin ts to the next address. Hence this register is also called a
m em ory pointer.

Sicrni IyorT L D
Instruction Register (IR)and Insiruction Decoder(D):
IR is an 8 - bit register and its only job is to hold instru ction, wh ich is
being exccuted, by the microprocessor. Whenever an in struction is fetched
from the memory address po inter pointed by PC, a copy of it is taken in to
IR The internal data bus does this. Afterward the execution of the
the
instruction begins. During the execution of the instru ction ID reads
contents of IR. The decoder tells Tim ing and Control unit exactly what is to
be done to carry out the instruction, accordingly the instru ction is executed

lag or status register


It is an 8-bit register. This register is used to store the status of the
an swer after a certsin arith m etic or logical operation, during the program
execution. This register contains 5, 1-bit flags contain ing status inform ation.
These flags are ithen used by conditional jump, call and return from
subroutine instnuctions.
The five flags found in a flag register are as shown in the figure;

D Ds Ds D Da D D Do
LsZX Acl X1PX ICYI
SIGN
CARRY
ZERO PARITY
AUXILARY CARRY
1. CY (carry) Flag: Thisflag sets during arith metic operations such as
addition, subtraction elc. For example during addition of two numbers
FFH and 02H, the resultant answer is 101H, which can not be
accomm odated by an 8-bit accumulator. Hence whenever carry is
generated during arithm etic or logical operation CY flag bit sets to
T'. But if carry is not gen erated then CY flag bit rem ains in reset state
(logie 0')
CY flag acts as a borrow fla8 during subtraction, in dicating the
m inuend is less than the subtrahend if the fag is set.

2. P (parity) Flag: This flag tests for the number of "1' bits in the
answer gen erated in ALU. If the answer has even number of 1" and
0 , i t is said that even parily exist and the parity flag bit is set to ]
However if the accumulator holds an cdd number of1 and 0*" (called
odd parity), the parity flag resets to "0'

Ci nte
e.g. if the yesalt of the operatioi s
3tI0I10
Parity Flag will set to 1' as there are even number of 1*an d 0

A C (Auxiliary carry): This flag in dicates overflow out of 3 bit in


the an swer, in the same m anner a carry flag in dicates overflow from
7bit. This flag is commonly used in BCD (Binary Coded Decim al)
arith m etic intern ally by MPU. This flag bit is not available to
programmer to change the sequence of a program using bran ch group
in stru ctio ns

4. Z (zero) Flag: This flag bit sets to 1' when the resul generated by a
certain operation is zero, an d rem ains in reset state wh en the result is
o n zero.

For a carry but the an swer in the accumulator 1s


result which has a

zero, e.g.100H both carry an d zero flags set.

. S. S(sign) Flag - I t is set to the condition of most sign ificant bit of the
8ccumulator following the execution of arithm etic or logical
instru ctions. These instuctions use the MSB of data to represent the
sign of the number contained in the accumulator. Therefore set sign
flag represents a n egative number where as reset flag means a positive
number. In a given byte if D7" bit of the result is "l' sign flag sets to
the
1, aid the number is viewed as a negative number. *f it zero ,

number is considered as positive. In such operations bits D, -------Do


number.
represents m agnitu de of the

- O TI D.D no
STJC
RST 5.5 RST 7.5 SID SOD
INTR
L t
Serial 1/0D
Ínterrupt Control
Control

8-bit Internal Data Bus

(8) (8) (8) (8)C. (8)


Flag Instruction
Accumulator Temp..Reg. RegSReg
REG A Flip-lops Register (8)
D(8 E
Reg Reg.
H (8) L (8)
Instruction Reg. Reg
Arithmetic Decoder Stack (16) Register
Logic and 1 Pointer Array
Unit Machine
Programn (16)|
(ALU) Cycle Counter
Encoding
Incrementer/ (16)|
Decrementer
Address Latch
Power +5V
Supply GND nid
Timing and Control
CKL Addre6s (8)
Address Buffer
X GEN Control Starus DMA Reset Data Buífer

Clk Out RD WR AL S S, 10/M HLDA Reset Out


As-As AD, ADP
Hold Reset In Address Bus Address /Daia Bus
Ready
Tc 8o 85 FUNCTI ONAL BLOck DIAGRAM
Copjen Sciemc .

STACK a progranmer, wnic


he sequence of memory locations set as+de by
staCk is a
the execulion ol
are used to store binary
information (bytes) temporarily during
stack is called the lOp
location of the occupied porlion of the
rogram. The last memory
on last in first out (LIFO) principle
f the stack. Data items are stored in the stack sixteen-bit
are defined on the _tack PUSH
and POP. A special
Only lwo operations
address of the stacktop.
cgister known as stack ponter holds the LXI SP,
the program by uSung
The stack pointer is initialized in the beginning of defuned,
initialization. Once the stack
location is
addr. ThiS is known as stack pointer than the address in
less
of data bytes begins at the memory address that is one
toring at COS3
the storing of data begins
he SP register. (Tf Sp is loaded with address CO54,
and continues în the reversed numerical order. on the
can be used as a stack
There is no restriction
Any area of memory memory
Ocation. But it is a usual practice to
intialise stack at highest available
The size of the stack is limited by
focation to prevent program from being destroyed.
vailable memory only. the programmer can
Stack is shared by the programmer and the microprocessor ot
i.e. it is used for temporary storage
* r e and retrieve the contents of registers of PC
contents
automatically stores the
egister contents whereas the microprocessor indicates that
An address in the SP register
when a subroutine is called in the program
numerical order c a n be used for storage.
the next fwo menmory locations (in descending
decremented by two bytes each time
when data is stored
The stack pointer is retrieved (popped
incTemented by two bytes when data is
pushed into the stack) and is
deal with register paurs.
off the stack) as the stack pointer operations
PUSH Rp in the operand are copfëd into the stack
T1he cantents of register pair designated is decremented and the contents of
in the following sequence. The stack pointer register .The SP is
are copied into that location
he higher order register (i.e. B, D, H)
of the lower order register (1.e. C, E, L) are copied
decremented again and the contents
into that location.
2QPRP pointed out SP are copied to the low
by
The content of the memory location
The SP is incremented and the content of that
order register (i.e C, E, L) of the operand.
are copied to the higher
order register (B, D, H,) of the operand. The
.nemory location
SP is again incremented by one.
of memory location in R/WM reserved for storing information
Stack is a set
the execution of a progran. A stack pointer is
a 16 bit register in
emporanily during stack i.e. staek top.
he microprocessor that
indichtes the beginnng ot the memory
of the instruction following the CALL instruction
When a subroutine is called address
at the end of subroutine is executed
stack. When the RET instruction
a
s stored in the
transferred to the PC.
in top two locations of the stack are
wo data bytes stored
Jy oti D

3
PoP CExam ple)
PUSH 4
604
605
66 Nes availa ble
lo (otio n

SP
60& 6B -608
I6o 5C stab lo atjo

Next available beatian


POP B
AUSH B

1604
w 604 C
16o jSP
N a iiae 605 2.71 34
l605 Oction
605 SP
RegB ReC
606
C 1606
1607 AB 607 AB
608 2A 608 2 A
609 609 18
Slack bé fore uSH operoflon Stack beforre
PoP operokion

RAB Re C Rs Re
603
1604
604 2 Nex gvala le Nel aikbk kokm
605
605 8B
C 6a6 16 06 SP
60 B
160SP 1607 AB
L602 6R 2A
609 TB l609
PUSH oFreti on Stack 4fter PaP opeahon
Slak ater

You might also like