1+ #ifndef __ISR_H
2+ #define __ISR_H
3+
4+ #include "system.h"
5+
6+ typedef void (* isr_t )(registers_t * );
7+ extern isr_t interrupt_handlers [256 ];
8+
9+ void register_interrupt_handler (int num , isr_t handler );
10+
11+
12+ // Pointer to the Interrupts in idt_helper.asm
13+ extern void exception0 (); // 0x00: Exception 0: Divide Error
14+ extern void exception1 (); // 0x01: Exception 1: Debug
15+ extern void exception2 (); // 0x02: Exception 2: Non Maskable Interrupt
16+ extern void exception3 (); // 0x03: Exception 3: Breakpoint
17+ extern void exception4 (); // 0x04: Exception 4: Overflow
18+ extern void exception5 (); // 0x05: Exception 5: Bound Range Exceeded
19+ extern void exception6 (); // 0x06: Exception 6: Invalid Opcode
20+ extern void exception7 (); // 0x07: Exception 7: Device Not Available
21+ extern void exception8 (); // 0x08: Exception 8: Double Fault
22+ extern void exception9 (); // 0x09: Exception 9: Coprocessor Segment Overrun [386][GPF]
23+ extern void exception10 (); // 0x0A: Exception 10: Invalid TSS
24+ extern void exception11 (); // 0x0B: Exception 11: Segment Not Present
25+ extern void exception12 (); // 0x0C: Exception 12: Stack Fault
26+ extern void exception13 (); // 0x0D: Exception 13: General Protection Fault
27+ extern void exception14 (); // 0x0E: Exception 14: Page Fault
28+ extern void exception15 (); // 0x0F: Exception 15: Reserved
29+ extern void exception16 (); // 0x10: Exception 16: x87 FPU Floating-Point Error
30+ extern void exception17 (); // 0x11: Exception 17: Alignment Check
31+ extern void exception18 (); // 0x12: Exception 18: Machine Check
32+ extern void exception19 (); // 0x13: Exception 19: SIMD Floating-Point Exception
33+ extern void exception20 (); // 0x14: Exception 20: Virtualization Exception
34+ extern void exception21 (); // 0x15: Exception 21: Control Protection Exception
35+ extern void exception22 (); // 0x16: Exception 22: Security Exception
36+ extern void exception23 (); // 0x17: Exception 23: Spare
37+ extern void exception24 (); // 0x18: Exception 24: Spare
38+ extern void exception25 (); // 0x19: Exception 25: Spare
39+ extern void exception26 (); // 0x1A: Exception 26: Spare
40+ extern void exception27 (); // 0x1B: Exception 27: Spare
41+ extern void exception28 (); // 0x1C: Exception 28: Spare
42+ extern void exception29 (); // 0x1D: Exception 29: Spare
43+ extern void exception30 (); // 0x1E: Exception 30: Spare
44+ extern void exception31 (); // 0x1F: Exception 31: Spare
45+
46+ // Pointer to the Interrupts in idt_helper.asm
47+ extern void irq0 (); // 0x20: IRQ 0: Programmable Interrupt Timer
48+ extern void irq1 (); // 0x21: IRQ 1: Keyboard
49+ extern void irq2 (); // 0x22: IRQ 2: Cascade (2)
50+ extern void irq3 (); // 0x23: IRQ 3: Cascade (3)
51+ extern void irq4 (); // 0x24: IRQ 4: Cascade (4)
52+ extern void irq5 (); // 0x25: IRQ 5: Cascade (5)
53+ extern void irq6 (); // 0x26: IRQ 6: Cascade (6)
54+ extern void irq7 (); // 0x27: IRQ 7: Cascade (7)
55+ extern void irq8 (); // 0x28: IRQ 8: Cascade (8)
56+ extern void irq9 (); // 0x29: IRQ 9: Cascade (9)
57+ extern void irq10 (); // 0x2A: IRQ 10: Cascade (10)
58+ extern void irq11 (); // 0x2B: IRQ 11: Cascade (11)
59+ extern void irq12 (); // 0x2C: IRQ 12: Cascade (12)
60+ extern void irq13 (); // 0x2D: IRQ 13: Cascade (13)
61+ extern void irq14 (); // 0x2E: IRQ 14: Cascade (14)
62+ extern void irq15 (); // 0x2F: IRQ 15: Cascade (15)
63+
64+
65+ #endif
0 commit comments