diff --git a/Cargo.lock b/Cargo.lock index 46efea33..4638a894 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -429,7 +429,7 @@ dependencies = [ [[package]] name = "hbbytecode" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#efa7271a5917c9b78ed06563df2bea13f895f8ca" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#654b7eb7af94c191a6ac9071e7efd56833966ad5" [[package]] name = "hbbytecode" @@ -439,7 +439,7 @@ source = "git+https://git.ablecorp.us/ableos/holey-bytes#e494785f93dad2722ebd9e5 [[package]] name = "hblang" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#efa7271a5917c9b78ed06563df2bea13f895f8ca" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#654b7eb7af94c191a6ac9071e7efd56833966ad5" dependencies = [ "hbvm 0.1.0 (git+https://git.ablecorp.us/AbleOS/holey-bytes.git)", ] @@ -447,7 +447,7 @@ dependencies = [ [[package]] name = "hbvm" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#efa7271a5917c9b78ed06563df2bea13f895f8ca" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#654b7eb7af94c191a6ac9071e7efd56833966ad5" dependencies = [ "hbbytecode 0.1.0 (git+https://git.ablecorp.us/AbleOS/holey-bytes.git)", ] diff --git a/repbuild/src/dev.rs b/repbuild/src/dev.rs index 967e84c0..d91c6d11 100644 --- a/repbuild/src/dev.rs +++ b/repbuild/src/dev.rs @@ -78,7 +78,10 @@ impl Package { // }, // &mut bytes, // ); + println!("Precompilation"); let _ = hblang::run_compiler(&path, Default::default(), &mut bytes); + println!("Post-compilation"); + match std::fs::create_dir("target/programs") { Ok(_) => (), Err(e) if e.kind() == std::io::ErrorKind::AlreadyExists => (), diff --git a/sysdata/libraries/stn/src/buffer.hb b/sysdata/libraries/stn/src/buffer.hb index 81cb995b..1fd18ba7 100644 --- a/sysdata/libraries/stn/src/buffer.hb +++ b/sysdata/libraries/stn/src/buffer.hb @@ -1,7 +1,7 @@ string := @use("rel:string.hb"); receive_message := fn(buffer_id: int, memory_map_location: ^u8, length: int): ^u8 { - return @eca(void, 4, buffer_id, memory_map_location, length); + return @eca(^u8, 4, buffer_id, memory_map_location, length); } send_message := fn(buffer_id: int): void { diff --git a/sysdata/libraries/stn/src/string.hb b/sysdata/libraries/stn/src/string.hb index 8abed242..52145ab2 100644 --- a/sysdata/libraries/stn/src/string.hb +++ b/sysdata/libraries/stn/src/string.hb @@ -45,7 +45,7 @@ reverse := fn(s: ^u8): void { return; } -set := fn(change: ^int, new: int): void { +set := fn(change: ^u8, new: int): void { *(change) = new; return; } diff --git a/sysdata/programs/fb_driver/README.md b/sysdata/programs/fb_driver/README.md index e69de29b..b354f04d 100644 --- a/sysdata/programs/fb_driver/README.md +++ b/sysdata/programs/fb_driver/README.md @@ -0,0 +1,2 @@ +# Framebuffer Driver +A simple framebuffer driver. \ No newline at end of file diff --git a/sysdata/programs/fb_driver/src/main.hb b/sysdata/programs/fb_driver/src/main.hb index 4233b2c3..783cd943 100644 --- a/sysdata/programs/fb_driver/src/main.hb +++ b/sysdata/programs/fb_driver/src/main.hb @@ -1,7 +1,7 @@ +frame_buffer := @as(^u8, @bitcast(18446603339442421760)); + main := fn(): int { - frame_buffer := @as(^u8, @bitcast(18446603339442421760)); color := 17; - loop { len := (786432 * 4)+1; loop if len == 0 break else { diff --git a/sysdata/programs/tests/src/main.hb b/sysdata/programs/tests/src/main.hb index 942f9271..49da3f18 100644 --- a/sysdata/programs/tests/src/main.hb +++ b/sysdata/programs/tests/src/main.hb @@ -4,8 +4,19 @@ string := stn.string; memory := stn.memory; buffer := stn.buffer; +/* +service_search := fn(): void { + // a := + + return; +} +*/ + + + main := fn(): int { // Create a buffer + buffer_id := buffer.create(); buffer.send_message(buffer_id); diff --git a/sysdata/programs/time_driver/src/main.hb b/sysdata/programs/time_driver/src/main.hb index 91d2d7e4..e8eb06dd 100644 --- a/sysdata/programs/time_driver/src/main.hb +++ b/sysdata/programs/time_driver/src/main.hb @@ -2,7 +2,7 @@ stn := @use("../../../libraries/stn/src/lib.hb"); log := stn.log; mem := stn.memory; s := stn.string; -page := 0 +page := 0; main := fn(): void { page += mem.request_page(1); diff --git a/sysdata/system_config.toml b/sysdata/system_config.toml index a7060f8d..f5101e87 100644 --- a/sysdata/system_config.toml +++ b/sysdata/system_config.toml @@ -28,4 +28,4 @@ path = "boot:///tests.hbf" path = "boot:///fb_driver.hbf" [boot.limine.ableos.modules.time_driver] -path = "boot:///time_driver.hbf" \ No newline at end of file +path = "boot:///time_driver.hbf"