Example #1
0
void kmain(multiboot_info_t* mbd, unsigned int magic){
	// kernel entry point.
	//unsigned char* videoram = (unsigned char*) 0xb8000;
	//videoram[0] = 65;
	//videoram[1] = 0x07;
	//setMode(0x13);
	setMode(320, 200, 8); // HOLY SHIT THIS WORKS
	clrscr();
	gdt_install();
	idt_install();
	isrs_install();
	irq_install();
	timer_install();
	start_paging(mbd);
	keyboard_install();
	init_genrand(get_timer_ticks());
	__asm__ __volatile__ ("sti");
	kprint("Hello, We have booted successfully!\n\tTip: type help for command info\n");
		
	while(1){
		if(todo != NULL){
			void(*function)() = todo;
			function(todoCP);
			todo = NULL;
		}
	}
	
}
Example #2
0
int initialize_paging()
{
	build_page_table();	
	build_page_directory();
	start_paging();
	
	return 1;
}