code wiki / (root) / nx_x86_dosfs_gate.nx

nx_x86_dosfs_gate.nx

buildroot/runtime/nx_x86_dosfs_gate.nx

4880 B88 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic x86
docsdependenciesstructsconstsfunctions

about

nx_x86_dosfs_gate.nx -- R-DOS1: Nishi-DOS file I/O over a sovereign virtual FS (our own, clean-room). The host pre-loads one file "FILE" = "NISHI-DOS!$" into the Nishi FS. The program then, via our own INT 21h: opens "FILE" (3Dh), reads it (3Fh) into a buffer, and prints it (09h). Proves a real program loads and reads its own data file through DOS services we wrote ourselves -- no MS-DOS, no FreeDOS. B4 3D / B0 00 / BA 40 01 / CD 21 open "FILE"@0x140 -> AX=handle 89 C3 MOV BX,AX B4 3F / B9 0B 00 / BA 00 03 / CD 21 read 11 bytes -> buffer@0x300 B4 09 / BA 00 03 / CD 21 print buffer ($-terminated) B4 4C / CD 21 terminate

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_x86.nx nx_gate_verdict.nx nx_x86_dosfs_gate.nx

imports: nx_syscalls.nxnx_x86.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

structs

none

consts

none

functions

14func g_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
15func g_pn(v: i64) -> i64
29func g_check(name: *u8, cond: i64) -> i64
35func main() -> i64