Add console, klog, and writef modules.

They are not complete, but adding to checkpoint progress.
This commit is contained in:
josh committed 2022-03-24 17:52:39 -04:00
1 parent e214a9c3de
commit 06242a0c9f
5 files changed
+373

No files matched your search

+12
View File
@@ -6,11 +6,14 @@ module hulk.hulk;
import hulk.header;
import hulk.bootinfo;
import hulk.framebuffer;
import hulk.console;
import hos.memory;
import ldc.attributes;
import hulk.kfont;
static import hulk.klog;
private __gshared Framebuffer fb;
private __gshared Console console;
extern extern(C) __gshared ubyte _hulk_total_size;
@@ -44,6 +47,15 @@ extern(C) void hulk_start(ulong rdi, ulong rsi, ulong rdx, BootInfo * bootinfo)
x += kfont.advance;
}
console.initialize(&fb);
console.clear();
hulk.klog.initialize(&console);
for (size_t i = 1u; i != 0u; i++)
{
hulk.klog.writef("Hello! i = %010u\n", i);
}
for (;;)
{
}