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.",
VGA::Colors::BLACK_ON_CYAN,
)
VGA.puts("\n")
VGA.puts("Hello world!\nWorks maybe?\n", line: 1)
VGA.puts("Can print on multiple lines\n", line: 2)
VGA.puts("But because we don't have a Heap, we need to set lines number in puts call for now...\n", line: 3)
while true
asm (%(hlt))
end
end