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
def clear_screen
video_memory = Pointer(UInt8).new(0xB8000_u64)
screen_size = 80 * 25
i = 0
while i < screen_size
(video_memory + (i * 2)).value = " ".to_unsafe.value
(video_memory + (i * 2) + 1).value = 0x07_u8
i += 1
end
end
fun kmain
asm("cli")
clear_screen
message = "[CrystalOS Kernel] Hello from Crystal\n"
puts message
while true
end
end