vulcanos/kernel/kernel_main.c
ice-bit ba9feaba18 Fixed Interrupts bug:
It was a problem about ports(cpu/ports.asm) functions.
2019-07-06 00:32:41 +02:00

20 lines
474 B
C

#include "drivers/tty.h"
#include "drivers/gdt.h"
#include "drivers/idt.h"
#include "libc/stdio.h"
void kernel_main() {
gdt_setup(); // Setup Global Descriptor Table
idt_setup(); // Setup Interrupt Descriptor Table
clear_prompt();
init_prompt(); // Initialize frame buffer
puts("Hello World!");
/*
// Testing some interrupts
asm("int $0"); // Division by zero
asm("int $4"); // Stack overflow
asm("int $1"); // Page fault
*/
}