summaryrefslogtreecommitdiff
path: root/kernel/driver/keyboard.c
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2016-06-01 19:37:09 -0700
committerScott Gasch <[email protected]>2016-06-01 19:37:09 -0700
commit0a41dae5f406d498b5c9ab1542cb5660e0d982f6 (patch)
tree67ade9fe31cfd0458cc485e95550f7aaf14abdd1 /kernel/driver/keyboard.c
Initial checkin of toy OS project.HEADmaster
Diffstat (limited to 'kernel/driver/keyboard.c')
-rw-r--r--kernel/driver/keyboard.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/kernel/driver/keyboard.c b/kernel/driver/keyboard.c
new file mode 100644
index 0000000..7410171
--- /dev/null
+++ b/kernel/driver/keyboard.c
@@ -0,0 +1,37 @@
+//+----------------------------------------------------------------------------
+//
+// File: keyboard.c
+//
+// Module:
+//
+// Synopsis:
+//
+// Created: sgasch 21 Oct 2003
+//
+//+----------------------------------------------------------------------------
+
+#include "kernel.h"
+#include "hal.h"
+#include "rtl.h"
+#include "interrupts.h"
+
+void
+HalKeyboardInt(INTERRUPT_STATE *is)
+{
+ BYTE c;
+ BYTE k;
+
+ HalDisableInterrupts();
+
+ c = in(0x64);
+ HalIoDelay();
+ if (c & 1)
+ {
+ k = in(0x60);
+ HalIoDelay();
+ HalVideoPrint("Testing %x.\n\0", 1);
+ }
+
+ HalEnableInterrupts();
+}
+