Enable int 0x80

This commit is contained in:
Alex Kotov 2023-01-05 20:08:27 +04:00
parent bfed96f78d
commit 6a0d5408a4
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,4 @@
#include <drivers/console.h>
#include <kernaux/arch/i386.h>
#include <kernaux/asm/i386.h>
@ -22,7 +23,10 @@ void interrupts_load()
kernaux_asm_i386_flush_idt((uint32_t)&idt_pointer);
}
void interrupts_handler() {}
void interrupts_handler()
{
drivers_console_puts("INTERRUPT!!!!!");
}
#define init_intr(num, dpl) do { \
void interrupts_cb_##num(); \
@ -73,4 +77,6 @@ void interrupts_setup(const uint16_t kernel_cs_selector)
init_intr(0x1d, 0);
init_intr(0x1e, 0);
init_intr(0x1f, 0);
init_intr(0x80, 0);
}

View File

@ -95,6 +95,10 @@ void main(
protected_initialize();
drivers_console_puts("[INFO] main: Finished.");
asm("int $0x80");
asm("int $0x80");
asm("int $0x80");
}
void my_putc(void *display KERNAUX_UNUSED, char c)