Fixed Interrupts bug:

It was a problem about ports(cpu/ports.asm) functions.
This commit is contained in:
ice-bit
2019-07-06 00:32:41 +02:00
parent 3a0d674985
commit ba9feaba18
8 changed files with 26 additions and 9 deletions

View File

@@ -4,10 +4,17 @@
#include "libc/stdio.h"
void kernel_main() {
clear_prompt();
init_prompt(); // Initialize frame buffer
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
*/
}