cleaned up some log messages, polished up the kb driver a bit, etc

This commit is contained in:
2025-06-03 20:51:25 -04:00
parent 01076e24b8
commit e471564f89
6 changed files with 138 additions and 21 deletions

View File

@ -16,6 +16,8 @@ static idtr_t idtr;
static bool vectors[IDT_MAX_DESCRIPTORS];
extern struct keyboard_state keyb_state;
void exception_handler(unsigned int i)
{
if (i <= 31) { // TODO: implement proper handling for each exception, also implement the proper gates & error code checking
@ -28,10 +30,7 @@ void exception_handler(unsigned int i)
if (i == PIC_KEYB) {
unsigned char in = inb(0x60);
#ifdef __TESTING__
printf("scancode: %x\n", in);
#endif
do_keypress(decode_scancode(in));
PIC_sendEOI(1);
}
}