2019-07-03 18:12:57 +02:00
|
|
|
#include "drivers/tty.h"
|
2019-07-04 12:49:53 +02:00
|
|
|
#include "drivers/gdt.h"
|
2019-07-05 18:25:58 +02:00
|
|
|
#include "drivers/idt.h"
|
2019-07-03 18:12:57 +02:00
|
|
|
#include "libc/stdio.h"
|
|
|
|
|
|
|
|
void kernel_main() {
|
2019-07-04 12:49:53 +02:00
|
|
|
gdt_setup(); // Setup Global Descriptor Table
|
2019-07-05 18:25:58 +02:00
|
|
|
idt_setup(); // Setup Interrupt Descriptor Table
|
2019-07-03 18:12:57 +02:00
|
|
|
|
2019-07-06 00:32:41 +02:00
|
|
|
clear_prompt();
|
|
|
|
init_prompt(); // Initialize frame buffer
|
2019-07-03 18:12:57 +02:00
|
|
|
puts("Hello World!");
|
2019-07-06 00:32:41 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
// Testing some interrupts
|
|
|
|
asm("int $0"); // Division by zero
|
|
|
|
asm("int $4"); // Stack overflow
|
|
|
|
asm("int $1"); // Page fault
|
|
|
|
*/
|
2019-07-03 18:12:57 +02:00
|
|
|
}
|