loader image

Interrupts in 8085

Interrupt I/O is a data transfer method in which an external device informs the microprocessor that it is ready for communication and requests attention. The 8085 interrupt process is controlled by the Interrupt Enable flip-flop.

The microprocessor is said to be interrupted when the flipflop is enabled and the signal INTR goes high. The instruction EI and DI are used to set and reset the Interrupt Enable flip-flop respectively.

Opcode Description
EI Sets the Interrupt Enable flip-flop and enables the interrupt process.
System reset or an interrupt disables the interrupt process.
DI Resets the Interrupt Enable flip-flop and disables the interrupt.

Interrupts in 8085 can be described in terms of the following 8 steps.

  1. Set the Interrupt Enable flipflop using EI instruction.
  2. During the execution of each instruction, the microprocessor checks the INTR signal.
  3. If INTR is high and interuupt is enabled, then the microprocessor disables the Interrupt Enable flipflop and sends an Interrupt Acknowledge signal \overline {INTA}.
  4. This \overline {INTA} signal inserts a RST instruction through external hardware.
  5. Once the RST instruction is recieved, the microprocessor saves the contents of PC into the stack.
  6. The program control is then transfered to a specific memory loaction and the corresponding service routine is executed.
  7. The service routine should include the instruction EI.
  8. Once the service routine has completed executing, the RET instruction retrieves the memory address the where the program was interrupted and continues the execution.

Types of Interrupts

Maskable and Non-Maskable Interrupts

An interrupt that can be disabled by writing some instructions is referred to as a Maskable Interrupt; otherwise, it is referred to as a Non-Maskable Interrupt.

Software Interrupts

A software interrupt is a set of instructions that can be inserted into the programme at any time. The 8085 microprocessor has eight software interrupts from RST0 through RST7. The INT instruction is used to initiate a software interrupt. This event immediately terminates programme execution and transfers control to the INT handler. The INT handler is typically part of the operating system and decides the appropriate action. This occurs when an application software terminates or requests specific services from the operating system.

They enable the microprocessor to switch programme control from the main program to the subroutine program. When the subroutine program is finished, the program control returns to the main program.

Hardware Interrupts

A hardware interrupt is caused by a hardware device, such as a request to start an I/O, a hardware failure, or something similar. Hardware interrupts were implemented to avoid spending the processor’s crucial time in polling loops waiting for external events.

There are 5 pins available for hardware interrupt in 8085: TRAP, RST 7.5, RST 6.5, RST 5.5 and INTR.

Notify of
Inline Feedbacks
View all comments