isr: improve keyboard handler

This commit is contained in:
2025-03-19 21:46:46 +03:00
parent 5bff255a7a
commit c9d6e6183d
3 changed files with 19 additions and 16 deletions
+16 -12
View File
@@ -4,6 +4,16 @@
#include "../include/screen.h"
#include "../include/pic.h"
typedef size_t uword_t;
struct interrupt_frame
{
uword_t ip;
uword_t cs;
uword_t flags;
uword_t sp;
uword_t ss;
};
void isr_custom();
void default_handler();
@@ -56,22 +66,16 @@ void default_handler()
}
#include <stddef.h>
#include <stdint.h>
typedef size_t uword_t;
struct interrupt_frame
void handle_keyboard()
{
uword_t ip;
uword_t cs;
uword_t flags;
uword_t sp;
uword_t ss;
};
uint8_t scancode = inb(0x60);
printf("%X ", scancode);
}
__attribute__((interrupt)) void isr_custom(struct interrupt_frame *frame)
{
terminal_writestring("YOOOOO!!!!!! I LOVE KATYA!!!!");
//terminal_writestring("YOOOOO!!!!!! I LOVE KATYA!!!!");
handle_keyboard();
pic_end_int(0x21);
}