Print something to the screen

This commit is contained in:
Philipp Oppermann
2023-05-01 15:05:34 +02:00
parent 2a49491fc7
commit cf28a5fdf9

View File

@@ -3,9 +3,18 @@
use core::panic::PanicInfo;
use bootloader_api::BootInfo;
bootloader_api::entry_point!(kernel_main);
fn kernel_main(_bootinfo: &'static mut bootloader_api::BootInfo) -> ! {
fn kernel_main(boot_info: &'static mut BootInfo) -> ! {
if let Some(framebuffer) = boot_info.framebuffer.as_mut() {
let mut value = 0x90;
for byte in framebuffer.buffer_mut() {
*byte = value;
value = value.wrapping_add(1);
}
}
loop {}
}