nx_gen_sw_emit_test_20260907.nx source
↩ module page · 12 lines · 423 B
1// nx_gen_sw_emit_test_20260907.nx -- Writes the contents of the GGW_SW_JS buffer to standard output until completion.
2import "_hdl_build/nx_gen_gateway_request_test_20260907.nx"
3func main() -> i64 {
4 let n: i64 = gw_slen(GGW_SW_JS)
5 var off: i64 = 0
6 while off < n {
7 let wrote: i64 = sys_write(1, GGW_SW_JS + off, n - off)
8 if wrote <= 0 { return 3 }
9 off = off + wrote
10 }
11 return 0
12}