aboutsummaryrefslogtreecommitdiffstats
path: root/kernel.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2024-09-28 10:26:46 -0400
committerClyne Sullivan <clyne@bitgloo.com>2024-09-28 10:26:46 -0400
commitba5683581d00d9f02d470f4cde881293cc838a91 (patch)
tree772863e39677ae02b84a06f233d0a713d44d2f22 /kernel.cpp
parent376d7ec265085ae3a77664356a2ad35921cfccaf (diff)
basic keyboard support
Diffstat (limited to 'kernel.cpp')
-rw-r--r--kernel.cpp49
1 files changed, 26 insertions, 23 deletions
diff --git a/kernel.cpp b/kernel.cpp
index bf754eb..0cb581f 100644
--- a/kernel.cpp
+++ b/kernel.cpp
@@ -1,10 +1,12 @@
#include "acpi.hpp"
#include "gdt.hpp"
#include "idt.hpp"
+#include "keyboard.hpp"
#include "memory.hpp"
#include "multiboot.hpp"
#include "pic.hpp"
#include "pit.hpp"
+#include "portio.hpp"
#include "tasking.hpp"
#include "vgaterminal.hpp"
@@ -33,39 +35,40 @@ void kernel_main(void)
pic_initialize();
idt_initialize();
pit_initialize();
+ keyboard_initialize();
asm volatile("sti");
tasking_initialize();
term.write("Tasking enabled.\n");
- tasking_spawn([] {
- for (;;) {
- do pit_delay_ms(1);
- while (termBusy);
+ //tasking_spawn([] {
+ // for (;;) {
+ // do pit_delay_ms(1);
+ // while (termBusy);
- termBusy = true;
- term.write('B');
- termBusy = false;
- }
- }, 256);
+ // termBusy = true;
+ // term.write('B');
+ // termBusy = false;
+ // }
+ //}, 256);
- tasking_spawn([] {
- for (;;) {
- do pit_delay_ms(1);
- while (termBusy);
+ //tasking_spawn([] {
+ // for (;;) {
+ // do pit_delay_ms(1);
+ // while (termBusy);
- termBusy = true;
- term.write('C');
- termBusy = false;
- }
- }, 256);
+ // termBusy = true;
+ // term.write('C');
+ // termBusy = false;
+ // }
+ //}, 256);
for (;;) {
- do pit_delay_ms(1);
- while (termBusy);
+ pit_delay_ms(100);
+ //while (termBusy);
- termBusy = true;
- term.write('A');
- termBusy = false;
+ //termBusy = true;
+ //term.write('A');
+ //termBusy = false;
}
}