1
0
Fork 0
forked from AbleOS/ableos
This commit is contained in:
able 2023-11-03 08:25:31 -05:00
parent fd575a17c9
commit 0af4758a45
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();