1
0
Fork 0
forked from AbleOS/ableos
ableos-idl/sysdata/libraries/stn/src/buffer.hb
koniifer ad85f82be3 begin work for fb_driver interface
create hardware rng buffer & stn.random.uint_64 (currently weird)
move examples out of fb_driver (currently broken)
remove literal kernel panic from `info!("AHHH")`
re-implement stn.buffer.send_message()
2024-08-29 21:37:49 +01:00

24 lines
578 B
Plaintext

string := @use("rel:string.hb")
receive_message := fn(buffer_id: int, memory_map_location: ^u8, length: int): ^u8 {
return @eca(^u8, 4, buffer_id, memory_map_location, length)
}
send_message := fn(message: ^u8, buffer_id: int): void {
message_length := string.length(message)
@eca(i32, 3, buffer_id, message, message_length)
return
}
create := fn(msg: ^u8): int {
msg_length := string.length(msg);
*msg = 0
return @eca(int, 3, 0, msg, msg_length)
}
search := fn(msg: ^u8): int {
msg_length := string.length(msg);
*msg = 3
return @eca(int, 3, 0, msg, msg_length)
}