forked from AbleOS/ableos
12ee3a9b87
implement hardware_random_u32 implement math.max, alter math.min remove unneeded dependencies from fb_driver
19 lines
380 B
Plaintext
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
|
|
} |