41 lines
814 B
C
41 lines
814 B
C
#include "../include/isr.h"
|
|
#include "../include/gdt.h"
|
|
#include "../include/screen.h"
|
|
#include "../include/stdio.h"
|
|
#include "../include/utils.h"
|
|
#include "../include/disk.h"
|
|
#include "../include/string.h"
|
|
|
|
#include <stdint.h>
|
|
|
|
void kmain()
|
|
{
|
|
terminal_initialize();
|
|
printf("KatauOS booting up\n");
|
|
gdt_install();
|
|
isr_install();
|
|
printf("Kernel init sequence completed\n");
|
|
|
|
char yooo[256] = "heheh";
|
|
printf("test string: %s\n", yooo);
|
|
|
|
disk_info info;
|
|
get_disk_info(&info);
|
|
printf("CYL HEAD SECT: %X %X %X\n", info.cylinders, info.heads, info.sectors);
|
|
|
|
while(1)
|
|
{
|
|
if(inportb(0x64) & 0x1)
|
|
{
|
|
unsigned char key = inportb(0x60);
|
|
if(key == 2)
|
|
terminal_writestring("1\n");
|
|
else if(key == 4)
|
|
terminal_writestring("3\n");
|
|
else
|
|
terminal_writestring("dunno what is it\n");
|
|
}
|
|
}
|
|
|
|
}
|