#![no_std] #![no_main] use core::panic::PanicInfo; static HELLO: &[u8] = b"Hello, World!"; #[panic_handler] fn panic(_info: &PanicInfo) -> ! { loop {} } #[unsafe(no_mangle)] pub extern "C" fn _start() -> ! { let gob_buffer = 0xb8000 as *mut u8; for (i, &byte) in HELLO.iter().enumerate() { unsafe { *gob_buffer.offset(i as isize * 2) = byte; // Puts the ASCII char into the buffer *gob_buffer.offset(i as isize * 2 + 1) = 0xb; // Colors it white on black } } loop {} }