code wiki / _hdl_build / _eoe_gen2.nx

_eoe_gen2.nx source

↩ module page · 18 lines · 458 B

1// GENERATED BY nx_eoe (emitter-of-emitters) -- control flow synthesized from a DATA spec, compiled by nx_cc. license_tier: ORIGINAL 2import "nx_syscalls.nx" 3func main() -> i64 { 4 var acc: i64 = 0 5 var i0: i64 = 1 6 while i0 <= 10 { 7 var i1: i64 = 1 8 while i1 <= 10 { 9 acc = acc + i0 * i1 10 i1 = i1 + 1 11 } 12 i0 = i0 + 1 13 } 14 let b: *u8 = sys_mmap(8) 15 b[0] = (acc & 0xff) as u8 16 sys_write(1, b, 1) 17 return 0 18}