code wiki / _hdl_build / nx_browser_drive.nx
nx_browser_drive.nx
buildroot/runtime/_hdl_build/nx_browser_drive.nx
about
nx_browser_drive.nx -- THE KEYSTONE ORGAN (S21 census: input drive). Drives the NISHI BROWSER (our own
Windows PE, first-byte-up sovereign) through its nxshot drive lane: a line-verb script executed against
live page state via the SAME code paths the GUI uses (br_hit_link -> resolve_url -> fetch_url ->
br_layout), emitting an INTERACTION RECORDING (frames + a steps log = what actually happened per verb).
Script verbs: shot | scroll <px> | click <x> <ydoc> (document coords) | open <url> | wait <ms>.
Split responsibilities (Windows PE cannot exec from this Linux ELF): this organ PREPARES the drive
(control files) and COLLECTS/GRADES the result; the one-line launcher (Start-Process nishi.exe) is the
rule-27 shell lane (shell only to launch a sovereign exe). v1 scope, honest: click/scroll/open/wait/shot.
Network interception, console capture, trace REPLAY, mobile emulation are SEPARATE organs (census keeps
them GAP until built). usage:
nx_browser_drive prep <url> <scriptfile> stage nxshot.flag/url/script in CWD
nx_browser_drive collect read meta+steps, print the drive report; exit 0 iff
frames>0 AND steps>0 AND no FETCH-EMPTY in the log
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_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
| 18 | func bw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 19 | func bn(v: i64) -> i64 { let t: *u8=sys_mmap(24); var m: i64=v; if m<0{sys_write(1,"-" as *u8,1);m=0-m} 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} let b: *u8=sys_mmap(24); var j: i64=0; while j<k{b[j]=t[k-1-j];j=j+1} sys_write(1,b,k); return 0 } |
| 20 | func beq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8) { if a[i]!=b[i] { return 0 } i=i+1 } if b[i]==(0 as u8) { return 1 } return 0 } called by 1: main |
| 21 | func bslen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 23 | func bwrite_file(path: *u8, buf: *u8, n: i64) -> i64 |
| 36 | func bhas(buf: *u8, n: i64, needle: *u8) -> i64 |
| 50 | func bmeta_int(buf: *u8, n: i64, key: *u8) -> i64 |
| 75 | func main(argc: i64, argv: *i64) -> i64 |