Professional Documents
Culture Documents
8259
8259
Outline
Interrupts in PC Interrupts and calls 8259 PIC Programming 8259 Interfacing 8259 in PC
What is Interrupt
8086/88 Interrupts
Answering an Interrupt
Save status
FR, IP, CS
1. CALL FAR can jump to any location (1M range) 2. Hardware interrupts can come at any time. 3. Interrupts are maskable. 4. After CALL only CS:IP is saved 5. End of routine: RETF vs. IRET.
Interrupt Categories
Hardware interrupts:
Only 3 pin, but how 256 interrupt? INTR (in), NMI (in), and INTA (out) INTR can be masked by CLI / STI Active high. 80x86 finished instruction. Push FR, CS, IP NMI: INT 02.
Software interrupts
INT nn Example: INT 21H (DOS functions)
Predefined Interrupts
INT 00 (divide error) INT 01 (single step)
Set Trap flag (how?) PUSHF, POP AX, Trace in debug
8259
ICW1, ICW2
ICW3, ICW4
Example
Programming OCWs
OCW3
8259 in PC XT
Interrupt Sources in PC
Sources of NMI
8259s in AT
Interrupts (Summary)