1
0
Fork 0
forked from koniifer/ableos

update the compiler

This commit is contained in:
Able 2024-07-19 05:47:59 -05:00
parent 0f3c94c0c9
commit bb37de554f
9 changed files with 25 additions and 9 deletions

6
Cargo.lock generated
View file

@ -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)",
]

View file

@ -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 => (),

View file

@ -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 {

View file

@ -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;
}

View file

@ -0,0 +1,2 @@
# Framebuffer Driver
A simple framebuffer driver.

View file

@ -1,7 +1,7 @@
main := fn(): int {
frame_buffer := @as(^u8, @bitcast(18446603339442421760));
color := 17;
frame_buffer := @as(^u8, @bitcast(18446603339442421760));
main := fn(): int {
color := 17;
loop {
len := (786432 * 4)+1;
loop if len == 0 break else {

View file

@ -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);

View file

@ -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);