code wiki / _hdl_build / nx_sovereign_surface_gate.nx
nx_sovereign_surface_gate.nx
buildroot/runtime/_hdl_build/nx_sovereign_surface_gate.nx
about
nx_sovereign_surface_gate.nx -- PROVES, mechanically, that the Breeders stack is emitted from NishiLang
FROM THE FIRST BYTE UP and that ONE frame is interoperable across the sovereign surfaces.
(operator 2026-07-27: "make sure we are emitting from nishi lang from the first byte up not building
into 3rd parties but we do want it to be interoperable aka nishi os and browser first then making it
work on android or windows etc")
★WHY A GATE AND NOT A PROMISE: rule 26's discipline -- a sovereignty claim must be proven mechanically,
never asserted. So this gate READS ITS OWN DEPENDENCIES' SOURCE OFF DISK and fails if any of them
reaches outside the nx_* namespace. A future session cannot quietly `import` a third-party shim and
keep the green, because the check is structural rather than documentary.
THE INTEROP CONTRACT UNDER TEST -- ONE framebuffer, many sinks, no conversion library:
packed i64 per pixel, R | G<<8 | B<<16 (nx_game_raster's format)
-> NishiOS : the same word order the sovereign display controller + UEFI GOP sink consume
-> Nishi Browser: byte 0=R,1=G,2=B of each i64 read straight out of linear memory by the canvas
blit (the loader contract the emitted pages already use)
-> PNG : nx_png_write_rgb, our own encoder (STORED zlib, no third-party deflate)
-> Android/Windows: reachable BECAUSE the core is integer-only -- no float, no FPU rounding
mode, no endian-dependent struct punning -- so a byte-identical result on a
different ISA is a property of the code, not a hope. T5 proves determinism;
the aarch64/x86 backends are the graphics lane's Gx-2 rung, NOT claimed here.
license_tier: ORIGINAL
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_char_identity.nxnx_game_raster.nxnx_png_write.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
| 45 | const TW: i64 = 96 |
| 46 | const TH: i64 = 64 |
functions
| 28 | func p(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 29 | func pn(v: i64) -> i64 |
| 43 | func nl() -> i64 { p("\n" as *u8); return 0 } |
| 49 | func slurp(path: *u8, buf: *u8, cap: i64) -> i64 |
| 64 | func at(buf: *u8, len: i64, i: i64, needle: *u8) -> i64 |
| 74 | func count_of(buf: *u8, len: i64, needle: *u8) -> i64 |
| 81 | func foreign_imports(buf: *u8, len: i64) -> i64 |
| 96 | func main() -> i64 |