implemented basic keyboard input getting
This commit is contained in:
+18
-3
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user