From 4907e35bc45d12102d0e09380994814fc2e0a369 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 12 Nov 2026 04:45:57 -0300 Subject: canim: the introduction, from the review The introduction records the plain build (clang -O0, no instrumentation), so reverse's frame is the compiler's own push, mov and sub. The stack chapter says its convention once and keeps four free words over rsp so a push moves the pin and nothing else; reverse's rows stand under main's and are stepped, each touching its word, the call before the push, the aim drawn head first to the row it returns to. The close-up frames the bytes and the stack together with their 128 bytes marked. Nothing is named before it is shown; offsets are written in hex as the operands are; the dump folds into its tag; the map is announced before it is shown. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa --- anim/src/hexdump.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'anim/src/hexdump.zig') diff --git a/anim/src/hexdump.zig b/anim/src/hexdump.zig index 9b39bf6..d1c363c 100644 --- a/anim/src/hexdump.zig +++ b/anim/src/hexdump.zig @@ -801,8 +801,10 @@ pub fn readingIn(u: ui.Ui, y: f32, shift: f32, moment: Recording.Moment, values: var word: u64 = 0; for (0..@min(len, 8)) |k| word |= @as(u64, bytes[k]) << @intCast(8 * k); if (word == 0) break :blk "NULL"; - if (x + theme.metric.context.arrow_w + @as(f32, @floatFromInt(ui.digits(word))) * adv > room) break :blk "\u{2026}"; - x = u.arrow(x, y + m.row / 2, .points); + // The arrow has its own room, as in a chain: no character before it. + const ax = if (x > b.reading + shift) x - adv else x; + if (ax + theme.metric.context.arrow_w + @as(f32, @floatFromInt(ui.digits(word))) * adv > room) break :blk "\u{2026}"; + x = u.arrow(ax, y + m.row / 2, .points); x = u.address(x, base, word, .{ .ink = ui.rgb(rows.ink(rows.regionOf(moment, word))) }) + adv; continue; }, -- cgit v1.3