nx_pe_compile_win_fread.nx
buildroot/runtime/nx_pe_compile_win_fread.nx
about
nx_pe_compile_win_fread.nx -- W-NET-5a: native file reading (CreateFileA + ReadFile), the capability
needed to serve the REAL Elder ui/dist from disk on :5173. De-risk standalone before integrating into
the HTTP server. Reads C:/Users/elder/elder-ai-platform/ui/dist/index.html and returns its byte count.
kernel32 only { ExitProcess, GetProcessHeap, HeapAlloc, CreateFileA, ReadFile } -- 1 DLL, 5 funcs.
CreateFileA takes the ASCII path directly (Windows accepts forward slashes), no UTF-16 needed.
lineage_id: substrate_pe_compile_win_fread_v1
dependencies 3 imports · 0 importers
imports: nx_syscalls.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
| 11 | const FR_CODE_CAP: i64 = 1048576 |
| 12 | const FR_FILE_SIZE: i64 = 0x800 |
| 13 | const FR_STUB_LEN: i64 = 18 |
| 14 | const FR_TEXT_CAP: i64 = 0x400 |
| 15 | const FR_RVA_TEXT: i64 = 0x1000 |
| 16 | const FR_RVA_IDATA: i64 = 0x2000 |
| 17 | const FR_FOFF_TEXT: i64 = 0x200 |
| 18 | const FR_FOFF_IDATA:i64 = 0x600 |
| 19 | const FR_IAT_EXIT: i64 = 0x2058 |
| 20 | const FR_IAT_GPH: i64 = 0x2060 |
| 21 | const FR_IAT_HA: i64 = 0x2068 |
| 22 | const FR_IAT_CFA: i64 = 0x2070 |
| 23 | const FR_IAT_RF: i64 = 0x2078 |
| 24 | const FR_L_HALLOC: i64 = 29 |
| 25 | const FR_L_FOPEN: i64 = 57 |
| 26 | const FR_L_FREAD: i64 = 42 |
functions
| 28 | func fr_lbloff(src: *u8, lab_off: *i64, lab_len: *i64, lab_addr: *i64, n_lab: i64, nm: *u8) -> i64 |
| 34 | func fr_assemble(src: *u8, n: i64, out: *u8, out_cap: i64, off: *i64) -> i64 |
| 63 | func fr_redirect(buf: *u8, shim_off: i64, thunk_off: i64) -> i64 |
| 72 | func fr_emit_pe(buf: *u8, code: *u8, code_len: i64, off: *i64) -> i64 |
| 173 | func main() -> i64 |