implemented basic keyboard input getting

This commit is contained in:
2025-03-14 18:32:01 +03:00
parent d5b504e815
commit ab775bd958
6 changed files with 72 additions and 15 deletions
+18 -3
View File
@@ -1,5 +1,6 @@
#include "../include/isr.h"
#include "../include/screen.h"
#include "../include/utils.h"
/* Check if the compiler thinks you are targeting the wrong operating system. */
/*#if defined(__linux__)
@@ -15,8 +16,22 @@
void kmain()
{
terminal_initialize();
terminal_writestring("KatauOS booting up");
terminal_writestring("KatauOS booting up\n");
isr_install();
terminal_writestring("Kernel init sequence completed");
return;
terminal_writestring("Kernel init sequence completed\n");
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");
}
}
}