From 39713a3736145483dd3310c3605f940ca34f05c3 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Mon, 12 Apr 2021 10:13:21 +0200 Subject: Refactoring --- src/int/idt.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/int/idt.c (limited to 'src/int/idt.c') diff --git a/src/int/idt.c b/src/int/idt.c new file mode 100644 index 0000000..e3e71e8 --- /dev/null +++ b/src/int/idt.c @@ -0,0 +1,39 @@ +#include "idt.h" + +struct IDT_REGISTER IDTR={ + 8*IDT_MAX_ENTRY, + 0x0 +}; + +// Interrupt functions (cf int.S) +extern u32 +INT_DEFAULT, +INT_PAGE_FAULT, +INT_CLOCK, +INT_KEYPRESS, +INT_SYSCALL; + + +void idt_init(){ + // Map first default 32 entries + for(int i=0;i