nx_pe_compile_win_dll.nx
buildroot/runtime/nx_pe_compile_win_dll.nx
about
nx_pe_compile_win_dll.nx -- compiler->DLL: wrap REAL nx_cc-compiled NishiLang in a PE DLL with named exports, incl. an
MS-x64->SysV ABI thunk (up to 4 int args) so exported functions that take arguments work. Assembles the .s nx_cc emitted
(reuse nxasm_x86 axc_pass, NO shared edit), resolves export offsets, appends the thunk, emits a 2-export DLL. Exports:
nishi_answer (direct no-arg) + nishi_render(buf,w,h) (via thunk) -- a real rasterizer a foreign Windows process calls to
get a rendered frame in a caller-provided buffer = "a game calls our sovereign d3d-lib and gets pixels". Code is
position-independent (immediate/rel32) -> no .reloc; based 0x180000000. cl/WARP = oracles only; DLL = 100% NishiLang.
Input: /tmp/nishi_export_lib.s Output: knowledge/nishi_compiled.dll license_tier: ORIGINAL expect_exit: 0
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_itoa_lib.nxnxasm_x86.nxnx_pe_writer.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 13 | func pcwd_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 18 | func pcwd_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 19 | func pcwd_wstr(buf: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ buf[off+i]=s[i]; i=i+1 } buf[off+i]=0 as u8; return i+1 } called by 1: pcwd_emit_dll |
| 21 | func pcwd_assemble_exports(src: *u8, n: i64, out: *u8, out_cap: i64, p0: *i64, l0: *u8, p1: *i64, l1: *u8) -> i64 |
| 61 | func pcwd_emit_dll(buf: *u8, code: *u8, code_len: i64, answer_off: i64, render_off: i64) -> i64 |
| 131 | func main() -> i64 |