code wiki / _hdl_build / nx_driver_emit.nx
nx_driver_emit.nx
buildroot/runtime/_hdl_build/nx_driver_emit.nx
about
nx_driver_emit.nx -- DRIVER-FROM-SPEC (X-DRV-W1), built on the emitter-of-emitters keystone.
A DEVICE SPEC (here: the vendor id to bind) -> this organ EMITS a driver (NishiLang source) that
scans the REAL hardware map (knowledge/registry/hwmap.tsv, authored by HWMAP / X-DRV-W0) and
counts the devices whose vendor matches the spec = BINDS its devices. The match-loop control flow
is synthesized from the spec (the vendor pattern is baked in), and nx_cc compiles it -- so a NEW
device class = a NEW spec -> a NEW driver, NO new code (the driver-as-spec-composition thesis).
Composes X-DRV-W0 (HWMAP) + X-AUT-006c/e (emitter-of-emitters / compiler-dual).
nx_driver_emit <basename> <vendor> -> runtime/_hdl_build/<basename>.nx
Honest scope: this is the device PROBE/BIND layer (which devices this driver claims); the bare-
metal register protocol (handshake/ring/DMA) is the K-R2 virtio lane. Sovereign. 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
| 12 | const K_MAGIC_65536: i64 = 65536 |
functions
| 14 | func dv_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: main |
| 15 | func dv_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i } called by 1: main |
| 16 | func dv_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 27 | func dv_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 main(argc: i64, argv: *i64) -> i64 |