isr: add keyboard (0x21) handler
This commit is contained in:
@@ -41,7 +41,7 @@ bin/screen.o: src/screen.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
bin/isr.o: src/isr.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
$(CC) $(CFLAGS) -mgeneral-regs-only -c $< -o $@
|
||||
|
||||
bin/idt.o: src/idt.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
#include "../include/utils.h"
|
||||
|
||||
void pic_remap(int offset1, int offset2);
|
||||
void pic_end_int(uint8_t irq);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "../include/isr.h"
|
||||
#include "../include/types.h"
|
||||
#include "../include/screen.h"
|
||||
#include "../include/pic.h"
|
||||
|
||||
void isr_custom();
|
||||
void default_handler();
|
||||
@@ -55,10 +56,23 @@ void default_handler()
|
||||
|
||||
}
|
||||
|
||||
void isr_custom()
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
typedef size_t uword_t;
|
||||
struct interrupt_frame
|
||||
{
|
||||
uword_t ip;
|
||||
uword_t cs;
|
||||
uword_t flags;
|
||||
uword_t sp;
|
||||
uword_t ss;
|
||||
};
|
||||
|
||||
__attribute__((interrupt)) void isr_custom(struct interrupt_frame *frame)
|
||||
{
|
||||
terminal_writestring("YOOOOO!!!!!! I LOVE KATYA!!!!");
|
||||
asm("hlt");
|
||||
pic_end_int(0x21);
|
||||
}
|
||||
|
||||
void isr0()
|
||||
|
||||
Reference in New Issue
Block a user