]>
git.dujemihanovic.xyz Git - nameless-os.git/blob - kernel/arch/x86/irq/sample_handler.c
2 #include <irq/i8259a.h>
10 typedef uint32_t uword_t
;
12 struct interrupt_frame
{
20 __attribute__((interrupt
))
21 void keyb_handler(struct interrupt_frame
*frame
)
24 uint8_t scancode
= inb(PS2_DATA_PORT
);
30 if (scancode
== 0xf0) {
32 uint8_t scancode
= inb(PS2_DATA_PORT
);
33 if (scancode
== 0x12) {
38 if (scancode
== 0x12) {
43 kprintc(scancodes
[scancode
], 0);
45 kprintc(scancodes
[scancode
] - ('a'-'A'), 0);
51 __attribute__((interrupt
))
52 void double_fault(struct abort_frame
*frame
)
54 *(volatile uint32_t *) (0xb8000) = 0xcf28cf3a;
56 asm volatile ("cli; hlt");