code wiki / _hdl_build / nx_cap_register_test.nx
nx_cap_register_test.nx
buildroot/runtime/_hdl_build/nx_cap_register_test.nx
about
nx_cap_register_test.nx -- prove the Librarian's lint+register catches the EXACT bug Claude made by hand
(caps at lay 6/7/8 with nlayers=6 -> invisible) and that the team's validated registration EXCEEDS the
manual process. Exit 0 on 10/10. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_cap_register.nxnx_syscalls.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
| 8 | func ct_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 9 | func ct_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=48+(m%10);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 } |
| 10 | func ct_has(buf: *u8, n: i64, ndl: *u8, nl: i64) -> i64 { var i: i64=0; while i<=n-nl { var j: i64=0; var ok: i64=1; while j<nl { if buf[i+j]!=ndl[j] {ok=0;j=nl} j=j+1 } if ok==1 {return 1} i=i+1 } return 0 } called by 1: main |
| 12 | func main() -> i64 |