8085 Hardware & Software Interrupts, SIM/RIM & Serial I/O
Hardware vs software interrupts, TRAP, RST 7.5–5.5, INTR, priority resolution, vector locations, SIM/RIM masking, and SID/SOD lines.
Knova editors10 min readQuick checkSources
An interrupt is an asynchronous signal sent by an external device to request the immediate attention of the microprocessor. When interrupted, the CPU suspends its current program execution, saves the Program Counter onto the stack, and branches to an Interrupt Service Routine (ISR).
Classification of 8085 Interrupts
Interrupts in the 8085 are classified along three dimensions:
- Hardware vs. Software: Hardware interrupts are initiated by physical signals applied to external CPU pins; software interrupts are initiated by inserting
RST ninstructions into code. - Vectored vs. Non-Vectored: In vectored interrupts, the CPU branches to a fixed, pre-determined memory address wired into the silicon. In non-vectored interrupts, the interrupting device must place an instruction byte (typically a
CALLorRST) onto the data bus during the interrupt acknowledge cycle. - Maskable vs. Non-Maskable: Maskable interrupts can be disabled or delayed by software instructions (
DI,SIM); non-maskable interrupts cannot be disabled and must be serviced immediately.
Hardware Interrupt Specifications and Vector Addresses
The 8085 provides five hardware interrupt input pins arranged in strict hardware priority order:
| Interrupt | Priority | Trigger Type | Maskability | Vector Address (Hex) |
|---|---|---|---|---|
| TRAP (RST 4.5) | Edge and Level | Non-Maskable | ||
| RST 7.5 | 2 | Rising-Edge | Maskable (via SIM) | |
| RST 6.5 | 3 | High-Level | Maskable (via SIM) | |
| RST 5.5 | 4 | High-Level | Maskable (via SIM) | |
| INTR | High-Level | Maskable (via EI/DI) | Non-Vectored |
Software Interrupts (RST 0 - RST 7)
The 8085 supports eight single-byte software restart instructions:
| Instruction | Opcode | Vector Address |
|---|---|---|
RST 0 | C7H | |
RST 1 | CFH | |
RST 2 | D7H | |
RST 3 | DFH | |
RST 4 | E7H | |
RST 5 | EFH | |
RST 6 | F7H | |
RST 7 | FFH |
Interrupt Masking: SIM and RIM Instructions
Masking for RST 7.5, 6.5, and 5.5 is controlled through the Accumulator using the SIM (Set Interrupt Mask) and RIM (Read Interrupt Mask) instructions.
Bit Format of the SIM Instruction
| SOD | SOE | X | R7.5 | MSE | M7.5 | M6.5 | M5.5 |
- SOD (Bit 7): Serial Output Data to be latched onto pin 4.
- SOE (Bit 6): Serial Output Enable (, ).
- R7.5 (Bit 4): Reset RST 7.5 flip-flop ().
- MSE (Bit 3): Mask Set Enable (, ).
- M7.5, M6.5, M5.5 (Bits 2-0): Mask bits (, ).
Bit Format of the RIM Instruction
| SID | I7.5 | I6.5 | I5.5 | IE | M7.5 | M6.5 | M5.5 |
- SID (Bit 7): Current logic level on the Serial Input Data (pin 5).
- I7.5, I6.5, I5.5 (Bits 6-4): Pending interrupt flags ().
- IE (Bit 3): Interrupt Enable status flag ().
- M7.5, M6.5, M5.5 (Bits 2-0): Current mask status for each line.
Intel 8085 Interrupt System & SIM / RIM Register Flow
Test hardware interrupts against the priority ladder, toggle SIM mask bits, and observe CPU vector branching.
8085 Interrupt Priority Ladder
CPU ready in EI (Interrupts Enabled) state.
Serial I/O Communication: SID and SOD
The 8085 provides two dedicated serial communication pins:
- SID (Serial Input Data, Pin 5): Reads a single serial bit directly into bit of the Accumulator when
RIMis executed. - SOD (Serial Output Data, Pin 4): Latches bit of the Accumulator out to external circuitry when
SIMis executed with ().