summaryrefslogtreecommitdiff
path: root/src/init/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/init/main.c')
-rw-r--r--src/init/main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/init/main.c b/src/init/main.c
index 6c4ccc3..fda68b7 100644
--- a/src/init/main.c
+++ b/src/init/main.c
@@ -1,15 +1,23 @@
+#include <kernel/syscalls.h>
+#include <stddef.h>
#include <stdint.h>
int _syscall(int, int, int, int);
+int debuglog(const char *msg, size_t len) {
+ return _syscall(SC_DEBUGLOG, (void*)msg, len, 0);
+}
+
+
int main() {
- uint8_t color = _syscall(1, 2, 3, 4);
+ debuglog("hello from init! ",
+ sizeof("hello from init! ") - 1);
// change the colors of VGA text
// doesn't require a lot of code, but still shows that it's working
uint8_t *vga = (void*) 0xB8000;
for (int i = 0; i < 80 * 25; i++)
- vga[(i << 1) + 1] = color;
+ vga[(i << 1) + 1] = 0x4e;
// try to mess with kernel memory
uint8_t *kernel = (void*) 0x100000;