akern-gkgoat-fork/sysdata/programs/fb_driver/src/main.hb
koniifer 12ee3a9b87 fix random
implement hardware_random_u32
implement math.max, alter math.min
remove unneeded dependencies from fb_driver
2024-08-30 16:22:13 +01:00

19 lines
380 B
Plaintext

.{log, memory, string, buffer} := @use("../../../libraries/stn/src/lib.hb")
main := fn(): int {
buffer_id := buffer.create("XGraphics\0")
memmap := memory.request_page(1)
x := 0
loop {
msg := buffer.receive_message(buffer_id, memmap, 0)
if msg != 0 {
log.info("Hello, Framebuffer!\0")
}
loop if x == 4096 {
*(memmap + x) = 0
x += 1
}
x = 0
}
return 0
}