code wiki / (root) / hexdump.nx

hexdump.nx

buildroot/runtime/hexdump.nx

3723 B117 linesdepth 3pulls 3 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

syscalls.nx hexdump.nx

imports: syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main hexdump hd_emit_offset hd_emit_hex_byte

structs

none

consts

none

functions

26func hd_emit_hex_byte(out: *u8, pos: i64, b: i64) -> i64 {
called by 1: hexdump
39func hd_emit_offset(out: *u8, pos: i64, off: i64) -> i64 {
called by 1: hexdump
55func hexdump(data: *u8, n: i64, out: *u8) -> i64 {
called by 1: main calls 2: hd_emit_offsethd_emit_hex_byte
107func main() -> i64 {
calls 1: hexdump