Sync/kernel/kernel.c

37 lines
754 B
C
Raw Normal View History

2019-04-03 21:46:58 +00:00
//#include <stdio.h>
#include <kernel/tty.h>
#include <kernel/descriptor_tables.h>
#include <kernel/serial.h>
2019-04-01 01:18:48 +00:00
int kernel_main(void) {
// Prepare the screen, and blank it out.
screen_initialize();
// Prepare the serial console.
init_serial();
serial_print(0x3F8, "[INFO] Serial ready.\n");
// Prepare the GDT
serial_print(0x3F8, "[INFO] Beginning GDT subroutine.\n");
gdt_install();
// Prepare interrupts
serial_print(0x3F8, "[INFO] Beginning IDT subroutine.\n");
2019-04-07 18:25:27 +00:00
idt_install();
isr_install();
2019-04-01 01:18:48 +00:00
//Print a copyright message.
term_writes("(c)");
term_setcolor(GREEN);
term_writes(" Project");
term_setcolor(RED);
term_writes("RED");
term_setcolor(WHITE);
term_writes(", 2019\n");
2019-04-01 01:18:48 +00:00
for(;;) {}
return 0;
2019-04-03 21:46:58 +00:00
}