2024-07-19 08:53:45 -05:00
|
|
|
string := @use("rel:string.hb")
|
2024-07-07 08:35:07 -05:00
|
|
|
|
|
|
|
receive_message := fn(buffer_id: int, memory_map_location: ^u8, length: int): ^u8 {
|
2024-07-19 08:53:45 -05:00
|
|
|
return @eca(^u8, 4, buffer_id, memory_map_location, length)
|
2024-07-07 08:35:07 -05:00
|
|
|
}
|
|
|
|
|
2024-08-30 08:55:22 -05:00
|
|
|
send_message := fn(msg: ^u8, buffer_id: int): void {
|
2024-09-01 22:36:03 -05:00
|
|
|
msg_length := @inline(string.length, msg)
|
2024-08-30 08:55:22 -05:00
|
|
|
@eca(i32, 3, buffer_id, msg, msg_length)
|
2024-07-19 08:53:45 -05:00
|
|
|
return
|
2024-07-07 08:35:07 -05:00
|
|
|
}
|
|
|
|
|
2024-08-12 08:15:50 -05:00
|
|
|
create := fn(msg: ^u8): int {
|
2024-09-01 22:36:03 -05:00
|
|
|
msg_length := @inline(string.length, msg);
|
2024-07-19 08:53:45 -05:00
|
|
|
*msg = 0
|
2024-08-12 08:15:50 -05:00
|
|
|
return @eca(int, 3, 0, msg, msg_length)
|
|
|
|
}
|
|
|
|
|
|
|
|
search := fn(msg: ^u8): int {
|
2024-09-01 22:36:03 -05:00
|
|
|
msg_length := @inline(string.length, msg);
|
2024-08-12 08:15:50 -05:00
|
|
|
*msg = 3
|
|
|
|
|
|
|
|
return @eca(int, 3, 0, msg, msg_length)
|
2024-07-20 12:54:58 -05:00
|
|
|
}
|