0% found this document useful (0 votes)
79 views

MPMC Assignment-1

The document provides information about the architecture of the 8085 microprocessor. It describes the various functional units of the 8085 including the accumulator, arithmetic logic unit, general purpose registers, program counter, stack pointer, flag register, and others. It also lists and categorizes the different registers of the 8085, and provides examples of the various addressing modes used by the 8085 including immediate, register, direct, indirect, and implied addressing modes.

Uploaded by

13Panya CSE2
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

MPMC Assignment-1

The document provides information about the architecture of the 8085 microprocessor. It describes the various functional units of the 8085 including the accumulator, arithmetic logic unit, general purpose registers, program counter, stack pointer, flag register, and others. It also lists and categorizes the different registers of the 8085, and provides examples of the various addressing modes used by the 8085 including immediate, register, direct, indirect, and implied addressing modes.

Uploaded by

13Panya CSE2
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Panya Niwati

CSE-2(M)

ASSIGNMENT-1 06915002718

Q1. Draw and explain the architecture of 8085.


8085 Architecture:

8085 is pronounced as "eighty-eighty-five" microprocessor. It is an 8-bit


microprocessor designed by Intel in 1977 using NMOS technology.
It has the following configuration −

• 8-bit data bus


• 16-bit address bus, which can address up to 64KB
• A 16-bit program counter
• A 16-bit stack pointer
• Six 8-bit registers arranged in pairs: BC, DE, HL
• Requires +5V supply to operate at 3.2 MHZ single phase clock
It is used in washing machines, microwave ovens, mobile phones, etc.

8085 Microprocessor – Functional Units

8085 consists of the following functional units −


Accumulator

It is an 8-bit register used to perform arithmetic, logical, I/O & LOAD/STORE


operations. It is connected to internal data bus & ALU.

Arithmetic and logic unit

As the name suggests, it performs arithmetic and logical operations like


Addition, Subtraction, AND, OR, etc. on 8-bit data.

General purpose register

There are 6 general purpose registers in 8085 processor, i.e. B, C, D, E, H & L.


Each register can hold 8-bit data.
These registers can work in pair to hold 16-bit data and their pairing combination
is like B-C, D-E & H-L.

Program counter

It is a 16-bit register used to store the memory address location of the next
instruction to be executed. Microprocessor increments the program whenever an
instruction is being executed, so that the program counter points to the memory
address of the next instruction that is going to be executed.

Stack pointer

It is also a 16-bit register works like stack, which is always


incremented/decremented by 2 during push & pop operations.

Temporary register

It is an 8-bit register, which holds the temporary data of arithmetic and logical
operations.

Flag register

It is an 8-bit register having five 1-bit flip-flops, which holds either 0 or 1


depending upon the result stored in the accumulator.
These are the set of 5 flip-flops −

• Sign (S)
• Zero (Z)
• Auxiliary Carry (AC)
• Parity (P)
• Carry (C)

Its bit position is shown in the following table:


D7 D6 D5 D4 D3 D2 D1 D0
S Z AC P CY

Instruction registers and decoder

It is an 8-bit register. When an instruction is fetched from memory then it is


stored in the Instruction register. Instruction decoder decodes the information
present in the Instruction register.

Timing and control unit

It provides timing and control signal to the microprocessor to perform


operations. Following are the timing and control signals, which control external
and internal circuits −

• Control Signals: READY, RD’, WR’, ALE


• Status Signals: S0, S1, IO/M’
• DMA Signals: HOLD, HLDA
• RESET Signals: RESET IN, RESET OUT

Interrupt control

As the name suggests it controls the interrupts during a process. When a


microprocessor is executing a main program and whenever an interrupt occurs,
the microprocessor shifts the control from the main program to process the
incoming request. After the request is completed, the control goes back to the
main program.
There are 5 interrupt signals in 8085 microprocessors: INTR, RST 7.5, RST 6.5,
RST 5.5, TRAP.

Serial Input/output control

It controls the serial data communication by using these two instructions: SID
(Serial input data) and SOD (Serial output data).

Address buffer and address-data buffer


The content stored in the stack pointer and program counter is loaded into the
address buffer and address-data buffer to communicate with the CPU. The
memory and I/O chips are connected to these buses; the CPU can exchange the
desired data with the memory and I/O chips.

Address bus and data bus

Data bus carries the data to be stored. It is bidirectional, whereas address bus
carries the location to where it should be stored and it is unidirectional. It is used
to transfer the data & Address I/O devices.

Q2. List and categorize all the registers of 8085.


It has eight addressable 8-bit registers: A, B, C, D, E, H, L, F, and two 16-bit
registers PC and SP. These registers can be classified as −
• General Purpose Registers
• Temporary Registers: a) Temporary data register b) W and Z registers
• Special Purpose Registers: a) Accumulator b) Flag registers c) Instruction
register
• Sixteen-bit Registers: a) Program Counter (PC) b) Stack Pointer (SP)
General Purpose Registers
Registers B, C, D, E, H, and L are general purpose registers in 8085
Microprocessor. All these GPRS are 8-bits wide. They are less important than the
accumulator. They are used to store data temporarily during the execution of the
program. For example, there is no instruction to add the contents of Band E
registers. At least one of the operands has to be in A. Thus, to add Band E
registers, and to store the result in B register, the following have to be done.
• Move to A register the contents of B register.
• Then add A and E registers. The result will be in A.
• Move this result from A register to B register.
It is possible to use these registers as pairs to store 16-bit information. Only BC,
DE, and HL can form register pairs. When they are used as register pairs in an
instruction, the left register is understood to have the MS byte and the right
register the LS byte. For example, in DE register pair, the content of the D register
is treated as the MS byte, and the content of E register is treated as the LS byte.
Temporary Registers
(a)Temporary Data Register - The ALU has two inputs. One input is supplied by
the accumulator and other from the temporary data register. The programmer
cannot access this temporary data register. However, it is internally used for
execution of most of the arithmetic and logical instructions.
(b) W and Z registers - Wand Z registers are temporary registers. These registers
are used to hold 8-bit data during the execution of some instructions. These
registers are not available for the programmer since 8085Microprocessor
Architecture uses them internally.
Special Purpose Registers
(a) Register A(Accumulator) - Register A is an 8-bit register used in 8085 to
perform arithmetic, logical, I/O & LOAD/STORE operations. Register A is quite
often called as an Accumulator. An accumulator is a register for short-term,
intermediate storage of arithmetic and logic data in a computer's CPU (Central
Processing Unit). In an arithmetic operation involving two operands, one operand
has to be in this register. And the result of the arithmetic operation will be stored
or accumulated in this register. Similarly, in a logical operation involving two
operands, one operand has to be in the accumulator. Also, some other operations,
like complementing and decimal adjustment, can be performed only on the
accumulator.
(b)Flag Register - It is a 3-bit register, in which five of the bits carry significant
information in the form of flags: S (Sign flag), Z (Zero flag), AC (Auxiliary carry
flag), P (Parity flag), and CY (carry flag); as shown in Fig. 1.2.

• S-Sign flag - After the execution of arithmetic or logical operations, if bit


D7 of the result is 1, the sign flag is set. In a given byte if D7 is1, the
number will be viewed as a negative number. If D7 is U, the number will
be considered as a positive number.
• Z-Zero flag -The zero flag sets if the result of the operation in ALU is zero
and flag resets if the result is non zero. The zero flags are also set if a certain
register content becomes zero following an increment or decrement
operation of that register.
• AC-auxiliary Carry flag - This flag is set if there is an overflow out of bit
3 i.e., carry from lower nibble to higher nibble (D3 bit to D4 bit). This flag
is used for BCD operations and it is not available for the programmer.
• P-Parity flag - Parity is defined by the number of ones present in the
accumulator. After arithmetic or logical operation, if the result has an even
number of ones, i.e. Even parity, the flag is set. If the parity is odd, the flag
is reset.
• CY-Carry flag - This flag is set if there is an overflow out of bit 7. The
carry flag also serves as a borrow flag for subtraction. In both the examples
shown below, the carry flag is set.

Q3. List down the addressing modes of 8085 giving one example of each
mode.
The way of specifying data to be operated by an instruction is called
addressing mode.
Types of addressing modes –
In 8085 microprocessor there are 5 types of addressing modes:

1. Immediate Addressing Mode –


In immediate addressing mode the source operand is always data. If the data
is 8-bit, then the instruction will be of 2 bytes, if the data is of 16-bit then
the instruction will be of 3 bytes.
Examples:
MVI B 45 (move the data 45H immediately to register B)
LXI H 3050 (load the H-L pair with the operand 3050H immediately)
JMP address (jump to the operand address immediately)

2. Register Addressing Mode –


In register addressing mode, the data to be operated is available inside the
register(s) and register(s) is(are) operands. Therefore, the operation is
performed within various registers of the microprocessor.
Examples:
MOV A, B (move the contents of register B to register A)
ADD B (add contents of registers A and B and store the result in register A)
INR A (increment the contents of register A by one)

3. Direct Addressing Mode –


In direct addressing mode, the data to be operated is available inside a
memory location and that memory location is directly specified as an
operand. The operand is directly available in the instruction itself.
Examples:
LDA 2050 (load the contents of memory location into accumulator A)
LHLD address (load contents of 16-bit memory location into H-L register
pair)
IN 35 (read the data from port whose address is 35)

4. Register Indirect Addressing Mode –


In register indirect addressing mode, the data to be operated is available
inside a memory location and that memory location is indirectly specified
by a register pair.
Examples:
MOV A, M (move the contents of the memory location pointed by the H-L
pair to the accumulator)
LDAX B (move contents of B-C register to the accumulator)
LXIH 9570 (load immediate the H-L pair with the address of the location
9570)

5. Implied/Implicit Addressing Mode –


In implied/implicit addressing mode the operand is hidden and the data to be
operated is available in the instruction itself.
Examples:
CMA (finds and stores the 1’s complement of the contents of accumulator A
in A)
RRC (rotate accumulator A right by one bit)
RLC (rotate accumulator A left by one bit)

Q4. Explain what do you mean by the multiplexing of address and data
bus.

The data bus and the low order address bus on the 8085 microprocessors are
multiplexed with each other. This allows 8 pins to be used where 16 would
normally be required. The hardware interface is required to demultiplex the bus
by latching the low order address in the first T cycle, on the falling edge of
ALE.

The address bus is multiplexed in 8085. The multiplexing is done with the help
of ALE signal. ALE stands for address latch enable. When ALE is High (Logic
1): Upper address lines (line 15-8) and Lower address lines (line 7-0)
combinedly holds the 16 bits of the address. When ALE is Low (Logic 0):
Upper address lines (line 15-8) holds the upper 8-bit address & Lower address
lines (line 7-0) holds the "8-bit DATA".

You might also like