mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Print something to the screen
This commit is contained in:
@@ -3,9 +3,18 @@
|
|||||||
|
|
||||||
use core::panic::PanicInfo;
|
use core::panic::PanicInfo;
|
||||||
|
|
||||||
|
use bootloader_api::BootInfo;
|
||||||
|
|
||||||
bootloader_api::entry_point!(kernel_main);
|
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 {}
|
loop {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user