code wiki / (root) / _offc_outbuf_c.nx

_offc_outbuf_c.nx source

↩ module page · 9 lines · 233 B

1// outbuf_c: out_new + use o.buf as *u8 + write a byte. 2import "syscalls.nx" 3import "outbuf.nx" 4func main() -> i64 { 5 let o: *OutBuf = out_new(64) 6 o.buf[0] = 42 7 let v: i64 = o.buf[0] 8 return v // expect 42 9}