1
0
Fork 0
forked from AbleOS/ableos
ableos_time/sysdata/programs/tests/src/main.hb

30 lines
667 B
Plaintext
Raw Normal View History

2024-07-20 04:10:15 -05:00
stn := @use("../../../libraries/stn/src/lib.hb");
.{log, string, memory, buffer} := stn
2024-07-20 12:54:58 -05:00
windo := @use("../../../libraries/windo/src/lib.hb");
.{WindowID, create_window} := windo
2024-07-06 09:24:23 -05:00
2024-07-19 05:47:59 -05:00
service_search := fn(): void {
2024-07-20 04:10:15 -05:00
a := "\{01}\0"
@eca(void, 3, a, string.length)
return
2024-07-19 05:47:59 -05:00
}
2024-07-07 08:35:07 -05:00
main := fn(): int {
2024-07-19 08:53:45 -05:00
// Create a buffer
num := 2
buffer_id := buffer.create()
buffer.send_message(buffer_id)
memory_pages := memory.request_page(3)
buffer.receive_message(buffer_id, memory_pages, 4096 * 3)
log.info("abc\0")
memory.release_page(memory_pages, 3)
2024-07-20 12:54:58 -05:00
window := create_window()
2024-07-20 04:10:15 -05:00
2024-07-19 08:53:45 -05:00
// todo: abstract this out
port_str := "\0\{70}\0"
a := @eca(u8, 3, 3, port_str, 2)
return 0
2024-07-20 12:54:58 -05:00
}