code wiki / _hdl_build / nx_apng_write_gate.nx
nx_apng_write_gate.nx
buildroot/runtime/_hdl_build/nx_apng_write_gate.nx
about
nx_apng_write_gate.nx -- gate for the sovereign APNG encoder. Writes a 4-frame moving-square clip,
reads the ON-DISK bytes back and verifies the structure a browser needs: PNG signature, acTL with the
right frame count, the fcTL/fdAT chain with the SPEC's shared sequence numbering (0,1,2,3,4,5 across
fcTL/IDAT/fcTL/fdAT...), CRC of the acTL chunk validates, and the frame PAYLOADS DIFFER (the square
really moves -- parsed out of the stored-zlib stream, not assumed). NEG: a plain nx_png_write PNG has
NO acTL (the animated check cannot false-fire on a still). expect_exit: 0 license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_apng_write.nxnx_gate_verdict.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
| 10 | func ag_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } called by 1: main |
| 11 | func ag_num(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 } called by 1: main |
| 12 | func ag_rd32(b: *u8, o: i64) -> i64 { return ((b[o] as i64)<<24)|((b[o+1] as i64)<<16)|((b[o+2] as i64)<<8)|(b[o+3] as i64) } called by 1: main |
| 13 | func ag_typ(b: *u8, o: i64, t0: i64, t1: i64, t2: i64, t3: i64) -> i64 called by 1: main |
| 18 | func main() -> i64 |