Write to raw vram from rust

yay this works!
This commit is contained in:
greg
2015-10-22 23:13:12 -07:00
parent 59d73e940e
commit 3e6c6d17d7

View File

@@ -18,4 +18,20 @@ trait Copy {}
#[no_mangle]
pub extern fn rust_entry() {
//white A on black
let spec: u16 = 0x0f_41;
write_to_coord(0, 0, spec);
loop {
}
}
//const VRAM_OFFSET = 0xb8000;
fn write_to_coord(x: u8, y: u8, x86_specifier: u16) {
unsafe {
*(0xb8000 as *mut u16) = x86_specifier;
}
}