Recent from talks
Nothing was collected or created yet.
Intel 8259
View on WikipediaThis article includes a list of general references, but it lacks sufficient corresponding inline citations. (September 2013) |

The Intel 8259 is a programmable interrupt controller (PIC) designed for the Intel 8080 and Intel 8085 microprocessors. The initial part was the 8259; the later 8259A was upward compatible and usable with the 8086 or 8088 processor. The 8259 combines multiple interrupt input sources into a single interrupt output to the host microprocessor, extending the interrupt levels available in a system beyond the one or two levels found on the processor chip. The 8259A was the interrupt controller for the ISA bus in the original IBM PC and IBM PC AT.
The 8259 was introduced as part of Intel's MCS 85 family in 1976. The 8259A was included in the original PC introduced in 1981 and maintained by the PC/XT when introduced in 1983. A second 8259A was added with the introduction of the PC/AT. The 8259 has coexisted with the Intel APIC Architecture since its introduction in symmetric multiprocessor PCs. Modern PCs have begun to phase out the 8259A in favor of the Intel APIC Architecture. However, while not anymore a separate chip, the 8259A interface is still provided by the Platform Controller Hub or southbridge on modern x86 motherboards.[1]
Functional description
[edit]The main signal pins on an 8259 are as follows: eight interrupt request input lines named IRQ0 through IRQ7, an interrupt request output line named INTR, interrupt acknowledgment line named INTA, D0 through D7 for communicating the interrupt level or vector offset. Other connections include CAS0 through CAS2 for cascading between 8259s.
Up to eight slave 8259s may be cascaded to a master 8259 to provide up to 64 IRQs. 8259s are cascaded by connecting the INT line of one slave 8259 to the IRQ line of one master 8259.
End of interrupt (EOI) operations support specific EOI, non-specific EOI, and auto-EOI. A specific EOI specifies the IRQ level it is acknowledging in the ISR. A non-specific EOI resets the IRQ level in the ISR. Auto-EOI resets the IRQ level in the ISR immediately after the interrupt is acknowledged.
Edge and level interrupt trigger modes are supported by the 8259A. Fixed priority and rotating priority modes are supported.
The 8259 may be configured to work with an 8080/8085 or an 8086/8088. On the 8086/8088, the interrupt controller will provide an interrupt number on the data bus when an interrupt occurs. The interrupt cycle of the 8080/8085 will issue three bytes on the data bus (corresponding to a CALL instruction in the 8080/8085 instruction set).
The 8259A provides additional functionality compared to the 8259 (in particular buffered mode and level-triggered mode) and is upward compatible with it.
Programming considerations
[edit]This section is written like a personal reflection, personal essay, or argumentative essay that states a Wikipedia editor's personal feelings or presents an original argument about a topic. (April 2025) |
DOS and Windows
[edit]
Programming an 8259 in conjunction with DOS and Microsoft Windows has introduced a number of confusing issues for the sake of backwards compatibility, which extends as far back as the original PC introduced in 1981.
The first issue is more or less the root of the second issue. DOS device drivers are expected to send a non-specific EOI to the 8259s when they finish servicing their device. This prevents the use of any of the 8259's other EOI modes in DOS, and excludes the differentiation between device interrupts rerouted from the master 8259 to the slave 8259.
The second issue deals with the use of IRQ2 and IRQ9 from the introduction of a slave 8259 in the PC/AT. The slave 8259's INT output is connected to the master's IR2. The IRQ2 line of the ISA bus, originally connected to this IR2, was rerouted to IR1 of the slave. Thus the old IRQ2 line now generates IRQ9 in the CPU. To allow backwards compatibility with DOS device drivers that still set up for IRQ2, a handler is installed by the BIOS for IRQ9 that redirects interrupts to the original IRQ2 handler.
In the PC/clone family of platforms, the BIOS (and thus also DOS) traditionally maps the master 8259 interrupt requests (IRQ0–IRQ7) to interrupt vector offset 8 (corresponding to INT 08–INT 0Fh), and when present, the PC/AT’s slave 8259 is mapped to interrupt vector offset 112 (INT 70–INT 77h). This was done despite the first 32 (INT 00-INT 1F) interrupt vectors being reserved by the processor for internal exceptions.
This meant that, on later chips, handlers for lower-numbered vectors needed to differentiate between three causes:
- faults, exceptions, and traps caused incidentally;
- interrupts caused by IRQ or NMI, potentially including spurious IRQs; and
- deliberate calls from software executing INT, breakpoint, or indirect far CALL/JMP instructions, as might be used to interact with the BIOS, operating system, or device drivers.
Because of this, most operating systems that don’t make use of the BIOS will configure the interrupt controller(s) to avoid the reserved vector range entirely. In protected mode, the OS can restrict use of INT instructions to specific vectors only (e.g., Linux exposes INT 80h for system calls), and any attempt to use a disallowed vector will raise a protection fault.
This avoids some of the need for cause determination in interrupt vector handlers, although spurious interrupts and IRQ-sharing can still complicate matters. Fortunately, most peripheral devices can be queried with regards to outstanding IRQs, and if no source can be found an interrupt can be treated as spurious or ignored altogether.
Other operating systems
[edit]Since most other operating systems allow for changes in device driver expectations, other 8259 modes of operation, such as Auto-EOI, may be used. This is especially important for modern x86 hardware in which a significant amount of time may be spent on I/O address space delay when communicating with the 8259s. This also allows a number of other optimizations in synchronization, such as critical sections, in a multiprocessor x86 system with 8259s.
Edge and level triggered modes
[edit]Since the ISA bus does not support level triggered interrupts, level triggered mode may not be used for interrupts connected to ISA devices. This means that on PC/XT, PC/AT, and compatible systems the 8259 must be programmed for edge triggered mode. On MCA systems, devices use level triggered interrupts and the interrupt controller is hardwired to always work in level triggered mode. On newer EISA, PCI, and later systems the Edge/Level Control Registers (ELCRs) control the mode per IRQ line, effectively making the mode of the 8259 irrelevant for such systems with ISA buses. The ELCR is programmed by the BIOS at system startup for correct operation.
The ELCRs are located 0x4d0 and 0x4d1 in the x86 I/O address space. They are 8-bits wide, each bit corresponding to an IRQ from the 8259s. When a bit is set, the IRQ is in level triggered mode; otherwise, the IRQ is in edge triggered mode.
Spurious interrupts
[edit]The 8259 generates spurious interrupts in response to a number of conditions.
The first is an IRQ line being deasserted before it is acknowledged. This may occur due to noise on the IRQ lines. In edge triggered mode, the noise must maintain the line in the low state for 100 ns. When the noise diminishes, a pull-up resistor returns the IRQ line to high, thus generating a false interrupt. In level triggered mode, the noise may cause a high signal level on the systems INTR line. If the system sends an acknowledgment request, the 8259 has nothing to resolve and thus sends an IRQ7 in response. This first case will generate spurious IRQ7's.
A similar case can occur when the 8259 unmask and the IRQ input de-assertion are not properly synchronized. In many systems, the IRQ input is deasserted by an I/O write, and the processor doesn't wait until the write reaches the I/O device. If the processor continues and unmasks the 8259 IRQ before the IRQ input is deasserted, the 8259 will assert INTR again. By the time the processor recognizes this INTR and issues an acknowledgment to read the IRQ from the 8259, the IRQ input may be deasserted, and the 8259 returns a spurious IRQ7.
The second is the master 8259's IRQ2 is active high when the slave 8259's IRQ lines are inactive on the falling edge of an interrupt acknowledgment. This second case will generate spurious IRQ15's, but is rare.
PC/XT and PC/AT
[edit]The PC/XT ISA system had one 8259 controller, while PC/AT and later systems had two 8259 controllers, master and slave. IRQ0 through IRQ7 are the master 8259's interrupt lines, while IRQ8 through IRQ15 are the slave 8259's interrupt lines. The labels on the pins on an 8259 are IR0 through IR7. IRQ0 through IRQ15 are the names of the ISA bus's lines to which the 8259s are attached.
Variants
[edit]| Model Number | Technology | Temperature Range | Package | Date of Release | Price (USD)[list 1] |
|---|---|---|---|---|---|
| ID8259 | -40 °C to +85 °C[2] | March/April 1979[3] | $23.15 | ||
| M8259 | Military | March/April 1979[4] | $95.00 | ||
| 82C59A[5] | CMOS | July/August 1984 | |||
| 8259 | 28 Pin PLCC[list 2][6] |
See also
[edit]References
[edit]- ^ "Intel datasheet". www.datasheetcatalog.com. Retrieved 30 April 2024.
- ^ Intel Corporation, "8086 Available for industrial environment", Intel Preview Special Issue: 16-Bit Solutions, May/June 1980, Page 29
- ^ Intel Corporation, "Microcomputer Component: New industrial grade product line answers the demand for high-reliability components to operate in industrial applications.", Intel Preview, March/April 1979, p. 11
- ^ Intel Corporation, "Military Products: Intel marches on!", Intel Preview, March/April 1979, p. 19
- ^ Intel Corporation, "NewsBit: Intel Licenses Oki on CMOS Version of Several Products", Solutions, July/August 1984, Page 1.
- ^ Ashborn, Jim; "Advanced Packaging: A Little Goes A Long Way", Intel Corporation, Solutions, January/February 1986, Page 2
- Gilluwe, Frank van. The Undocumented PC. A-W Developers Press, 1997. ISBN 0-201-47950-8
- McGivern, Joseph. Interrupt-Driven PC System Design. Annabooks, 1998. ISBN 0-929392-50-7
- IBM Personal System/2 Hardware Interface Technical Reference – Architectures. IBM, 1990. IBM Publication 84F8933
External links
[edit]Intel 8259
View on GrokipediaHistory and Development
Origins and Release
The Intel 8259 Programmable Interrupt Controller was developed in the mid-1970s by Intel Corporation as a key support component within the MCS-80 and MCS-85 families of microcomputer systems, specifically to address the limitations of interrupt handling in early 8-bit microprocessors like the 8080 and 8085. These families represented Intel's push toward integrated large-scale integration (LSI) solutions for building complete microprocessor-based systems, where the 8259 served as a dedicated peripheral to offload interrupt management from the CPU, allowing for more efficient multitasking in resource-constrained environments.[4] Officially released in 1976, the 8259 appeared in Intel's product catalog that year, with initial datasheets and design documentation published to support its integration into development kits and single-board computers. Prior to its widespread adoption in personal computers during the early 1980s, the chip was primarily targeted at embedded and industrial applications, marking a shift from discrete logic-based interrupt systems to programmable, scalable solutions. Its initial availability aligned with the launch of the 8085 microprocessor in March 1976, enabling rapid prototyping in Intel's Intellec Microcomputer Development System (MDS-800).[4] The primary design motivations for the 8259 centered on providing programmable interrupt prioritization in 8-bit systems, where the CPU could only handle a limited number of interrupt sources without significant software overhead. It supported up to eight vectored priority interrupt levels, with cascading capabilities allowing expansion to 64 levels through multiple interconnected chips, all while operating on a single +5V supply in a 28-pin DIP package using nMOS technology. This flexibility was essential for real-time systems requiring dynamic reconfiguration of interrupt priorities without hardware changes.[4] Early applications of the 8259 in the late 1970s focused on industrial controllers and minicomputers, where it managed interrupts for process control, data acquisition, and I/O operations in environments like chemical production lines, pipeline monitoring, automated test stands, and sewage treatment systems. Integrated into Intel's iSBC single-board computers—such as the iSBC 80/10, 80/20, and 80/30—it facilitated real-time responses in distributed processing networks, gas pump automation, and early robotic controls, predating personal computer use by several years and establishing it as a foundational element in industrial automation.[5]Evolution and Adoption
These updates culminated in the 8259A variant, introduced in 1979, which provided upward compatibility while incorporating enhancements such as improved interrupt handling modes (including fully nested, special mask, and automatic end-of-interrupt modes), better support for edge- or level-sensitive inputs, and greater compatibility with the 8086 and 8088 processors, resulting in faster response times and reduced susceptibility to electrical noise in system environments.[6][2][1] A pivotal adoption milestone occurred in 1981 with the integration of the 8259A into the IBM Personal Computer (model 5150), where it served as the primary interrupt controller on the system board, managing eight prioritized interrupt levels for the 8088 microprocessor and enabling efficient handling of inputs from peripherals like the timer, keyboard, and expansion cards.[7] This design choice established the 8259A as the de facto standard for x86 interrupt management in personal computing, with six of its interrupt lines (IRQ2–IRQ7) routed to I/O slots to support feature cards, thereby facilitating modular system expansion.[7] The 8259A significantly influenced industry standards by enabling vectored interrupts within real-mode environments, which streamlined hardware event prioritization and response in resource-constrained systems.[7] This capability shaped interrupt handling in MS-DOS and early operating systems, allowing software to vector directly to service routines via programmable offsets, a mechanism that became foundational for x86-based multitasking and I/O operations without requiring extensive CPU polling.[7] By the late 1980s, the 8259A and its derivatives had been installed in tens of millions of systems worldwide, including IBM PCs, compatible clones from manufacturers like Compaq and Dell, and various embedded applications, reflecting its pervasive role in the explosive growth of personal computing.[8]Technical Overview
Purpose and Role in Systems
The Intel 8259 serves as a programmable interrupt controller (PIC) designed to manage hardware interrupts in microprocessor-based systems, acting as an intermediary between peripheral devices and the central processing unit (CPU). Interrupts represent asynchronous events—such as signals from a keyboard, timer, or disk controller—that require immediate CPU attention, temporarily suspending normal program execution to invoke a dedicated service routine. By prioritizing and routing these interrupts to the CPU's interrupt request (INTR) pin, the 8259 ensures timely responses without requiring the CPU to poll devices continuously, thereby improving overall system efficiency and responsiveness.[2] In broader system architectures, the 8259 offloads interrupt management tasks from the CPU, allowing the processor to focus on primary computations while the controller handles prioritization among up to eight interrupt request lines (IR0 through IR7). It supports flexible schemes such as fixed-priority (fully nested) mode, where IR0 holds the highest priority and IR7 the lowest, or rotating priority mode to equitably distribute servicing in multi-tasking or time-sharing environments. For scalability in complex systems, the 8259 enables cascading configurations, where a master unit connects to up to eight slave units via a three-line cascade bus, expanding capacity to 64 vectored priority interrupts while maintaining centralized control.[2] The 8259 integrates seamlessly with 8-bit CPUs like the Intel 8080 or 8085 by asserting the INTR signal upon detecting a pending highest-priority interrupt, prompting the CPU to initiate an interrupt acknowledge (INTA) sequence. During this cycle, the 8259 releases an 8-bit interrupt vector onto the data bus, enabling the CPU to directly address the corresponding interrupt service routine in its vector table. This vectored approach, combined with support for edge-triggered inputs, facilitates precise and hardware-efficient interrupt dispatching tailored to the system's interrupt architecture. Support for 16-bit processors like the 8086/8088, including two-INTA cycles and level-triggered inputs, is provided by the 8259A variant.[2]Key Features and Specifications
The Intel 8259 Programmable Interrupt Controller (PIC) supports up to eight vectored priority interrupts, allowing for efficient management of interrupt requests in microprocessor-based systems. It features programmable priority modes, including fully nested mode for hierarchical prioritization, automatic rotation for round-robin scheduling, and specific priority for custom priority assignment, enabling flexible handling of interrupt sources. It also supports manual end-of-interrupt (EOI) commands, where software issues specific or non-specific EOI to reset the in-service register; automatic EOI handling is available in the 8259A variant. The device is cascadable, supporting expansion to 64 interrupt levels when multiple 8259 units are chained together without requiring extra logic.[2] Electrically, the 8259 operates on a single +5V supply with a tolerance of 4.5V to 5.5V, housed in a 28-pin dual in-line package (DIP). Its maximum power dissipation is 1W, with an operating temperature range of 0°C to 70°C (standard); -40°C to 85°C for industrial variants. Input low voltage is specified at a maximum of 0.8V, while input high voltage requires at least 2.0V, ensuring compatibility with standard TTL logic levels. Supply current under normal operation is approximately 85mA, with low input load currents to minimize external component requirements.[2][9]| Parameter | Symbol | Min | Typ | Max | Unit | Notes |
|---|---|---|---|---|---|---|
| Interrupt Request Active Pulse Width | t_JLJH | 100 | - | - | ns | Minimum duration for IR input |
| Acknowledge Pulse Width (RD or INTA) | t_RLRH / t_ALAL | - | - | 235 | ns | For 8259A standard speed |
| Data Setup Time to Write | t_DVWH | 240 | - | - | ns | Data valid before WR falling edge |
| Interrupt Output Propagation Delay | t_JHIH | - | - | 350 | ns | From IR to INT assertion |
| Data Valid from Read/Acknowledge | t_RLDV | - | 200 | - | ns | After RD or INTA rising edge |
Architecture
Internal Block Diagram
The Intel 8259 Programmable Interrupt Controller features a modular internal architecture designed to manage up to eight interrupt levels efficiently. At its core are several key blocks that handle interrupt detection, prioritization, and signaling to the CPU. The Interrupt Request Register (IRR) latches incoming interrupt signals from the eight input pins (IR0 through IR7), capturing requests from peripheral devices.[2] The In-Service Register (ISR) tracks interrupts that are currently being processed by the CPU, ensuring proper sequencing.[2] A priority resolver, often implemented as a priority encoder, evaluates the IRR to select the highest-priority interrupt based on programmable settings, while interfacing with the ISR to update service status.[2] Control logic oversees initialization, end-of-interrupt (EOI) operations, and overall chip coordination, responding to CPU commands via dedicated control signals.[2] Data flow within the 8259 begins at the IR0–IR7 pins, where external interrupt requests are fed into the IRR for temporary storage. The IRR contents are then scanned by the priority resolver, which determines the active interrupt and generates the interrupt signal on the INT output pin to notify the CPU. Upon CPU acknowledgment via the INTA (interrupt acknowledge) pulses, the priority resolver updates the ISR, and vector information is released through the data bus buffer to the CPU's address/data lines. For cascaded configurations, the master 8259 uses the CAS0–CAS2 output lines to select and address up to seven slave units, allowing expansion to 64 interrupt levels; slaves receive these signals as inputs to identify their role in the hierarchy.[2] Key signals facilitate precise control and integration. The SP/EN pin serves dual purposes: as a slave program input to designate the chip's role in a cascaded system or as an enable for an optional buffer in buffered mode configurations. The A0 address line, combined with chip select (CS), read (RD), and write (WR) signals, deciphers whether the CPU is accessing command registers or status information, routing data bus transactions accordingly. These elements interconnect seamlessly: for instance, the IRR feeds directly into the priority resolver, which in turn links to the ISR and output logic to drive the INT pin, while control logic modulates the entire process based on external commands.[2]Registers and Programming Model
The Intel 8259 Programmable Interrupt Controller (PIC) employs a register-based programming model accessed through 8-bit I/O ports, where commands are written to control the device's operation and status is read to monitor interrupt conditions.[2] In a typical single-PIC setup for an 8086-based system, the master PIC uses I/O ports 20h (for ICWs and OCW2/OCW3) and 21h (for OCW1), with writes dedicated to command registers and reads providing access to in-service register (ISR) or interrupt request register (IRR) status.[2] These registers, including the initialization command words (ICWs) and operation command words (OCWs), configure interrupt vectoring, priority handling, and masking, interfacing with internal components like the IRR and ISR to manage up to eight interrupt levels.[2] Initialization begins with ICW1, written when address line A0 is low and bit D4 is set to 1, which resets the edge-triggered sense circuit, clears the interrupt mask register (IMR), and sets the priority of interrupt request (IR) input 7 to level 7.[2] The bit fields of ICW1 are defined as follows:| Bit | Name | Function |
|---|---|---|
| D7-D5 | Reserved | Must be 0 |
| D4 | Must be 1 to initiate ICW1 | |
| D3 | LTIM | 1 = Level-triggered mode; 0 = Edge-triggered mode |
| D2 | ADI | 1 = Address interval of 4 bytes; 0 = Address interval of 8 bytes (for 8080/8085 systems) |
| D1 | SNGL | 1 = Single PIC mode; 0 = Cascaded mode (multiple PICs) |
| D0 | IC4 | 1 = ICW4 required; 0 = No ICW4 needed |
Operation
Interrupt Processing Flow
The interrupt processing in the Intel 8259 Programmable Interrupt Controller (PIC) begins when a peripheral device asserts one or more of its interrupt request lines (IR0 through IR7), which are latched into the corresponding bits of the Interrupt Request Register (IRR).[2] The priority resolver then examines the IRR, the In-Service Register (ISR), and the Interrupt Mask Register (IMR) to determine if the highest-priority pending request is unmasked and not already in service; if so, the corresponding ISR bit is set (or confirmed during acknowledgment), and the 8259 asserts the INT signal to the CPU.[2] This evaluation ensures fixed-priority handling, where IR7 has the highest priority and IR0 the lowest, preventing lower-priority interrupts from overriding active ones.[2] Upon receiving the INT signal, the CPU suspends its current program and issues interrupt acknowledgment pulses (INTA). For the 8086/8088 processors, two INTA pulses are used: the first pulse (falling edge) locks in the interrupt level (in edge-triggered mode) or confirms it (in level-triggered mode) and sets the ISR bit if not already set, while the second pulse prompts the 8259 to place an 8-bit interrupt vector on the data bus (D0–D7).[2] The vector is formed by adding the binary-encoded priority level of the interrupting input (0 for IR0 to 7 for IR7) to a programmable 8-bit base address previously loaded into the PIC via Initialization Command Word 2 (ICW2).[2] The CPU then uses this vector to fetch the interrupt service routine address from its vector table and begins execution.[2] In cascaded configurations, where multiple 8259s are chained to expand beyond eight interrupts, the master PIC connects to the CPU, and up to eight slave PICs connect via the master's SP/EN, CAS0–2, and IR lines.[2] During the second INTA cycle, if the interrupting source is a slave, the master asserts the corresponding CAS0–CAS2 lines (derived from its IRR) to select the appropriate slave, which then places its 8-bit interrupt vector on the data bus.[2] The ISR bits in both master and slave are updated accordingly, requiring coordinated end-of-interrupt handling.[2] To conclude interrupt processing and re-enable the interrupt level, an End-of-Interrupt (EOI) command must be issued via Operation Command Word 2 (OCW2).[2] In non-Automatic EOI (AEOI) mode, the software explicitly sends a specific EOI (clearing the ISR bit for a designated level) or non-specific EOI (clearing the highest-priority ISR bit); in AEOI mode, the ISR bit is automatically cleared at the trailing edge of the final INTA pulse.[2] For cascaded setups, EOI commands are sent to both the slave and master to fully release the chain.[2] Error conditions can arise during processing, such as in level-triggered mode where an asserted IR line deasserts before the falling edge of the first INTA pulse; in this case, the 8259 defaults to servicing IR7 as a fallback, potentially leading to spurious interrupt handling.[2] Priority conflicts are resolved by the fixed scheme, but unresolved masking or in-service states can lock out valid requests until cleared, though the design minimizes such issues through resolver logic.[2]Initialization and Configuration
The initialization of the Intel 8259 Programmable Interrupt Controller begins with a mandatory sequence of Initialization Command Words (ICWs) written to its control register to establish the basic operating parameters. The process starts by writing ICW1 to select the initialization mode, typically using the value11h for edge-triggered interrupts (LTIM=0), a 4-byte vector interval (ADI=1), cascaded operation (SNGL=0), and requiring ICW4 (IC4=1); this command resets the edge/level sense circuitry, clears the interrupt mask register (IMR), and sets the highest-priority input (IR7) to priority 7.[2] Following ICW1, ICW2 is written to specify the base address of the interrupt vector table, such as 08h for systems using the 8086 processor where vectors occupy addresses 08h through 0Fh for the first eight interrupts.[2] If the system employs a cascaded configuration, ICW3 follows to define the master-slave relationships, and finally ICW4 sets environmental options like processor mode, with 01h commonly used for 8086 compatibility (mPM=1, indicating 8086/8088 mode, while disabling auto EOI and other advanced features).[2]
After the ICWs establish the foundation, further configuration occurs via Operation Command Words (OCWs) to tailor interrupt handling without reinitializing the device. OCW1 is used to set the interrupt mask register, allowing selective enabling or disabling of individual interrupt requests (IR0 through IR7) by writing a byte where each bit corresponds to a mask (1=masked/disabled, 0=enabled), thus preventing unwanted interrupts from reaching the CPU.[2] OCW3 provides additional setup options, such as enabling automatic rotation of priorities after interrupt service (via the rotate on non-specific EOI command in conjunction with OCW2) or activating poll mode (P=1) to allow the CPU to read the highest-priority pending interrupt directly from the in-service register instead of generating an interrupt.[2]
In multi-PIC cascaded systems, the master-slave setup during ICW3 ensures proper hierarchy for up to 64 interrupts across multiple 8259 devices. The master PIC writes ICW3 with bits set to indicate which of its IR lines connect to slaves—for instance, 04h (binary 00000100) if a single slave is attached to IR2—while each slave writes its corresponding ICW3 with a 3-bit ID matching the master's connection, such as 02h (binary 00000010) to identify itself as connected to the master's IR2.[2] This configuration propagates interrupt signals from slaves to the master, which then signals the CPU with a single interrupt request.
A critical aspect of successful initialization is adhering strictly to the ICW sequence, as omitting ICW1 or writing commands out of order—such as sending ICW2 before ICW1—can result in undefined behavior, including failure to recognize subsequent commands or erroneous priority assignments.[2] Once initialized and configured, the 8259 seamlessly integrates into the system's interrupt processing flow, handling incoming requests according to the established priorities and masks.[2]