1
0
Fork 0
forked from AbleOS/ableos
ableos_time/sysdata/libraries/stn/src/memory.hb

19 lines
406 B
Plaintext
Raw Normal View History

2024-07-07 08:35:07 -05:00
request_page := fn(page_count: u8): ^u8 {
2024-07-19 08:53:45 -05:00
msg := "\{00}\{01}xxxxxxxx\0"
msg_page_count := msg + 1;
*msg_page_count = page_count
return @eca(^u8, 3, 2, msg, 12)
2024-07-07 08:35:07 -05:00
}
release_page := fn(ptr: ^u8, page_count: u8): void {
2024-07-19 08:53:45 -05:00
msg := "\{01}\{00}xxxxxxxx\0"
2024-07-07 08:35:07 -05:00
2024-07-19 08:53:45 -05:00
msg_page_count := msg + 1;
*msg_page_count = page_count
2024-07-07 08:35:07 -05:00
2024-07-19 08:53:45 -05:00
msg_ptr := @as(^^u8, @bitcast(msg + 2));
*msg_ptr = ptr
return @eca(void, 3, 2, msg, 12)
}