nx_iot_sc_emit_a64.nx
buildroot/runtime/nx_iot_sc_emit_a64.nx
about
nx_iot_sc_emit_a64.nx -- SOVEREIGN emitter: NishiLang -> aarch64 .s for the SmartConfig broadcaster
that runs ON the GL.iNet router (the 2.4GHz AP). The "send-loop shortcut": the complex ENCODING
runs here on x86 (reusing the GATED nx_sc_encode), and only the small SEND-LOOP is emitted as ARM
asm to be assembled by nxasm_arm64_main + deployed via routerfix. No full aarch64 compiler needed.
Emits (to stdout): socket(AF_INET,DGRAM) -> SO_BROADCAST -> sockaddr (subnet-directed broadcast
192.168.10.255:7001 -> routes out the IoT bridge onto the 2.4GHz air) -> an OUTER repeat loop over
the U8 length sequence, each length sent as a UDP packet via a `snd` subroutine (sendto + 5ms
nanosleep). Uses ONLY assembler-supported A64 ops (movz/movk/str/add/sub/mov/cmp/b.lt/bl/ret/svc).
aarch64 syscalls (asm-generic): socket=198 setsockopt=208 sendto=206 nanosleep=101 exit=93.
NEVER-BRICK #26: emits reversible Wi-Fi creds only. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_iot_smartconfig.nxnx_syscalls_x86_64.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
| 14 | const K_MAGIC_5000000: i64 = 5000000 |
functions
| 16 | func e_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 17 | func e_nl() -> i64 { let b: *u8 = sys_mmap(1); b[0] = 10 as u8; sys_write(1, b, 1); return 0 } |
| 18 | func e_n(v: i64) -> i64 called by 1: main |
| 27 | func e_line(s: *u8) -> i64 { e_w(s); e_nl(); return 0 } |
| 29 | func main() -> i64 |