Shitty broken keyboard driver BUT azerty-compatible

This commit is contained in:
2025-12-28 10:28:17 +01:00
parent dbd068e55a
commit cc36c768cf
7 changed files with 274 additions and 3 deletions

View File

@@ -300,4 +300,11 @@ align 16
vector_32_handler:
push qword 0
push qword 32
jmp interrupt_stub
; PS/2 Keyboard
align 16
vector_33_handler:
push qword 0
push qword 33
jmp interrupt_stub

View File

@@ -2,6 +2,7 @@
#include <stdint.h>
#include <stddef.h>
#include "../io/serial.h"
#include "../kbd/ps2.h"
struct interrupt_descriptor idt[256];
struct idtr idt_reg;
@@ -123,12 +124,16 @@ struct cpu_status_t* interrupt_dispatch(struct cpu_status_t* context)
break;
case 32:
serial_kputs("Tick!");
//serial_kputs("Tick!");
ticks++;
// Send an EOI so that we can continue having interrupts
outb(0x20, 0x20);
break;
case 33:
keyboard_handler();
break;
default:
serial_kputs("kernel: idt: Unexpected interrupt\n");
break;