summaryrefslogtreecommitdiff
path: root/anim/scenes/syscalls.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-11 02:11:12 -0300
committerGabriel Schneider <[email protected]>2026-11-11 04:20:25 -0300
commit5922ee911b9a6604f60dc83be36ba9e6c9abac98 (patch)
tree310b983f5205709e5db173f9f1bc8e8d499d24fe /anim/scenes/syscalls.zig
parent64e64c74be6a3e46abeae8a30dd42efff91aaf91 (diff)
downloadcomputeranim-5922ee911b9a6604f60dc83be36ba9e6c9abac98.tar.gz
computeranim-5922ee911b9a6604f60dc83be36ba9e6c9abac98.zip
canim: what the second review found, fixed
A system call stepped over plays in order: the registers set, the crossing from the call row with the kernel's window under it, the stores after rax. A strike covers the bytes that changed. The band's view changes with the argument framing. In the descent a callee sits under its caller's return row, and rows fade before others glide. The heap scene follows the storyboard's nine captions: pushes at a run without marks, each free and the malloc that takes the head back walked, the tcache's loupe over the stack and closed with each advance, a chunk in neither list drawn, the freed node travelling to malloc's row. In the dive the map falls into the corner and becomes the minimap; on the map boxes are as long as their rows. A narrow read is shown at its width. The chart checks captions and one-frame changes. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'anim/scenes/syscalls.zig')
-rw-r--r--anim/scenes/syscalls.zig10
1 files changed, 7 insertions, 3 deletions
diff --git a/anim/scenes/syscalls.zig b/anim/scenes/syscalls.zig
index db67045..0d39089 100644
--- a/anim/scenes/syscalls.zig
+++ b/anim/scenes/syscalls.zig
@@ -58,11 +58,15 @@ fn frame(s: *anim.Frame) void {
says.line(s, "`main` calls `open` by its stub in the PLT. The arguments\nare in rdi and rsi: \"note\" and O_RDONLY.");
canim.descent.step(cur, s, .moment);
s.wait(t.phrase_rest);
- says.line(s, "The call went down: main's window keeps its call, ringed;\nthe stub's jmp reads the GOT, and goes on to libc.");
+ says.line(s, "The call went down: main's window keeps its call, ringed,\nand the stub's three rows open under it.");
+ says.line(s, "The stub's jmp reads open@got, the GOT's slot,\nand goes on to libc's `open`.");
canim.descent.step(cur, s, .moment);
s.wait(t.phrase_rest);
- says.line(s, "libc's `open` is a wrapper: it puts openat's number in rax\nand its arguments in rdi, rsi, rdx and r10.");
- cur.hurry(s, .moment, crossing, .{});
+ // The wrapper at a run, veiled; its last three instructions walked, named as they run.
+ says.line(s, "libc's `open` is a wrapper: no source, its own code,\nup to the instruction that calls the kernel.");
+ cur.hurry(s, .moment, crossing - 3, .{});
+ says.line(s, "Its last three set r8 to 0, rdi to AT_FDCWD (-100)\nand rax to 257: openat's number.");
+ cur.walk(s, .moment, crossing);
says.line(s, "`syscall` crosses down. The kernel opens the file\nand answers in rax: 3, the descriptor.");
canim.descent.step(cur, s, .moment);
s.wait(t.phrase_rest);