code wiki / _hdl_build / nx_builder_authors_flatedecode.nx

nx_builder_authors_flatedecode.nx source

↩ module page · 15 lines · 793 B

1// nx_builder_authors_flatedecode.nx -- the BUILDER authors the inflate LIBRARY + the FlateDecode wrapper. 2import "nx_module_author.nx" 3import "nx_syscalls.nx" 4func _b(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } 5func main() -> i64 { 6 _b("BUILDER authors the inflate LIBRARY + FlateDecode wrapper\n" as *u8) 7 let lf: i64 = sys_openat_wr("runtime/_hdl_build/_inflate_lib_authored.nx" as *u8, 0x1a4) 8 ma_emit_inflate_lib(lf) 9 sys_close(lf) 10 let ff: i64 = sys_openat_wr("runtime/_hdl_build/_flatedecode_authored.nx" as *u8, 0x1a4) 11 ma_emit_flatedecode(ff, "flate_decode" as *u8) 12 sys_close(ff) 13 _b(" -> _inflate_lib_authored.nx + _flatedecode_authored.nx authored; Engineer verifies next\n" as *u8) 14 sys_exit(0); return 0 15}