1
0
Fork 0
forked from AbleOS/ableos
ableos-idl/sysdata/libraries/stn/src/buffer.hb

20 lines
526 B
Plaintext
Raw Normal View History

2024-07-07 08:35:07 -05:00
string := @use("rel:string.hb");
receive_message := fn(buffer_id: int, memory_map_location: ^u8, length: int): ^u8 {
2024-07-19 05:47:59 -05:00
return @eca(^u8, 4, buffer_id, memory_map_location, length);
2024-07-07 08:35:07 -05:00
}
send_message := fn(buffer_id: int): void {
message := "Hello there\0";
message_length := string.length(message);
@eca(i32, 3, buffer_id, message, message_length);
return;
}
create := fn(): int {
msg := "\{01}Number\0";
msg_length := string.length(msg);
*msg = 0;
return @eca(int, 1, 0, msg, msg_length);
}