aboutsummaryrefslogtreecommitdiffstats
path: root/kernel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel.cpp')
-rw-r--r--kernel.cpp47
1 files changed, 20 insertions, 27 deletions
diff --git a/kernel.cpp b/kernel.cpp
index 26d5b7d..408a19e 100644
--- a/kernel.cpp
+++ b/kernel.cpp
@@ -40,35 +40,28 @@ void kernel_main(void)
tasking_initialize();
term.write("Tasking enabled.\n");
- //tasking_spawn([] {
- // for (;;) {
- // do pit_delay_ms(1);
- // while (termBusy);
-
- // termBusy = true;
- // term.write('B');
- // termBusy = false;
- // }
- //}, 256);
-
- //tasking_spawn([] {
- // for (;;) {
- // do pit_delay_ms(1);
- // while (termBusy);
-
- // termBusy = true;
- // term.write('C');
- // termBusy = false;
- // }
- //}, 256);
-
for (;;) {
- pit_delay_ms(100);
- //while (termBusy);
+ const auto ch = keyboard_read();
+ if (ch)
+ term.write(*ch);
- //termBusy = true;
- //term.write('A');
- //termBusy = false;
+ pit_delay_ms(10);
}
}
+extern "C"
+void abort()
+{
+ term.write("!!! abort() called !!!");
+ asm volatile("cli");
+ for (;;);
+}
+
+extern "C"
+int __cxa_atexit(void (*func)(void *), void *arg, void *dso_handle)
+{
+ return 0;
+}
+
+int __dso_handle = 0;
+