Write to raw vram from rust
yay this works!
This commit is contained in:
16
lightshow.rs
16
lightshow.rs
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user