#include <stdint.h>
#include "ports.h"
#include "pic.h"
#include "gdt.h"
#include "idt.h"
#include "irq.h"
#include "screen.h"

void entry(void) {
	pic_remap(IRQ0, IRQ8);
	pic_set_masks(0, 0);

	gdt_init((struct GDT *)(0x500));
	idt_init((struct IDT *)(0x500 + sizeof(struct GDT)));

	__asm__ __volatile__ ("sti");

	screen_init();

	__asm__ __volatile__ ("int $0x50");
	for(;;) { __asm__ __volatile__ ("hlt"); }
}

#include <stdint.h>
#include "ports.h"
#include "pic.h"
#include "gdt.h"
#include "idt.h"
#include "irq.h"
#include "screen.h"

void entry(void) {
	pic_remap(IRQ0, IRQ8);
	pic_set_masks(0, 0);
	idt_init((struct IDT *)(0x500));

	gdt_init((struct GDT *)(0x500 + sizeof(struct IDT)));

	__asm__ __volatile__ ("sti");

	screen_init();

	__asm__ __volatile__ ("int $0x50");
	for(;;) { __asm__ __volatile__ ("hlt"); }
}

Set up IDT first to ensure exceptions are handled
Set up IDT first to ensure exceptions are handled
