summaryrefslogtreecommitdiff
path: root/anim/scenes/zoom.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-11 09:41:45 -0300
committerGabriel Schneider <[email protected]>2026-11-11 10:14:30 -0300
commit390872b7bb9cdcf3e8095442af88af0dfcb40602 (patch)
treeab767cf46dfca036e61e0e19bb5e1c4772cb1d4d /anim/scenes/zoom.zig
parent378379807fb4cd751e90808c8363caddb365bcd8 (diff)
downloadcomputeranim-390872b7bb9cdcf3e8095442af88af0dfcb40602.tar.gz
computeranim-390872b7bb9cdcf3e8095442af88af0dfcb40602.zip
canim: what the verification review found, fixed
A register's chain reads memory as its panel shows it, and follows again only after the bytes land: rsi no longer shows what read returns before the kernel writes it. Bytes keep their old value through the arm and change at their own strike, in every dump, stack word and loupe. The dive lands once. Captions lead what they name: the longest still in the syscalls scene is 2.8 s where it was 13. Pins hold through a sprint; a row of a view carries the pin of the register that points at it; a left child's badge sits on its left shoulder; a log scrolls with the row that arrives. The zoom scene's camera holds the disassembly's rows and the stack in one view. Six programs, the title says now. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'anim/scenes/zoom.zig')
-rw-r--r--anim/scenes/zoom.zig18
1 files changed, 12 insertions, 6 deletions
diff --git a/anim/scenes/zoom.zig b/anim/scenes/zoom.zig
index 1f23c05..426d3a3 100644
--- a/anim/scenes/zoom.zig
+++ b/anim/scenes/zoom.zig
@@ -7,8 +7,9 @@
//! row fires in the disassembly, the registers it changed strike, then
//! the stack, and the mark walks down the listing. The camera goes
//! nearer once, announced (its target framed, the rest cleared first),
-//! for the call: the eight bytes of the way back, and the frame built
-//! under them; then back, and the line is where it was, one call deeper.
+//! for the call: the instructions and the stack's words in one view, the
+//! eight bytes of the way back and the frame built under them; then back,
+//! and the line is where it was, one call deeper.
const anim = @import("anim");
const canim = @import("canim");
const recordings = @import("recordings");
@@ -39,17 +40,22 @@ fn frame(s: *anim.Frame) void {
at.walk(s, .moment, call.enter - 1);
says.line(s, "`call` writes eight bytes on the stack: the way back.");
- // Nearer, for the bytes: the stack alone, twice the size.
- cam.go(s, split.stack, 2, .{ ctx.source, ctx.disasm, ctx.registers, ctx.backtrace });
- // Under the camera the stack holds still: six free words above rsp for the new frame.
+ // The stack holds still under the camera, set before it moves: six free
+ // words above rsp for the new frame (rsp-30 to rsp+8).
ctx.stage.holdStack(s, at.moment(s), 6);
+ // Nearer, cause and effect in one view: the instructions as they run
+ // (mnemonics, operands, what each leaves) and the stack's words they
+ // write with their chains and roles (`fib+42`, `saved rbp`, `n`): from
+ // the mnemonics to the roles' end is all the stage holds at x1.16 (at
+ // x1.5 the stack's names and roles are off it); the rest cleared.
+ cam.go(s, .{ .x = 190, .y = 342, .w = 1525, .h = 480 }, 1.16, .{ ctx.source, ctx.registers, ctx.backtrace });
at.walk(s, .moment, call.enter);
// The frame built under them, under a caption of its own (12 s at most).
says.line(s, "The new frame saves `rbp` under them,\nthen stores its own `n`.");
at.walk(s, .moment, call.enter + 4);
s.wait(canim.theme.time.beat);
ctx.stage.releaseStack(s);
- cam.back(s, .{ ctx.source, ctx.disasm, ctx.registers, ctx.backtrace });
+ cam.back(s, .{ ctx.source, ctx.registers, ctx.backtrace });
says.line(s, "Nine instructions and three words of stack later\n`fib(4)` begins: the same lines, one call deeper.");
at.walk(s, .line, end);