require "./tiny_alloc_i386.cr"
require "./vga.cr"
lib LibBootstrap
@[Packed]
struct StartInfo
multiboot_ptr : UInt32
end_of_kernel : UInt32
end
end
fun kearly(info_ptr: LibBootstrap::StartInfo*)
info = info_ptr.value
end
fun kmain
VGA.init
VGA.puts(
"[CrystalOS Kernel] Hello from Crystal.\n",
color: VGA::Colors::BLACK_ON_CYAN,
)
VGA.puts("weeeeeeee\n")
VGA.puts("Hello world!\n \nWorks maybe?\n")
VGA.puts("Can print on multiple lines\n", color: VGA::Colors::BLACK_ON_LIME)
VGA.puts("\n\nWe still don't have a heap, but now the puts stores the last row and col so it can call the putchar method with the right col / row instead of overlaying subsequent calls on-top one of another (this is super long line to test word wrap).\n")
while true
asm (%(hlt))
end
end