Microprocessors and Peripheral Devices - PDF Notes
Microprocessors and Peripheral Devices - PDF Notes
and
Peripheral Devices
Written by
Rajesh Sharma
(MCA , UGC NET Qualified, 16 Years Experience)
DETAILED CONTENTS
1. Evolution of Microprocessor
Typical organization of a microcomputer system and functions of its various blocks.
Microprocessor, its evolution, function and impact on modern society
2. Architecture of a Microprocessor (With reference to 8085 microprocessor)
Concept of Bus, bus organization of 8085, Functional block diagram of 8085 and
function of each block, Pin details of 8085 and related signals, Demultiplexing of
address/data bus generation of read/write control signals, Steps to execute a stored
program
3. Instruction Timing and Cycles
Instruction cycle, machine cycle and T-states, Fetch and execute cycle.
4. Programming (with respect to 8085 microprocessor)
Brief idea of machine and assembly languages, Machines and Mnemonic codes.
Instruction format and Addressing mode. Identification of instructions as to which
addressing mode they belong. Concept of Instruction set. Explanation of the
instructions of the following groups of instruction set. Data transfer group,
Arithmetic Group, Logic Group, Stack, I/O and Machine Control Group. Programming
exercises in assembly language. (Examples can be taken from the list of experiments).
5. Memories and I/O interfacing
Concept of memory mapping, partitioning of total memory space. Address decoding,
concept of peripheral mapped I/O and memory mapped I/O. Interfacing of memory
mapped I/O devices.
6. Interrupts
Concept of interrupt, Maskable and non-maskable, Edge triggered and level triggered
interrupts, Software interrupt, Restart interrupts and its use, Various hardware
interrupts of 8085, Servicing interrupts, extending interrupt system
7. Data Transfer Techniques
Concept of programmed I/O operations, sync data transfer, async data transfer (hand
shaking), Interrupt driven data transfer, DMA, Serial output data, Serial input data
8. Peripheral devices
8255 PPI, 8253 PIT and 8257 DMA controller
Section –A
1. What is Microprocessor?
Ans:- The microprocessor is a programmable logic device that can be used to control
processes.
Ans:- The microprocessor is a programmable logic device that can be used to control
processes. While A microprocessor connected with input/output devices and memory
devices forms a micro-computer system.
Ans:- ALU stands for Arithmetic and Logic Unit. This is the unit of the Microprocessor which
performs various computing operations on data.
Ans:- It is also called Timing and Control Unit. This unit provides the necessary timing and
control signals to control all the operations of the microprocessor.
7. What is memory?
Ans:- The memory is used to store the instructions, data and results. The input data is
stored in the memory, processor reads the data from memory, process it and the processed
data as an output is again stored in memory.
Ans:- ALU (Arithmetic and Logic Unit), Register Section and Timing & Control Unit
Ans:- RAM (Random Access Memory) and ROM (Read Only Memory)
Section – B
(a) ALU : ALU stands for Arithmetic and Logic Unit. This is the unit which performs various
computing operations on data.
(b) Timing and Control Unit : Sometimes, it is also called Control Unit (CU). This unit
provides the necessary timing and control signals to control all the operations of the
microprocessor.
Register Section : The register section of microprocessor consists of various registers. These
registers are used to store instructions and data during the execution of a program.
Section – C
Ans:- The applications of microprocessors are increasing day by day. There are numerous
applications of microprocessors. Some of these are described below:-
I. Word Processing :- Computers are widely used in offices for preparation of text,
their storage and retrieval when required.
II. Computer Graphics :- Computers are used to prepare drawings, pictures, graphs and
charts.
III. Airlines and Railways :- For reservations in airlines and railways, micro-computers
are used.
IV. Instrumentation :- Microprocessors are used in instruments like digital millimeters ,
regulated power supply, frequency counters etc.
V. Process Control :- Microprocessors are used to control various process parameters
such as speed, temperature and pressure.
VI. Communication :- Microprocessors are widely used in various communication
equipments.
VII. Publication :- In publishing houses, microprocessor based systems are widely used.
Ans:- A microprocessor connected with input/output devices and memory devices forms a
micro-computer system.
ALU Register
Section S System Bus
Input Unit :- The input devices are used to accept the input data from the user. Some of the
input devices are keyboard, mouse etc.
Output Unit :- The output devices are used to display or print the information as output.
Examples : - Monitor, Printer etc.
System Bus :- Various input/output devices and memories are connected to the
microprocessor by a group of lines called a bus. There are three types of buses – Address
Bus, Data Bus and Control Bus.
Memory :- The memory is used to store the instructions, data and results. The input data is
stored in the memory, processor reads the data from memory, process it and the processed
data as an output is again stored in memory. There are two types of primary memory –
RAM (Random Access Memory) and ROM (Read Only Memory).
Architecture of a Microprocessor
Section –A
Section – B
22. Explain the Flag Register in 8085.
Ans:- 8085 has 8-bit Flag Register. There are only 5 active flags.
S Z AC P CY
Fig: 8085 flag register
Flags are flip-flops which are used to indicate the status of the accumulator and other
registers after the completion of operation.
Sign flag (S): Sign flag indicates whether the result of a mathematical or logical
operation is negative or positive. If the result is negative, this flag will be set (i.e. S=1)
and if the result is positive, the flag will be reset (i.e. S=0).
Zero flag (Z): Zero flag indicates whether the result of a mathematical or logical
operation is zero or not. If the result of current operation is zero, the flag will be set (i.e.
Z=1) otherwise the flag will be reset (Z=0).
Auxiliary Carry flag (AC): In an operation, when a carry is generated by bit D3 and
passes on to bit D4, the AC flag will be set otherwise AC flag will be reset.
Parity flag (P): This flag indicates whether the current result is of even parity (no. of 1’s
is even) or odd parity (no. of 1’s is odd). If even parity, P flag will be set otherwise reset.
Carry flag (CY): This flag indicates whether during an addition or subtraction operation
carry or borrow is generated or not. If carry or borrow is generated, the flag will be set
otherwise reset.
23. Explain the DMA Signals in 8085.
Ans:- HOLD – It indicates that another device is requesting the use of the address and data
bus. Having received HOLD request the microprocessor relinquishes the use of the buses as
soon as the current machine cycle is completed. Internal processing may continue. After
the removal of the HOLD signal the processor regains the bus.
HLDA – It is a signal which indicates that the hold request has been received after the
removal of a HOLD request, the HLDA goes low.
Section – C
27. Explain the Bus Organization of 8085 Microprocessor
Ans:- Bus is a group of conducting wires which carries information. All the peripherals are
connected to microprocessor through Bus.
Section – A
1. What is Instruction Cycle?
Ans:- Time required to execute and fetch an entire instruction is called instruction cycle
Instruction Cycle = Fetch cycle + Execute Cycle
2. What is Instruction Register?
Ans:- When an instruction is fetched from memory, it is loaded in the instruction register.
3. What is Decoder?
Ans:- The decoder decodes the instruction stored in Instruction Register (IR).
4. What is Execution Cycle?
Ans:- Execution Cycle consists of Memory Read (MR), Memory Write (MW), Input/Output
Read (IOR) and Input/Output Write (IOW)
5. What is T-state?
Ans:- One time period of frequency of microprocessor is called T-state. A T-state is
measured from the falling edge of one clock pulse to the falling edge of the next clock pulse.
6. Define machine cycle.
Ans:- The time required by the microprocessor to complete an operation of accessing
memory or input/output devices is called machine cycle.
Section – B
7. Explain Instruction Cycle in 8085 Microprocessor.
Ans:- Time required to execute and fetch an entire instruction is called instruction cycle. It
consists:
Fetch cycle – The next instruction is fetched by the address stored in program counter
(PC) and then stored in the instruction register.
Decode instruction – Decoder interprets the encoded instruction from instruction
register.
Reading effective address – The address given in instruction is read from main memory
and required data is fetched. The effective address depends on direct addressing mode
or indirect addressing mode.
Execution cycle – consists Memory Read (MR), Memory Write (MW), Input/Output Read
(IOR) and Input/Output Write (IOW)
Section – C
Fetch cycle takes four t-states and execution cycle takes three t-states.
Chapter 4
Programming
Section – A
Ans:- The instructions in this group perform logical operation such as AND, OR, compare,
rotate, etc.
Example : ANA C and ORA B
Here, AND operation is applied between the contents of Register A and Register C and in
second instruction, OR operation is applied between the contents of Register A and Register
B.
14. Instruction IN 20H is Two Byte instruction.
15. What is Assembler?
Ans:- Assembler is a translator which converts assembly language code into machine code.
16. Give two instructions used for stack operation.
Ans:- PUSH and POP
17. Define One Byte Instruction.
Ans:- One Byte Instructions include the Opcode and the Operand in the same byte.
Example :- MOV C,A
Here, the data in Register A is copied to Register C.
18. What is looping?
Ans:- Looping is used to execute the set of tasks repeatedly until a specific condition is met.
19. What is subroutine?
Ans:- A subroutine is a set of instructions which are used to perform a particular task. These
are written separately from the main program and called when required.
Section – B
23. Write the steps to generate and execute Assembly Language Program.
Ans:- To write and execute an assembly language program manually on a single board
microcomputer with hex-keyboard for input and LED display for output, the following steps
are required.
(a) Instructions are written in the form of mnemonics.
(b) Machine code in hex form is written for each mnemonics from the instruction set.
(c) Program is executed by pressing the EXECUTE key.
(d) The result will be displayed by the LED display.
Ans:- The stack is a set of memory locations. A special 16-bit register called Stack Pointer is
used to store the address of the top memory location of the stack. There are two type of
operations or instructions which are applied on stacks. These instructions are PUSH and
POP.
PUSH :- the contents of a register pair specified in the instruction are copied into the stack.
No flags are affected.
Example :- PUSH B
Here, the contents of register pair BC are copied into the stack.
POP :- the contents of the memory location whose address is pointed by the Stack Pointer
are copied into the register pair specified in the instruction. No flags are affected.
Example :- POP H
Assume Stack Pointer contains 2090H. The instruction POP H will copy the contents of
memory location 2090H into L register and of 2091H into the H register.
Section – C
Ans:- The 8085 programming model consists of six general purpose registers – B,C, D, E,
H , L, One Accumulator, One Flag Register, One Stack Pointer and Program Counter.
(I) Accumulator : The accumulator is an 8-bit register that is a part of ALU. This
register is used to store 8-bit data. The result of an operation is stored in the
Accumulator.
The accumulator is also identified as Register A.
(II) Flag Register : 8085 has 8-bit Flag Register. There are only 5 active flags.
S Z AC P CY
Fig: 8085 flag register
Flags are flip-flops which are used to indicate the status of the accumulator and
other registers after the completion of operation.
Sign flag (S): Sign flag indicates whether the result of a mathematical or logical
operation is negative or positive. If the result is negative, this flag will be set (i.e.
S=1) and if the result is positive, the flag will be reset (i.e. S=0).
Zero flag (Z): Zero flag indicates whether the result of a mathematical or logical
operation is zero or not. If the result of current operation is zero, the flag will be
set (i.e. Z=1) otherwise the flag will be reset (Z=0).
Auxiliary Carry flag (AC): In an operation, when a carry is generated by bit D3
and passes on to bit D4, the AC flag will be set otherwise AC flag will be reset.
Parity flag (P): This flag indicates whether the current result is of even parity (no.
of 1’s is even) or odd parity (no. of 1’s is odd). If even parity, P flag will be set
otherwise reset.
Carry flag (CY): This flag indicates whether during an addition or subtraction
operation carry or borrow is generated or not. If carry or borrow is generated,
the flag will be set otherwise reset.
(III) SP (Stack Pointer) is 16-bit registers used to point the address of data stored in
the stack memory. It always indicates the top of the stack.
(IV) PC (Program Counter) is 16-bit register used to point the address of the next
instruction to be fetched and executed stored in the memory.
(V) Registers : 8085 has 6 general purpose registers to store 8 bit data. These
registers are identified as B, C, D, E, H and L. BC, DE and HL register pairs are
used to store 16 bit data. HL register pair can also be used as address.
27. What are Instructions and explain all the instruction groups.
Data Transfer Group : Instructions which are used to transfer the data from a register to
another register, from memory to register or register to memory come under this group.
Example : MOV A, B
Here, contents of Register B and Register A (Accumulator) are added and result is stored in
Accumulator.
Logical Group : The instructions in this group perform logical operation such as AND, OR,
compare, rotate, etc.
Example : ANA C
Here, AND operation is applied between the contents of Register A and Register C.
Branch Control Group : This group contains the instructions for conditional and
unconditional jump, subroutine call and return, and restart.
Example : JMP 2030H
Here, the program control jumps to the location specified by the address.
Stack, I/O and Machine Control Group : This group contains the instructions for
input/output ports, stack and machine control.
Example : IN Port-Addr - Input data to Accumulator from I/O Port
28. What are different instructions of data transfer group of instructions in 8085
microprocessor? Explain.
Ans:- Data Transfer Group :- This set of instructions copies data from source location to
destination location. The contents of destination location are modified while the contents
of source location are not changed.
Some instructions are as follows:-
MOV : Move data from one register to another register.
Example : MOV B,C
Move the contents of register C to register B
MVI : Move immediate data to the register.
Example : MVI B, 03H
Move the data 03H to the register B
LXI : Load the register pair immediately.
Example : LXI H, 2401H
This instruction will move the 16 bit data (2401H) to the register pair H-L.
LDA : Load Accumulator direct.
Example : LDA 2401H
Load the contents of the memory location addressed by 2401H to Accumulator directly.
STA : Store accumulator direct.
Example : STA 2501H
Store the contents of the accumulator in the memory location whose address is 2501H.
XCHG : Exchange the contents of H and L with D and E.
Example : XCHG
Exchange the contents of H with the contents of D and the contents of L with the contents
of E.
Chapter 5
Memories and I/O Interfacing
Section – A
Section –B
Ans:- Memory interfacing is used to provide more memory space to accommodate complex
programs for more complicated systems. Types of memories which are most commonly
used to interface with 8085 are RAM, ROM, and EEPROM. 8085 can access 64 KB of external
memory. It can be explained as- total number of address lines in 8085 are 16, therefore it
can access 216 = 65535 locations i.e. 64 KB.
Ans:- In a memory mapped I/O scheme, the input and output devices are treated as
memory. Because 8085 has 16 bit address bus, therefore the input and output devices are
assigned and identified by 16 bit address.
In this scheme, there is only one address space. Address space is the set of all possible
addresses that a microprocessor can generate. In the same address space, some addresses
are assigned to memories and some addresses to I/O devices. The addresses assigned to
memory locations cannot be assigned to I/O devices.
To transfer the data between the microprocessor and the I/O devices, memory related
instructions such as LDA, STA etc. and memory control signals, Memory Read (MEMR) and
Memory Write (MEMW) are used.
6. Explain the I/O Mapped I/O Scheme.
Ans:- In this scheme, the addresses assigned to memory locations can also be assigned to
I/O devices. The 8085 microprocessor issues an IO/M signal. When the IO/M signal is high,
the address on the address bus is for I/O device and when the IO/M signal is low, the
address on the address bus is for a memory location.
In an I/O mapped I/O scheme, the IN and OUT instructions are used to transfer the data
between the microprocessor and the I/O device. The input and output devices are identified
by 8 bit address.
Ans:- A decoder is a commonly used device for interfacing memory and I/O devices. It is
used to decode the address on the address bus and to identify the peripherals.
A decoder is a logic circuit that identifies each combination of the signals present at its
input. A 2 to 4 line decoder is shown below:-
2 to 4
Decoder
3
2
A
Output
Input 1
B
0
Section – C
Ans:- Memory mapped I/O Scheme : In a memory mapped I/O scheme, the input and
output devices are treated as memory. Because 8085 has 16 bit address bus, therefore the
input and output devices are assigned and identified by 16 bit address.
In this scheme, there is only one address space. Address space is the set of all possible
addresses that a microprocessor can generate. In the same address space, some addresses
are assigned to memories and some addresses to I/O devices. The addresses assigned to
memory locations cannot be assigned to I/O devices.
To transfer the data between the microprocessor and the I/O devices, memory related
instructions such as LDA, STA etc. and memory control signals, Memory Read (MEMR) and
Memory Write (MEMW) are used.
I/O Mapped I/O Scheme : In this scheme, the addresses assigned to memory locations can
also be assigned to I/O devices. The 8085 microprocessor issues an IO/M signal. When the
IO/M signal is high, the address on the address bus is for I/O device and when the IO/M
signal is low, the address on the address bus is for a memory location.
In an I/O mapped I/O scheme, the IN and OUT instructions are used to transfer the data
between the microprocessor and the I/O device. The input and output devices are identified
by 8 bit address.
Chapter 6
Interrupts
Section – A
1. Write the names of hardware interrupts of 8085.
Ans:- TRAP, RST 7.5, RST 6.5, RST 5.5 and INTR
2. What are maskable interrupts?
Ans:- The interrupts which can be disabled, are called maskable interrupts.
3. What are non-maskable interrupts?
Ans:- The interrupts which cannot be disabled, are called non-maskable interrupts. TRAP is
an example of a non-maskable interrupt.
4. RST 7.5 is a maskable interrupt. (T/F) T
5. INTR is a maskable interrupt. (T/F) T
6. TRAP is a non-maskable interrupt. (T/F) T
7. Which interrupt has the highest priority?
Ans:- TRAP
8. Which interrupt has the lowest priority?
Ans:- INTR
9. Which hardware interrupt is the non-vectored interrupt?
Ans:- INTR
Section – B
10. What are interrupts? Explain them.
Ans:- An interrupt is a condition that causes the microprocessor to temporarily work on a
different task, and then later return to its previous task. Interrupts can be internal or
external. Internal interrupts, or "software interrupts," are triggered by a software
instruction and operate similarly to a jump or branch instruction. An external interrupt, or a
"hardware interrupt," is caused by an external hardware device.
Section – C
When microprocessor receives any interrupt signal from peripheral(s) which are requesting
its services, it stops its current execution and program control is transferred to a sub-
routine by generating CALL signal and after executing sub-routine, again program control is
transferred to main program by generating RET signal.
RST 7.5 3C H
RST 6.5 34 H
RST 5.5 2C H
Non-Vectored Interrupts are those in which vector address is not predefined. INTR is the
only non-vectored interrupt in 8085 microprocessor.
c. Maskable and Non-Maskable Interrupts
Maskable Interrupts are those which can be disabled or ignored by the microprocessor.
These interrupts are either edge-triggered or level-triggered, so they can be
disabled. INTR, RST 7.5, RST 6.5, RST 5.5 are maskable interrupts in 8085 microprocessor.
Non-Maskable Interrupts are those which cannot be disabled or ignored by
microprocessor. TRAP is a non-maskable interrupt. It consists of both level as well as edge
triggering and is used in critical power failure conditions.
Section – A
1. Expand USART.
Ans:- Universal Synchronous/Asynchronous Receiver/Transmitter.
2. What is handshaking?
Ans:- In Asynchronous Transmission, data flows in a half duplex mode, 1 byte or a character
at a time. This transmission is also called handshaking.
3. STM stands for Synchronous Transfer Module.
4. What is I/O Interface?
Ans:- The method that is used to transfer information between internal storage and
external I/O devices is known as I/O interface.
5. What is mode of data transfer?
Ans:- Data transfer between CPU and the I/O devices may be done in different ways. These
ways are called Data Transfer Modes.
6. Write the name of different modes of data transfer.
Ans:- Programmed I/O, Interrupt- initiated I/O and Direct memory access( DMA).
7. Differentiate between Synchronous Transmission and Asynchronous Transmission.
Ans:- Synchronous Transmission sends data in the form of blocks or frames. Asynchronous
Transmission sends 1 byte or character at a time.
8. What is DMA Transfer Scheme?
Ans:- The DMA controller takes over the buses to manage the transfer directly between the
I/O devices and the memory unit without the intervention of CPU.
Section – B
9. Differentiate between Synchronous Transmission and Asynchronous Transmission.
Ans:-
Synchronous Transmission Asynchronous Transmission
Sends data in the form of blocks or frames Sends 1 byte or character at a time
It is fast process It is slow process
It is expensive It is economical
Time Interval is constant Time Interval is random
Examples are Chat Rooms, Video Examples are Letters, emails, forums, etc
Conferencing, Telephonic Conversations, etc
Ans:- In Synchronous Transmission, data flows in a full duplex mode in the form of blocks or
frames.
Synchronous Transmission is efficient, reliable and is used for transferring a large amount of
data. It provides real-time communication between connected devices. Chat Rooms, Video
Conferencing, telephonic conversations, as well as face to face interactions, are some of the
examples of Synchronous Transmission.
Ans:- In Asynchronous Transmission, data flows in a half duplex mode, 1 byte or a character
at a time. It transmits the data in a continuous stream of bytes. In general, the size of a
character sent is 8 bits to which a parity bit is added i.e. a start and a stop bit that gives the
total of 10 bits.
It is simple, fast, economical and does not require a 2-way communication. Letters, emails,
forums, televisions and radios are some of the examples of Asynchronous Transmission.
1. Programmed I/O.
2. Interrupt- initiated I/O.
3. Direct memory access( DMA).
1. Programmed I/O: It is due to the result of the I/O instructions that are written in the
computer program. Each data item transfer is initiated by an instruction in the program.
In this case, the I/O device does not have direct access to the memory unit. A transfer
from I/O device to memory requires the execution of several instructions by the CPU,
including an input instruction to transfer the data from device to the CPU and store
instruction to transfer the data from CPU to memory.
2. Interrupt- initiated I/O: Whenever it is determined that the device is ready for data
transfer it initiates an interrupt request signal to the computer. Upon detection of an
external interrupt signal, the CPU stops momentarily the task that it was already
performing, branches to the service program to process the I/O transfer, and then
return to the task it was originally performing.
3. Direct Memory Access: The data transfer between a fast storage media such as
magnetic disk and memory unit is limited by the speed of the CPU. Thus we can allow
the peripherals directly communicate with each other using the memory buses,
removing the intervention of the CPU. This type of data transfer technique is known as
DMA or direct memory access. During DMA the CPU is idle and it has no control over the
memory buses. The DMA controller takes over the buses to manage the transfer directly
between the I/O devices and the memory unit.
Chapter 8
Peripheral Devices
Section – A
1. DMA stands for Direct Memory Access.
2. IC 8279 is used for DMA controller (T/F) F
3. IC 8253 is called Programmable Interval Timer (PTI).
4. Write full form of PPI.
Ans:- Programmable Peripheral Interface
5. What is 8255 device?
Ans:- The 8255A is a general purpose programmable I/O device designed to transfer the data
from I/O to interrupt I/O under certain conditions as required.
Section – B
6. What is 8255 I/O device?
Ans:- The 8255A is a general purpose programmable I/O device designed to transfer the data
from I/O to interrupt I/O under certain conditions as required. It can be used with almost any
microprocessor.
It consists of three 8-bit bidirectional I/O ports (24 I/O lines) which can be configured as per the
requirement.
Ans:- The 8255A is a general purpose programmable I/O device designed to transfer the data
from I/O to interrupt I/O under certain conditions as required. It can be used with almost any
microprocessor.
It consists of three 8-bit bidirectional I/O ports (24 I/O lines) which can be configured as per
the requirement.
Ports of 8255A
8255A has three ports, i.e., PORT A, PORT B, and PORT C.
Port A contains one 8-bit output latch/buffer and one 8-bit input buffer.
Port C can be split into two parts, i.e. PORT C lower (PC0-PC3) and PORT C upper (PC7-
PC4) by the control word.
These three ports are further divided into two groups, i.e. Group A includes PORT A and upper
PORT C. Group B includes PORT B and lower PORT C.
Operating Modes
8255A has three different operating modes −
Mode 0 − In this mode, Port A and B is used as two 8-bit ports and Port C as two 4-bit
ports.
Mode 1 − In this mode, Port A and B is used as 8-bit I/O ports. They can be configured
as either input or output ports. Each port uses three lines from port C as handshake
signals. Inputs and outputs are latched.
Mode 2 − In this mode, Port A can be configured as the bidirectional port and Port B
either in Mode 0 or Mode 1. Port A uses five signals from Port C as handshake signals
for data transfer. The remaining three signals from Port C can be used either as simple
I/O or as handshake for port B.
Features of 8255A
The prominent features of 8255A are as follows −
It is TTL compatible.
Ans:- The Intel 8253 is a Programmable Interval Timer (PTI) designed for microprocessors to
perform timing and counting functions using three 16-bit registers. Each counter has 2 input
pins, i.e. Clock & Gate, and 1 pin for “OUT” output. To operate a counter, a 16-bit count is
loaded in its register. On command, it begins to decrement the count until it reaches 0, then it
generates a pulse that can be used to interrupt the CPU.
Features of 8253 / 54
The most prominent features of 8253/54 are as follows −
It has three independent 16-bit down counters.
These three counters can be programmed for either binary or BCD count.
It is compatible with almost all microprocessors.
8254 has a powerful command called READ BACK command, which allows the user to
check the count value, the programmed mode, the current mode, and the current
status of the counter.
15. Explain the 8257 DMA and its features.
Ans:- DMA stands for Direct Memory Access. It is designed by Intel to transfer data at the
fastest rate. It allows the device to transfer the data directly to/from memory without any
interference of the CPU.
Using a DMA controller, the device requests the CPU to hold its data, address and control bus,
so the device is free to transfer data directly to/from the memory. The DMA data transfer is
initiated only after receiving HLDA signal from the CPU.
Initially, when any device has to send data between the device and the memory, the
device has to send DMA request to DMA controller.
The DMA controller sends Hold request to the CPU and waits for the CPU to assert the
HLDA.
Then the microprocessor tri-states all the data bus, address bus, and control bus. The
CPU leaves the control over bus and acknowledges the HOLD request through HLDA
signal.
Now the CPU is in HOLD state and the DMA controller has to manage the operations
over buses between the CPU, memory, and I/O devices.
Features of 8257
Here is a list of some of the prominent features of 8257 −
It has four channels which can be used over four I/O devices.
Each channel can perform read transfer, write transfer and verify transfer operations.
Section – A
8. What is the size of Data Bus of 8086?
Ans:- 16 bits
9. What is the size of Address Bus of 8086?
Ans:- 20 bits
10. What is total number of memory locations addressed by 8086?
Ans:- 220 = 1 MB.
4. What is the difference between Minimum Mode and Maximum Mode?
Ans:- Maximum mode is suitable for system having multiple processors and Minimum mode
is suitable for system having a single processor.
5. Write the name of functional units of 8086.
Ans:- BIU (Bus Interface Unit) and EU (Execution Unit)
6. Write the types of flags in 8086 microprocessor’s Flag Register.
Ans:- Conditional Flags and Control Flags.
7. How many general-purpose registers are available in 8086?
Ans:- There are 8 general purpose registers, i.e., AH, AL, BH, BL, CH, CL, DH, and DL.
Section – B
Features of 8086
The most prominent features of a 8086 microprocessor are as follows −
It has an instruction queue, which is capable of storing six instruction bytes from the
memory resulting in faster processing.
It was the first 16-bit processor having 16-bit ALU, 16-bit registers, internal data bus,
and 16-bit external data bus resulting in faster processing.
It uses two stages of pipelining, i.e. Fetch Stage and Execute Stage, which improves
performance.
Fetch stage can prefetch up to 6 bytes of instructions and stores them in the queue.
Execute stage executes these instructions.
It has 256 vectored interrupts.
It consists of 29,000 transistors.
Section - C
4. Explain the Architecture of 8086 Microprocessor.
Or
Explain the Block Diagram of 8086 Microprocessor.
ALU
It handles all arithmetic and logical operations, like +, −, ×, /, OR, AND, NOT operations.
Flag Register
It is a 16-bit register that behaves like a flip-flop, i.e. it changes its status according to the
result stored in the accumulator. It has 9 flags and they are divided into 2 groups − Conditional
Flags and Control Flags.
BX register − It is used as a base register. It is used to store the starting base address of
the memory area within the data segment.
DX register − This register is used to hold I/O port address for I/O instruction.
Instruction queue − BIU contains the instruction queue. BIU gets upto 6 bytes of next
instructions and stores them in the instruction queue.
Fetching the next instruction while the current instruction executes is called pipelining.
Segment register − BIU has 4 segment buses, i.e. CS, DS, SS & ES. It holds the addresses
of instructions and data in memory, which are used by the processor to access memory
locations.
o DS − It stands for Data Segment. It consists of data used by the program and is
accessed in the data segment by an offset address or the content of other
register that holds the offset address.
o SS − It stands for Stack Segment. It handles memory to store data and addresses
during execution.
o ES − It stands for Extra Segment. ES is additional data segment, which is used by
the string to hold the extra destination data.
Instruction pointer − It is a 16-bit register used to hold the address of the next
instruction to be executed.
Ans:- 8086 was the first 16-bit microprocessor available in 40-pin chip.
Let us now
discuss the
signals in detail −
(A) Power supply and frequency signals
It uses 5V DC supply at VCC and uses ground at VSS.
(B) Clock signal
It provides timing to the processor for operations.
(C) Address/data bus
These are 16 address/data lines. AD0-AD7 carries low order byte data and AD8-AD15
carries higher order byte data. During the first clock cycle, it carries 16-bit address and after
that it carries 16-bit data.
(D) Address/status bus
A16-A19/S3-S6. These are the 4 address/status buses. During the first clock cycle, it carries
4-bit address and later it carries status signals.
(E) Ready
It is an acknowledgement signal from I/O devices that data is transferred. It is an active high
signal. When it is high, it indicates that the device is ready to transfer data. When it is low,
it indicates wait state.
(F) RESET
It is used to restart the execution. It causes the processor to immediately terminate its
present activity. This signal is active high for the first 4 clock cycles to RESET the
microprocessor.
(G) INTR
It is an interrupt request signal
(H) NMI
It stands for non-maskable interrupt. It is an edge triggered input, which causes an
interrupt request to the microprocessor.
(I) INTA
It is an interrupt acknowledgement signal. When the microprocessor receives this signal, it
acknowledges the interrupt.
(J) ALE
It stands for Address Latch Enable. This signal indicates the availability of a valid address on
the address/data lines.
(K) M/IO
This signal is used to distinguish between memory and I/O operations. When it is high, it
indicates I/O operation and when it is low indicates the memory operation.
(L) HLDA
It stands for Hold Acknowledgement signal. This signal acknowledges the HOLD signal.
(M) HOLD
This signal indicates to the processor that external devices are requesting to access the
address/data buses.
6. Differentiate between Minimum Mode and Maximum Mode.
Ans:-
In minimum mode there can be only one In maximum mode there can be multiple
processor i.e. 8086. processors with 8086, like 8087 and 8089.
ALE for the latch is given by 8086 as it is ALE for the latch is given by 8288 bus controller as
the only processor in the circuit. there can be multiple processors in the circuit.
INTA is given by 8086 in response to an INTA is given by 8288 bus controller in response
interrupt on INTR line. to an interrupt on INTR line.
(Solved)
Section – A
Note : Very Short Answer type questions. Attempt any 15 parts. (15 x 2 = 30)
Q. 1 a) What is microprocessor?
Ans:- The microprocessor is a programmable logic device that can be used to control processes.
Ans:- 6
Ans:- ALU stands for Arithmetic and Logic Unit. This is the unit of the Microprocessor which
performs various computing operations on data.
e) Expand ALE.
Ans:- Bus is a group of conducting wires which carries information. All the peripherals are
connected to microprocessor through Bus.
Ans:- Sign Flag, Zero Flag, Auxiliary Flag, Parity Flag and Carry Flag.
Ans:- The time required by the microprocessor to complete an operation of accessing memory
or input/output devices is called machine cycle.
j) Define Opcode.
Ans:- This field contains the mnemonic for the instruction to be performed. Sometimes
mnemonics are referred to as operation codes or Opcode.
Ans:- The symbolic code written in Assembly Language is called Mnemonic code.
Ans:- It can be explained as- total number of address lines in 8085 are 16, therefore it can
access 216 = 65535 locations i.e. 64 KB.
n) What is Interrupt?
Ans:- Interrupt is a signal, which suspends the current routine. The interrupts may be hardware
or software interrupts.
o) Expand SOD.
Ans:- False.
Section – B
Note : Short answer type questions. Attempt any ten parts (10 x 4 = 40)
Q 2 i) Draw block diagram of 8085 microprocessor.
Ans:- The applications of microprocessors are increasing day by day. There are numerous
applications of microprocessors. Some of these are described below:-
I. Word Processing :- Computers are widely used in offices for preparation of text,
their storage and retrieval when required.
II. Computer Graphics :- Computers are used to prepare drawings, pictures, graphs and
charts.
III. Airlines and Railways :- For reservations in airlines and railways, micro-computers
are used.
Ans:-
1. Address bus
It is a group of conducting wires which carries address only. Address bus is unidirectional
because data flow in one direction, from microprocessor to memory or from
microprocessor to Input/output devices.
Length of Address Bus of 8085 microprocessor is 16 Bits. The microprocessor 8085 can
transfer maximum 16 bit address which means it can address 65,536 (216) different
memory location.
2. Data bus
It is a group of conducting wires which carries Data only. Data bus is bidirectional because
data flow in both directions, from microprocessor to memory or Input/Output devices and
from memory or Input/Output devices to microprocessor.
Length of Data Bus of 8085 microprocessor is 8 Bits.
Ans:- The Address/Data Bus of the 8085 microprocessor AD7 – AD0 is multiplexed and used to
carry both address as well as data. There is a need to demultiplex this address/data bus. The pin
ALE (Address Latch Enable) is used to demultiplex this address/data bus.
Ans:- The instruction register and decoder are part of ALU. When an instruction is fetched from
memory, it is loaded in the instruction register.
Ans:- Time required to execute and fetch an entire instruction is called instruction cycle. It
consists:
Fetch cycle – The next instruction is fetched by the address stored in program counter
(PC) and then stored in the instruction register.
Decode instruction – Decoder interprets the encoded instruction from instruction
register.
Reading effective address – The address given in instruction is read from main memory
and required data is fetched. The effective address depends on direct addressing mode
or indirect addressing mode.
Execution cycle – consists Memory Read (MR), Memory Write (MW), Input/Output Read
(IOR) and Input/Output Write (IOW)
Ans:- SP (Stack Pointer) is 16-bit registers used to point the address of data stored in the stack
memory. It always indicates the top of the stack.
PC (Program Counter) is 16-bit register used to point the address of the next instruction to be
fetched and executed stored in the memory.
ix) What is the need of address decoder in microcomputer system?
Ans:- A decoder is a commonly used device for interfacing memory and I/O devices. It is used to
decode the address on the address bus and to identify the peripherals.
A decoder is a logic circuit that identifies each combination of the signals present at its input. A
2 to 4 line decoder is shown below:-
2 to 4
Decoder
3
2
A
Output
Input 1
B
0
x) Explain memory mapped I/O scheme and I/O mapped I/O scheme.
Ans:- Memory mapped I/O scheme : In this scheme, there is only one address space. Address
space is the set of all possible addresses that a microprocessor can generate. In the same
address space, some addresses are assigned to memories and some addresses to I/O devices.
The addresses assigned to memory locations cannot be assigned to I/O devices.
To transfer the data between the microprocessor and the I/O devices, memory related
instructions such as LDA, STA etc. and memory control signals, Memory Read (MEMR) and
Memory Write (MEMW) are used.
I/O mapped I/O scheme : In this scheme, the addresses assigned to memory locations can also
be assigned to I/O devices. The 8085 microprocessor issues an IO/M signal. When the IO/M
signal is high, the address on the address bus is for I/O device and when the IO/M signal is low,
the address on the address bus is for a memory location.
In an I/O mapped I/O scheme, the IN and OUT instructions are used to transfer the data
between the microprocessor and the I/O device. The input and output devices are identified by
8 bit address.
xii) Explain briefly the different addressing modes used for 8085 microprocessor.
Ans:- These are the instructions used to transfer the data from one register to another register,
from the memory to the register, and from the register to the memory without any alteration in
the content. Addressing mode specifies the address of the location in which the operand is
stored.
Addressing modes in 8085 is classified into 5 groups −
Immediate addressing mode:
In this mode, the 8-bit or 16-bit data is specified in the instruction itself as one of its
operand. For example: MVI B, 03 : means 03 is copied into register B.
Ans:- Whenever it is determined that the device is ready for data transfer it initiates an
interrupt request signal to the computer. Upon detection of an external interrupt signal, the
CPU stops momentarily the task that it was already performing, branches to the service
program to process the I/O transfer, and then return to the task it was originally performing.
xiv) Write an assembly language program for subtraction of two 8-bit numbers.
Ans:- Ans:- Assume the first number 47H is in memory location 2501.
The second number 37H is in memory location 2502.
The result is to be stored in memory location 2503.
Program :-
Section – C
Note : Long answer type questions. Attempt any three questions. (3 x 10 = 30)
Ans:- The applications of microprocessors are increasing day by day. There are numerous
applications of microprocessors. Some of these are described below:-
I. Word Processing :- Computers are widely used in offices for preparation of text,
their storage and retrieval when required.
II. Computer Graphics :- Computers are used to prepare drawings, pictures, graphs
and charts.
III. Airlines and Railways :- For reservations in airlines and railways, micro-computers
are used.
IV. Instrumentation :- Microprocessors are used in instruments like digital millimeters
, regulated power supply, frequency counters etc.
V. Process Control :- Microprocessors are used to control various process parameters
such as speed, temperature and pressure.
VI. Communication :- Microprocessors are widely used in various communication
equipments.
VII. Publication :- In publishing houses, microprocessor based systems are widely used.
Ans:- Data Transfer Group :- This set of instructions copies data from source location to
destination location. The contents of destination location are modified while the contents of
source location are not changed.
This instruction will move the 16 bit data (2401H) to the register pair H-L.
Load the contents of the memory location addressed by 2401H to Accumulator directly.
Store the contents of the accumulator in the memory location whose address is 2501H.
Example : XCHG
Exchange the contents of H with the contents of D and the contents of L with the contents of E.
When microprocessor receives any interrupt signal from peripheral(s) which are requesting
its services, it stops its current execution and program control is transferred to a sub-
routine by generating CALL signal and after executing sub-routine, again program control is
transferred to main program by generating RET signal.
RST 7.5 3C H
RST 6.5 34 H
RST 5.5 2C H
Non-Vectored Interrupts are those in which vector address is not predefined. INTR is the
only non-vectored interrupt in 8085 microprocessor.
c. Maskable and Non-Maskable Interrupts
Maskable Interrupts are those which can be disabled or ignored by the microprocessor.
These interrupts are either edge-triggered or level-triggered, so they can be
disabled. INTR, RST 7.5, RST 6.5, RST 5.5 are maskable interrupts in 8085 microprocessor.
Non-Maskable Interrupts are those which cannot be disabled or ignored by
microprocessor. TRAP is a non-maskable interrupt. It consists of both level as well as edge
triggering and is used in critical power failure conditions.
Ans:- DMA stands for Direct Memory Access. It is designed by Intel to transfer data at the
fastest rate. It allows the device to transfer the data directly to/from memory without any
interference of the CPU.
Using a DMA controller, the device requests the CPU to hold its data, address and control bus,
so the device is free to transfer data directly to/from the memory. The DMA data transfer is
initiated only after receiving HLDA signal from the CPU.
Initially, when any device has to send data between the device and the memory, the
device has to send DMA request to DMA controller.
The DMA controller sends Hold request to the CPU and waits for the CPU to assert the
HLDA.
Then the microprocessor tri-states all the data bus, address bus, and control bus. The
CPU leaves the control over bus and acknowledges the HOLD request through HLDA
signal.
Now the CPU is in HOLD state and the DMA controller has to manage the operations
over buses between the CPU, memory, and I/O devices.
Features of 8257
Here is a list of some of the prominent features of 8257 −
It has four channels which can be used over four I/O devices.
Each channel can perform read transfer, write transfer and verify transfer operations.
Note : Very Short Answer type questions. Attempt any 15 parts. (15 x 2 = 30)
d) Define ALE.
j) What is assembler?
p) What is handshaking?
r) Expand USART.
Section - B
Note : Short answer type questions. Attempt any ten parts. (10 x 4 = 40)
Q 2 i) Name four operations performed by microprocessor.
iv) What is multiplexing? Explain how will you demultiplex AD7 – AD0
ix) Differentiate between memory mapped I/O and I/O mapped I/O.
xiv) What is the basic difference between programmed data transfer and DMA scheme?
Section – C
Note : Long answer type questions. Attempt any three questions. (3 x 10 = 30)
Q 3 Draw the block diagram of 8085 and explain function of each block.
Q 6 Draw the block diagram of 8257 DMA controller and explain it.
a) Stack
b) Non-maskable interrupt
Subject :- Microprocessors and Peripheral Devices/ Microp. & App.
Section – B
Note : Very Short answer type questions. Attempt any ten questions out of twelve questions.
(10 X 2 = 20)
11. Name the interrupt pins of 8085.
Ans:- TRAP, RST 7.5, RST 6.5 , RST 5.5 and INTR.
12. List four functions of ALU.
Ans:- ADDITION, SUBTRACTION, MULTIPLICATION, DIVISION.
13. Write the arithmetic equation of the instruction ADD D.
Ans:- This instruction adds the value stored in Register D to the value stored in Accumulator.
14. Explain peripheral I/O & Memory mapped I/O.
Ans:- Peripheral I/O :- in this method, the I/O devices are treated differently from memory
chips.
Memory-mapped I/O :- In memory-mapped I/O, each input or output device is treated as if it is
a memory location.
15. Define DMA operation.
Ans:- Direct Memory Access (DMA) is a method that allows an input/output (I/O) device to send
or receive data directly to or from the main memory, bypassing the CPU to speed up
memory operations. The process is managed by a chip known as a DMA controller.
16. What is the function of Accumulator?
Ans:- Accumulator is a special register which is used to store intermediate or final results after
arithmetic and logical operations.
17. What is NOP?
Ans:- NOP stands for No-Operation. It is an Assembly Language Instruction.
18. What is handshaking?
Ans:- Handshaking is a I/O control method to synchronize I/O devices with the microprocessor.
19. Explain DMA.
Ans:- Direct Memory Access (DMA) is a method that allows an input/output (I/O) device to send
or receive data directly to or from the main memory, bypassing the CPU to speed up
memory operations. The process is managed by a chip known as a DMA controller.
20. What is a buffer?
Ans:- Buffer is a region of a physical memory storage used to temporarily store data.
21. What is assembler?
Ans:- Assembler is a software which is used to convert assembly language code to machine
language code.
22. What is the function of O/P Devices?
Ans:- Output Devices are used to display or print the result or output.
Section – C
Note : Short answer type questions. Attempt any eight questions out of ten questions.
(8 X 5 = 40)
23. Explain the evolution of microprocessor & its impacts on society.
Ans:- The microprocessor forms the brain of the Central Processing Unit (CPU). Microprocessor
is an engine which can compute various operations fabricated on a single chip. The internal
architecture of microprocessor determines what operations can be performed on a
microprocessor and how it can be performed.
The first microprocessor was introduced in the year 1971. It was introduced by Intel and was
named Intel 4004.
Advantages of Microprocessor:
o It is cheap and cost of manufacture is low.
o They are very small in size.
o High Reliability
o High Versatility
o Power consumption is very low.
Many people throughout the world use smartphones, personal digital assistant devices (also
known as PDAs) and microcomputers. All of these devices utilize a key component: a
microprocessor.
A device that uses a microprocessor is normally capable of many functions, such as word
processing, calculation, and communication via Internet or telephone. However, for the device
to work properly, the microprocessor itself has to communicate with other parts of the device.
For example, a microprocessor would need to communicate with the video display to control
the output data that a program may produce. Therefore, a microprocessor would act as
device's "brain" in that it transmits, receives and interprets the data needed to operate a
device.
24. Describe arithmetic group of instructions with suitable example.
Ans:- Arithmetic Group :- The instructions of this group perform arithmetic operations such as
addition, subtraction, increment or decrement of the content of a register or a memory.
Example : ADD B
Here, contents of Register B and Register A (Accumulator) are added and result is stored in
Accumulator.
25. Classify the interrupts of 8085 in detail.
Ans:- Hardware and Software Interrupts : When microprocessors receive interrupt signals
through pins (hardware) of microprocessor, they are known as Hardware Interrupts. There are
5 Hardware Interrupts in 8085 microprocessor. They are – INTR, RST 7.5, RST 6.5, RST 5.5, TRAP
Software Interrupts are those which are inserted in between the program which means these
are mnemonics of microprocessor. There are 8 software interrupts in 8085 microprocessor.
They are – RST 0, RST 1, RST 2, RST 3, RST 4, RST 5, RST 6, RST 7.
26. Differentiate between Minimum Mode and Maximum Mode of configuration of 8086.
Ans:-
Minimum mode Maximum mode
In minimum mode there can be only one In maximum mode there can be multiple
processor i.e. 8086. processors with 8086, like 8087 and 8089.
ALE for the latch is given by 8086 as it is ALE for the latch is given by 8288 bus controller as
the only processor in the circuit. there can be multiple processors in the circuit.
INTA is given by 8086 in response to an INTA is given by 8288 bus controller in response
interrupt on INTR line. to an interrupt on INTR line.
(ii) Computer Graphics :- Computers are used to prepare drawings, pictures, graphs and charts.
(iii) Airlines and Railways :- For reservations in airlines and railways, micro-computers are used.
(v) Process Control :- Microprocessors are used to control various process parameters such as
speed, temperature and pressure.
(vii) Publication :- In publishing houses, microprocessor based systems are widely used.
Section – D
Note : Long answer type questions. Attempt any three questions out of four questions.
( 3 X 10 = 30)
33. Draw and discuss the pin diagram of 8085 in details.
Ans:- Pin diagram of 8085 microprocessor is as given below:
1. Address Bus and Data Bus:
The address bus is a group of sixteen lines i.e A0-A15. The address bus is unidirectional, i.e.,
bits flow in one direction from the microprocessor unit to the peripheral devices and uses the
high order address bus.
2. Control and Status Signals:
ALE – It is an Address Latch Enable signal. It goes high during first T state of a machine cycle and
enables the lower 8-bits of the address, if its value is 1 otherwise data bus is activated.
IO/M’ – It is a status signal which determines whether the address is for input-output or
memory. When it is high(1) the address on the address bus is for input-output devices. When it
is low(0) the address on the address bus is for the memory.
SO, S1 – These are status signals. They distinguish the various types of operations such as halt,
reading, instruction fetching or writing.
RD’ – It is a signal to control READ operation. When it is low, the selected memory or input-
output device is read.
WR’ – It is a signal to control WRITE operation. When it goes low, the data on the data bus is
written into the selected memory or I/O location.
READY – It senses whether a peripheral is ready to transfer data or not. If READY is high(1) the
peripheral is ready. If it is low(0) the microprocessor waits till it goes high. It is useful for
interfacing low speed devices.
3. Power Supply and Clock Frequency:
Vcc – +5v power supply
Vss – Ground Reference
CLK (OUT) – This signal can be used as the system clock for other devices.
4. Interrupts and Peripheral Initiated Signals:
The 8085 has five interrupt signals that can be used to interrupt a program execution.
(i) INTR
(ii) RST 7.5
(iii) RST 6.5
(iv) RST 5.5
(v) TRAP
5. DMA Signals:
HOLD – It indicates that another device is requesting the use of the address and data bus.
Having received HOLD request the microprocessor relinquishes the use of the buses as soon as
the current machine cycle is completed. Internal processing may continue. After the removal of
the HOLD signal the processor regains the bus.
HLDA – It is a signal which indicates that the hold request has been received after the removal
of a HOLD request, the HLDA goes low.
6. Serial I/O Ports:
Serial transmission in 8085 is implemented by the two signals,
SID and SOD – SID is a data line for serial input where as SOD is a data line for serial output.
34. Explain Programmed Data Transfer techniques.
Ans:- Programmed I/O:- It is due to the result of the I/O instructions that are written in the
computer program. Each data item transfer is initiated by an instruction in the program.
In this case, the I/O device does not have direct access to the memory unit. A transfer from I/O
device to memory requires the execution of several instructions by the CPU, including an input
instruction to transfer the data from device to the CPU and store instruction to transfer the
data from CPU to memory.
35. Discuss and draw the block diagram of 8086 in details.
Ans:- Architecture of 8086 :-
The following diagram depicts the architecture of a 8086 Microprocessor −
8086 Microprocessor is divided into two functional units, i.e., EU (Execution Unit) and BIU (Bus
Interface Unit).
(A) EU (Execution Unit)
Execution unit gives instructions to BIU to fetch the data and then decode and execute those
instructions. Its function is to control operations on data using the instruction decoder & ALU.
EU has no direct connection with system buses.
ALU
It handles all arithmetic and logical operations, like +, −, ×, /, OR, AND, NOT operations.
Flag Register
It is a 16-bit register that behaves like a flip-flop, i.e. it changes its status according to the result
stored in the accumulator. It has 9 flags and they are divided into 2 groups − Conditional Flags
and Control Flags.
General purpose register
There are 8 general purpose registers, i.e., AH, AL, BH, BL, CH, CL, DH, and DL. These registers
can be used individually to store 8-bit data and can be used in pairs to store 16 bit data. The
valid register pairs are AH and AL, BH and BL, CH and CL, and DH and DL. It is referred to the AX,
BX, CX, and DX respectively.
AX register − It is also known as accumulator register. It is used to store operands for
arithmetic operations.
BX register − It is used as a base register. It is used to store the starting base address of
the memory area within the data segment.
CX register − It is referred to as counter. It is used in loop instruction to store the loop
counter.
DX register − This register is used to hold I/O port address for I/O instruction.
Stack pointer register
It is a 16-bit register, which holds the address from the start of the segment to the memory
location, where a word was most recently stored on the stack.
(B) BIU (Bus Interface Unit)
BIU takes care of all data and address transfers on the buses for the EU. EU has no direction
connection with System Buses so this is possible with the BIU. It has the following functional
parts −
Instruction queue − BIU contains the instruction queue. BIU gets upto 6 bytes of next
instructions and stores them in the instruction queue.
Fetching the next instruction while the current instruction executes is called pipelining.
Segment register − BIU has 4 segment buses, i.e. CS, DS, SS & ES. It holds the addresses
of instructions and data in memory, which are used by the processor to access memory
locations.
o CS − It stands for Code Segment. It is used for addressing a memory location in
the code segment of the memory, where the executable program is stored.
o DS − It stands for Data Segment. It consists of data used by the program and is
accessed in the data segment by an offset address or the content of other
register that holds the offset address.
o SS − It stands for Stack Segment. It handles memory to store data and addresses
during execution.
o ES − It stands for Extra Segment. ES is additional data segment, which is used by
the string to hold the extra destination data.
Instruction pointer − It is a 16-bit register used to hold the address of the next
instruction to be executed.
36. Write short note on the following :-
(a) Stack
Ans:- The stack is a set of memory locations. A special 16-bit register called Stack Pointer is used
to store the address of the top memory location of the stack. There are two type of operations
or instructions which are applied on stacks. These instructions are PUSH and POP.
PUSH :- the contents of a register pair specified in the instruction are copied into the stack. No
flags are affected.
Example :- PUSH B
Here, the contents of register pair BC are copied into the stack.
POP :- the contents of the memory location whose address is pointed by the Stack Pointer are
copied into the register pair specified in the instruction. No flags are affected.
Example :- POP H
Assume Stack Pointer contains 2090H. The instruction POP H will copy the contents of memory
location 2090H into L register and of 2091H into the H register.
(b) Non-maskable interrupt
Ans:- Non-Maskable Interrupts are those which cannot be disabled or ignored by
microprocessor. TRAP is a non-maskable interrupt. It consists of both level as well as edge
triggering and is used in critical power failure conditions.