nx_hexdump.nx
buildroot/runtime/nx_hexdump.nx
about
hexdump.nx -- xxd-style byte buffer dump.
Produces human-readable byte listings like:
00000000: 4865 6c6c 6f2c 2057 6f72 6c64 210a Hello, World!.
0000000d: 4e69 7368 690a Nishi.
Used for: debugging crypto outputs, network packet dumps, IR
inspection, anything where hex + ASCII side-by-side is the
right debug lens.
Format (xxd default):
<8-hex offset>: <8 pairs of 2-hex bytes, space between pairs> <ASCII>
Bytes 0x20..0x7E render as themselves; others as '.'.
16 bytes per row.
Invariants:
HD1 Output is deterministic: same input bytes -> same output.
HD2 ASCII column padded so rows align visually -- last row
with <16 bytes left gets padding spaces.
HD3 Offsets are 8 hex digits (fits up to 4 GiB; enough for
every realistic buffer).
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
| 46 | func hd_emit_hex_byte(out: *u8, pos: i64, b: i64) -> i64 called by 1: hexdump |
| 59 | func hd_emit_offset(out: *u8, pos: i64, off: i64) -> i64 called by 1: hexdump |
| 75 | func hexdump(data: *u8, n: i64, out: *u8) -> i64 |
| 127 | func main() -> i64 |