1
0
Fork 0
forked from AbleOS/ableos
ableos-idl/sysdata/programs/processes/src/main.hb

19 lines
402 B
Plaintext
Raw Normal View History

2024-11-17 14:29:32 -06:00
.{process, log, string, memory} := @use("../../../libraries/stn/src/lib.hb")
exe := @embed("./hello_world_and_spin.hbf")
main := fn(): void {
buf := "\0\0\0\0\0\0\0"
loop {
log.info(
string.display_int(
@bitcast(process.spawn(@bitcast(&exe), 356)),
buf,
10,
),
)
// spin so we don't spawn 10 quattuordecillion processes
i := 0
loop if i == 1000000 break else i += 1
}
}