swissChili | d813792 | 2021-02-17 15:34:07 -0800 | [diff] [blame] | 1 | #include "kint.h" |
2 | #include "vga.h" | ||||
3 | |||||
4 | struct registers | ||||
5 | { | ||||
6 | uint ds; | ||||
7 | uint edi, esi, ebp, esp, ebx, edx, ecx, eax; | ||||
8 | uint interrupt_number, error_code; | ||||
9 | uint eip, cs, eflags, useresp, ss; | ||||
10 | }; | ||||
11 | |||||
12 | void isr_handler(struct registers regs) | ||||
13 | { | ||||
swissChili | 0b35bf2 | 2021-02-18 12:49:40 -0800 | [diff] [blame^] | 14 | vga_write("Interrupt triggered! "); |
15 | vga_putx(regs.interrupt_number); | ||||
16 | vga_write("\n"); | ||||
swissChili | d813792 | 2021-02-17 15:34:07 -0800 | [diff] [blame] | 17 | } |