code wiki / _hdl_build / nx_nishios_window.nx
nx_nishios_window.nx
buildroot/runtime/_hdl_build/nx_nishios_window.nx
about
nx_nishios_window.nx -- "see NishiOS in a window": boot the kernel on the SOVEREIGN rv64 emulator
(same device-model runtime as nx_boot_run_sov; qemu stays alignment-only) and EMIT a styled HTML
"NishiOS boot console" -- a CRT-style screen showing the UART output + the hardware state (halt
code, steps, device models). The operator opens it in a browser window to SEE the OS boot and
test from the hardware rung up. HTML is emitted BY a Nishi organ (sovereign web doctrine).
writes knowledge/status/nishios_screen.html
No persistent-hardware writes -- the emulator's host-mode writes are inert by construction (Rule 26).
license_tier: ORIGINAL
dependencies 6 imports · 0 importers
imports: rv64im_min_sim.nxrv64im_min_csr.nxrv64im_min_clint.nxrv64im_min_uart.nxrv64im_min_virtio.nxrv64im_min_nvme.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
| 15 | const NW_MAGIC_16384: i64 = 16384 |
| 17 | const NW_MEM_BASE: i64 = 0x80000000 |
| 18 | const NW_MEM_SIZE: i64 = 65536 |
| 19 | const NW_TX_CAP: i64 = 4096 |
| 20 | const NW_MAX_STEPS: i64 = 100000 |
functions
| 22 | func nw_p(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 |
| 23 | func wa(buf: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ buf[off+i]=s[i]; i=i+1 } return off+i } called by 1: main |
| 24 | func wb(buf: *u8, off: i64, src: *u8, n: i64) -> i64 { var i: i64=0; while i<n { buf[off+i]=src[i]; i=i+1 } return off+i } called by 1: main |
| 25 | func wn(buf: *u8, off: i64, v: i64) -> i64 { var o: i64=off; if v==0 { buf[o]=48 as u8; return o+1 } let t: *u8=sys_mmap(28); var m: i64=v; var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } var i: i64=0; while i<k { buf[o+i]=t[k-1-i]; i=i+1 } return o+k } called by 1: main |
| 27 | func main() -> i64 |