code wiki / (root) / _offc_probe.nx

_offc_probe.nx source

↩ module page · 11 lines · 367 B

1import "syscalls.nx" 2 3// Tiny self-contained test program: print "ok\n" and exit 7. 4// We test by stdout content (qemu's exit-code propagation through 5// wsl is unreliable); seeing "ok\n" means the run-loop worked. 6func main() -> i64 { 7 let msg: *u8 = sys_mmap(8) 8 msg[0] = 0x6F; msg[1] = 0x6B; msg[2] = 0x0A; msg[3] = 0 9 sys_write(1, msg, 3) 10 return 7 11}