summaryrefslogtreecommitdiff
path: root/anim/scenes/zoom.zig
diff options
context:
space:
mode:
Diffstat (limited to 'anim/scenes/zoom.zig')
-rw-r--r--anim/scenes/zoom.zig7
1 files changed, 6 insertions, 1 deletions
diff --git a/anim/scenes/zoom.zig b/anim/scenes/zoom.zig
index ee24e7d..1f23c05 100644
--- a/anim/scenes/zoom.zig
+++ b/anim/scenes/zoom.zig
@@ -27,6 +27,8 @@ fn frame(s: *anim.Frame) void {
at.levels = .{ .fire = .disasm, .source_rows = 14 };
const split = canim.layout.split.none;
const ctx = canim.context(s, at, .{ .split = split });
+ // The map's drawing: the calls of fib so far, as the fib scene draws them.
+ ctx.map.drawing(s, rec, canim.CallTree{ .cursor = at, .stage = ctx.map.stage, .function = "fib" });
var cam: canim.Camera = .{};
var says: canim.Narrator = .{};
@@ -36,11 +38,14 @@ fn frame(s: *anim.Frame) void {
// The CPU's level: an instruction a step. The argument is worked out in `rdi`.
at.walk(s, .moment, call.enter - 1);
- says.line(s, "`call` writes eight bytes on the stack: the way back.\nThe new frame saves `rbp` under them, then its own `n`.");
+ 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.
ctx.stage.holdStack(s, at.moment(s), 6);
+ 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);