isr: improve keyboard handler
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user