it prints what i say yo

This commit is contained in:
clizia 2025-08-25 15:21:24 +02:00
parent daa95130d8
commit 1fbe7a483b
2 changed files with 106 additions and 9 deletions

View file

@ -3,21 +3,16 @@
use core::panic::PanicInfo;
mod vga_buffer;
static HELLO: &[u8] = b"Hello toto :3";
// this function is the entry point since the linker
// looks for a function named `_start` by default
#[unsafe(no_mangle)]
pub extern "C" fn _start() -> ! {
let vga_buffer = 0xb8000 as *mut u8;
for (i, &byte) in HELLO.iter().enumerate() {
unsafe {
*vga_buffer.offset(i as isize * 2) = byte;
*vga_buffer.offset(i as isize * 2 + 1) = 0xb;
}
}
vga_buffer::print_something();
loop {}
}