#include "gdt.h" #include "idt.h" void kernel_serial_out(char* str); void main() { kernel_serial_out("main()\n"); gdt_init(); kernel_serial_out("GDT set.\n"); idt_init(); kernel_serial_out("IDT set.\n"); kernel_serial_out("Halting.\n"); asm volatile( "cli\n" "hlt\n" ); while(1); } #define outb(port, value) asm volatile("out %b0,%w1" : : "a" (value), "d" (port)); void kernel_serial_out(char* str) { while(*str) { if(*str == '\n') { outb(0x3f8, '\r'); } outb(0x3f8, *str++); } }