code wiki / (root) / nx_hexdump.nx

nx_hexdump.nx

buildroot/runtime/nx_hexdump.nx

4418 B137 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_hexdump.nx

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

main sys_mmap hexdump hd_emit_offset hd_emit_hex_byte

structs

none

consts

none

functions

46func hd_emit_hex_byte(out: *u8, pos: i64, b: i64) -> i64
called by 1: hexdump
59func hd_emit_offset(out: *u8, pos: i64, off: i64) -> i64
called by 1: hexdump
75func hexdump(data: *u8, n: i64, out: *u8) -> i64
called by 1: main calls 2: hd_emit_offsethd_emit_hex_byte
127func main() -> i64
calls 2: sys_mmaphexdump