2024-09-18 03:38:49 -05:00
|
|
|
string := @use("string.hb")
|
2024-07-07 08:35:07 -05:00
|
|
|
|
2024-10-12 07:35:49 -05:00
|
|
|
recv := fn(buffer_id: int, memory_map_location: ^u8, length: int): ^u8 {
|
2024-09-17 19:26:37 -05:00
|
|
|
return @eca(4, buffer_id, memory_map_location, length)
|
2024-07-07 08:35:07 -05:00
|
|
|
}
|
|
|
|
|
2024-10-12 07:35:49 -05:00
|
|
|
write := fn(msg: ^u8, buffer_id: int, length: int): void {
|
2024-09-17 19:26:37 -05:00
|
|
|
return @eca(3, buffer_id, msg, length)
|
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-09-17 19:26:37 -05:00
|
|
|
return @eca(3, 0, msg, msg_length)
|
2024-08-12 08:15:50 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2024-09-17 19:26:37 -05:00
|
|
|
return @eca(3, 0, msg, msg_length)
|
2024-07-20 12:54:58 -05:00
|
|
|
}
|