Professional Documents
Culture Documents
1
Bus
Bus: A shared group of wires used for
communicating signals among devices
• address bus: the device and the location within the
device that is being accessed
• data bus: the data value being communicated
• control bus: describes the action on the address and
data buses
8085 Microprocessor Architecture
Now we will examine these components more closely
by using the Intel 8085 microprocessor architecture
as an example:
3
The 8085 Bus Structure
The 8-bit 8085 CPU (or MPU – Micro Processing Unit) communicates
with the other units using a 16-bit address bus, an 8-bit data bus
and a control bus.
4
The 8085: CPU Internal Structure
The internal architecture of the 8085 CPU is
capable of performing the following operations:
5
The 8085 Bus Structure
Address Bus
6
The 8085 Bus Structure
Data Bus
Control Bus
7
The 8085: CPU Internal Structure
8
The 8085: Registers
9
Registers
• The 8085programming model includes six
registers, one accumulator, and one flag
register. In addition, it has two 16-bit registers:
the stack pointer and the program counter.
• six general-purpose registers to store 8-bit data;
these are identified as
• B,C,D,E,H, and L as shown in the figure. They
can be combined as register pairs -
• BC, DE, and HL - to perform some 16-bit
operations.
Accumulator
• The accumulator is an 8-bit register
that is a part of arithmetic/logic unit
(ALU). This register is used to store
8-bit data and to perform arithmetic
and logical operations.
• The result of an operation is stored in
the accumulator. The accumulator is
also identified as register A.
Flags
• The ALU includes five flip-flops, which are
set or reset after an operation according
to data conditions of the result in the
accumulator and other registers. They are
called Zero(Z), Carry (CY), Sign (S), Parity
(P), and Auxiliary Carry (AC) flags The
microprocessor uses these flags to test
data conditions.
Flag Registers
D7 D6 D5 D4 D3 D2 D1 D0
S Z AC P CY
Carry Flag
3A = 00111010 3A = 10101010
+7C = 01111100 +78 = 01111000
B6 = 10110110 B2 = 10110010
PF=0 PF=1
Auxillary Carry Flag
• If the carry propagates from the 4th bit of
the result to the 5th bit, then this bit is set.
3A=00111010
+7C=01111100
B6=10110110
AC=1
AC=1
Zero Flag
• The zero flag shows that the result of an
arithmetic or logic operation is zero.
• If the result is zero, ZF=1; If the result is not
zero, ZF=0.
• P-Parity flag
– After an ALU operation if the result has an even no: of 1’s the p-flag
is set. Otherwise it is cleared. So, the flag can be used to indicate
even parity.
• CY-carry flag
If an arithmetic operation results in a carry, the CY flag is set;
otherwise it is reset
Just A Minute!!!
• Let the contents of register A = 59 &
B= C8.
The contents are summed up using
the ADD instruction. What would the
contents of accumulator and flag
register after the instruction is
executed?
Program Counter (PC)
Load an 8-bit
data
MVI A, 32H 0011 1110 3E First Byte
Load an 8-bit
data
MVI B,F2H 0000 0110 06 First Byte
Transfer the
program
JMP 2085H 1100 0011 C3 First Byte
Second Byte
sequence to 1000 0101 85 Third Byte
the memory
location 0010 0000 20
2085H.
• This instruction would require three
memory locations to store in memory