code wiki / (root) / nx_x86_dos_gate.nx

nx_x86_dos_gate.nx

buildroot/runtime/nx_x86_dos_gate.nx

3955 B79 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic x86
docsdependenciesstructsconstsfunctions

about

nx_x86_dos_gate.nx -- R1.1: run a REAL DOS .COM on the sovereign x86 emulator. Hello-World program: B4 09 MOV AH,09h (DOS print-string function) BA 0B 01 MOV DX,0x010B (offset of the $-terminated string) CD 21 INT 21h -> prints "Hello, World!" into the console buffer B4 4C MOV AH,4Ch (terminate) CD 21 INT 21h -> sets the exit flag -> emulator halts 0x10B: "Hello, World!$" Proves 8-bit reg moves (B0+r) + INT (CD) + the HLE DOS INT 21h handler -> an actual program produces output.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_x86.nx nx_gate_verdict.nx nx_x86_dos_gate.nx

imports: nx_syscalls.nxnx_x86.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

structs

none

consts

none

functions

13func 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 }
14func g_pn(v: i64) -> i64
28func g_check(name: *u8, cond: i64) -> i64
34func main() -> i64