diff options
| author | EmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com> | 2023-06-15 22:36:39 -0400 |
|---|---|---|
| committer | EmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com> | 2023-06-15 22:36:39 -0400 |
| commit | a78033acc941fc4bcf6188f1d48fd8e012673fff (patch) | |
| tree | ac92adae5e40274fd9e0b78352a24840cc88eab4 /kernel/kernel.cpp | |
initial commit
Diffstat (limited to 'kernel/kernel.cpp')
| -rw-r--r-- | kernel/kernel.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/kernel/kernel.cpp b/kernel/kernel.cpp new file mode 100644 index 0000000..c22647b --- /dev/null +++ b/kernel/kernel.cpp @@ -0,0 +1,29 @@ +#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+
+#include <arch/i386/tmtty.h>
+#include <arch/i386/ps2_controller.h>
+#include <dev/ps2kbd.h>
+
+// compiler and target check
+#if defined(__linux__)
+#error "you're not using a cross compiler"
+#endif
+
+#if !defined(__i386__)
+#error "needs to be compiled using an ix86-elf cross compiler"
+#endif
+
+extern "C" void kernel_main(void) {
+ // Initialize terminal
+ terminal_initialize();
+
+ initialize_ps2_controller();
+ keyboard_init();
+
+ printf("Hello world!\n");
+ printf("among");
+ printf("balls\n");
+}
\ No newline at end of file |
