pull/11/head
able 2023-11-03 08:25:31 -05:00
parent 8a5f12bcff
commit 2959e65ef9
3 changed files with 14 additions and 18 deletions

View File

@ -18,6 +18,7 @@ pub static DISPLAY: Lazy<Mutex<Display>> = Lazy::new(|| {
disp.set_attribute("width", fb1.width);
disp.set_attribute("height", fb1.height);
disp.set_attribute("bits per pixel", fb1.bpp);
disp.set_attribute("pitch", fb1.pitch);
// disp.set_attribute("fb ptr", fb1.address.as_ptr().unwrap());
dt.devices.insert("Displays".to_string(), alloc::vec![disp]);
}

View File

@ -7,17 +7,20 @@ import "repbuild/hblib/std" as std;
// Define main
fn main(){
std::Info("Starting the limine framebuffer driver.");
li8(r1, 0x7);
li8(r2, 0);
li64(r3, 1000);
label("start");
// store from a register to a local address
// Color
li64(r1, 0xffffffff);
// iterator
li32(r2, 0);
// count
li64(r3, 12);
// Label here
let start = label();
// Write to the memory
st(r1, r2, 0xFFFF8000C0000000, 1);
// addi64(r2, r2, 1);
jltu(r2, r3, "start");
// Increment
addi64(r2, r2, 1);
// std::Info("abc");
jltu(r2, r3, start);
// Terminate execution.
tx();

View File

@ -11,14 +11,6 @@ fn main(){
std::ipc_send(2, str, str.len);
std::ipc_recv(2);
li8(r1, 0x7);
li8(r2, 0);
li64(r3, 128821000);
let start = label();
st(r1, r2, 0xFFFF8000C0000000, 1);
addi64(r2, r2, 1);
jltu(r2, r3, start);
std::Info("VFS Test done!");
// un();