aboutsummaryrefslogtreecommitdiff
path: root/src/krn/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/krn/api')
-rw-r--r--src/krn/api/io.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/krn/api/io.h b/src/krn/api/io.h
new file mode 100644
index 0000000..bdd20de
--- /dev/null
+++ b/src/krn/api/io.h
@@ -0,0 +1,18 @@
+#define MÜLL_STD_H
+
+/*
+ * Minimal 'standard library' for I/O basics
+ */
+
+// includes
+#include <stdint.h>
+
+volatile uint16_t* VGA = (volatile uint16_t*)0xB8000;
+uint16_t cursor = 0;
+
+void RealPrint(const char* str) {
+ while(*str) {
+ VGA[cursor++] = (uint8_t)(*str) | 0x0700; // white on black
+ str++;
+ }
+} \ No newline at end of file