This repository has been archived on 2024-06-25. You can view files and clone it, but cannot push or open issues or pull requests.
rockOS/kernel/rockos/kernel.c

25 lines
585 B
C

#include <stdio.h>
#include <rockos/tty.h>
#include <rockos/gdt.h>
void kernel_main(void) {
printf("Hello, kernel World!\n");
printf("String test: %s\n", "HELLOOOOO");
printf("Float test: %.10f\n", 0.123456789);
printf("Int test: %d\n", 747474);
printf("Hex test: 0x%x\n", 0xDEADBEEF);
printf("And now for 0.1 + 0.2...... which is: %.17f\n", 0.1 + 0.2);
unsigned char oldkey;
unsigned char key = readkey();
for(;;){
oldkey = key;
key = readkey();
if (key != oldkey)
putchar(key);
}
asm("cli; hlt");
}