diff options
Diffstat (limited to 'design/motion.md')
| -rw-r--r-- | design/motion.md | 321 |
1 files changed, 247 insertions, 74 deletions
diff --git a/design/motion.md b/design/motion.md index 07ffabc..82c1749 100644 --- a/design/motion.md +++ b/design/motion.md @@ -450,7 +450,7 @@ With `carry = .after_touch` a store draws both, the row naming the word and then the value going there: the touch to the word first (18 to 30), then the source register framed read and the carry down from its row to the word, the word armed and struck as it lands; what follows (rsp's pin climbing onto a -pushed word) only after. The introduction's `push rbp` (II4) is drawn so, +pushed word) only after. The introduction's `push rbp` (III4) is drawn so, and there a store of the value the word held is struck as any write, its mark gone by the step's end and no corner held: the store is the event the viewer is being shown, and the carry would otherwise land on nothing. @@ -711,6 +711,52 @@ The levels are the cascade's; what is in them is not one write each. A dozen registers struck on one frame is a flash that says only "a lot"; the wave says it in about 0.6 s and lets the eye run down the panel with it. +### A call stepped over + +A call the narration does not follow down, told at the CPU: what it gives +back first, as the call's event, then everything else it left changed. The +introduction's `call malloc@plt` in push (II6, [mock 60](mock/60-regs-call.png)). + +| Frames | | +| --- | --- | +| 0 to 12 | fire on the call row; its annotation, the callee and its arguments hanging under it (`malloc`, `rdi 0x10 16`), in full ink | +| 18 to 24 | the argument registers framed as read, 6 f apart, each with its hanging row (an echo) | +| 24 to 36 | still: the call runs. Nothing of the callee is drawn | +| 36 to 48, 48 | arm, strike: rax, the result; its chain followed again (`extend`) | +| 48 to 54 | the row's annotation becomes the call in C's form and its result, `malloc(16) = 405050`, the result struck with rax (an echo); the hanging rows go | +| 66 to 66 + 2n | the n other registers the call changed, a wave, 2 f apart in pwndbg's order, no arm, no pulse (rcx, rsi, rdi); a chain whose later hop changed takes its corner there (r11's), the flags that changed theirs | +| 36 f after the last strike | hold | +| 12 | the advance: the mark to the row after the call; the clock's gold for the callee's moments fades in with the step's own (162 for malloc) | +| 24 | rest: 2.4 s with three in the wave | + +A call with no result (a `void` one: push, seen from main) has no rax +strike, and its first mark is the wave's. Free words over rsp that the +callee used (its return address, its frame) take their new values in +place, faint and unmarked, as `free` words are drawn. At a run the whole +call is one run step. + +### A register's parts + +`reg`'s [`parts`](README.md#reg) opened for a step that names one, walked: +the introduction's `mov edi, 0x10` (II5, [mock 59](mock/59-regs-parts.png)). +The order is the regroup's read the other way: the word first, then its +bytes, then the names they go by, and only then the instruction. + +| Frames | | +| --- | --- | +| 0 to 6 | the register framed as read, where the beat says its value first (push's argument, 9) | +| 12 to 30 | `unpack`: the rows under it make room, three for rdi's parts (18 f, `glide`) | +| 30 to 42 | its value spreads into its eight bytes, the pairs opening apart, the zeros in front coming in at `pad` (12 f, `glide`) | +| 42 to 66 | its parts' rows, widest first (`edi`, `di`, `dil`): each its bracket and its name, 12 f, 6 f apart | +| 66 to 90 | still: read | +| 90 to 102 | the step: fire on the instruction's row | +| 108 to 114 | the operand that names a part (`edi`), the part's row and its bytes in the register's row framed as read together (an echo) | +| 114 to 126, 126 | arm, strike: the bytes whose value changed (`09` to `10`), 1 f apart from the low end; the row's annotation, `rdi 0x10 16`, struck with them | +| 126 to 162 | hold | +| 162 to 174 | the advance; the cool (24 f) | +| 192 to 228 | `pack`: the parts' rows fade (12 f); then, one move, the bytes close into the value as `value` writes it, `0x10 16`, while the rows under it close up (24 f, `glide`) | +| 228 to 252 | rest: 4.2 s | + ### A pointer written in a panel of rows `n->next = head` where both nodes are rows of the dump: the bytes and the @@ -967,7 +1013,7 @@ own path and its own scale. | 6 to 24 | the rest of the map takes the veil, 50% | | 24 to 96 | each window travels to its panel's place, its scale from a half to whole on its logarithm, `glide`; the panels set off 6 f apart in the frame's reading order (drawing, view, source, registers, disassembly, stack), each drawn over the ones before, so that two crossing are seen to cross. With each, the same 72 f and the same stagger, the rest of its column (the map's panel it is a window on: the file, the 69 instructions, the stack from 16 words above rsp, the region's dump) squeezes into the pane's strip: from its place at half size to the strip's rect, its width and its height each on its logarithm (to 36 of 880; to 4 of 24 a row), its window's outline riding on it. The registers' and the drawing's windows are their panels whole and bring no column | | 24 to 72 | the map's parts no pane takes (the backtrace, the key, the memory round the pointers, a loupe's panel) fade where they are, veiled | -| 24 to 96 | with the move, the registers fold: the map's panel has every register and every chain; as it lands each quiet register's row glides into its cell, three to a row, its chain past the first hop fading over the first 24 f, so the panel arrives at its height in the frame and the stack's window at its own, the longer one | +| 24 to 96 | with the move, the registers [`fold`](README.md#6-verbs) (the map's panel has every register and every chain), on the move's 72 f, so the panel arrives at its height in the frame and the stack's window at its own, the longer one | | 72 to 96 | the drawing crossfades from the map's size to the frame's within its box, where the two differ | | 84 to 102 | each squeezed column crossfades into its strip's strokes (12 f); the working frame's tags, rules and lanes fade in; the clock's count fades in (mock 20) | | 102 to 138 | still | @@ -1024,6 +1070,27 @@ first caption at 60, dives at 150, and has its first step by 300 (5.0 s). | a scene's first step fires | by 240 | | still on the last picture | 120, after the last caption's reading time | +**A scene in chapters** (the introduction's four): each chapter opens on the +last picture of the one before, after a seam, its [`title`](README.md#6-verbs). +From e, the frame its last text has been read: + +| Frames | | +| --- | --- | +| e to e+30 | still: the chapter's last picture | +| e+30 to e+42 | its texts leave together (12 f, `exit`): a bubble that stood as the account goes too | +| e+48 to e+66 | the next chapter's title arrives in the caption's place, rising 8 (18 f, `enter`): its numeral `faint`, its name `bright`, Go Medium 40 | +| e+54 to e+66 | the clock's label crossfades to it (secondary, 6 f after the title's onset) | +| e+66 to e+126 | still: the title is read over the picture | +| e+126 on | the chapter's opening (what turns the last picture into its first: a fold, a fade, panels gliding to their places), under the title | +| the later of the title's reading time and the opening's end | the title leaves (12 f); 6 f; the chapter's first text arrives (18 f) and leads its step by 60 f | + +One pause, e to e+126: 2.1 s in which nothing moves but the old text going +and the title coming. A chapter's own close is that pause; the scene's last +chapter closes as a scene does (above). The scene's first chapter has its +seam from nothing: its title arrives at 6 (to 24), is still to 84, leaves +at its reading time; its first text arrives 6 f after it has gone, and its +first step fires by 240 all the same. + ## Tokens Every figure on this page is a token in `anim/src/theme.zig` (`time`, @@ -1513,29 +1580,82 @@ The frame built from its bytes up, on a recording of its own (`intro`: reversed, built as the compiler alone makes it, clang `-O0 -g -mno-red-zone`, with no instrumentation: nothing the viewer is walked through is a tracer's, `reverse` gets a real prologue, `push rbp; mov rbp, -rsp; sub rsp, 0x18`, and its locals are named by the debug info). Chapters -I and II stand at reverse's first instruction, its `push rbp`, where rsp -holds the way back to main (`401272 main+50`); III at the load on line 21, -`mov rax, [rax + 8]`. Three short scenes, not one: each is a chapter with -its own opening and its own last picture, which the next opens from, so a -viewer can stop between them; together 157 s. Each view grows out of the -rawer thing under it, in the order the -direction rule gives: memory first (the deepest), then the stack that is -made of it, then the code that acts on it, and the idea last, at the top. -Nothing cuts to a finished panel: the same bytes become the word, the -same word the row, the same row the slot. +rsp; sub rsp, 0x18`, and its locals are named by the debug info). One +scene and one video, 206 s, in four chapters, each with its title and its +own opening, grown out of the last picture of the one before; the seams +are the video's chapter marks, so a viewer can stop between them: + +| | Chapter | Its moments | From | Length | +| --- | --- | --- | --- | --- | +| I | Memory | reverse's first instruction, its `push rbp` (rsp holds the way back to main, `401272 main+50`), not named | 0 (0:00) | 4284 f, 71.4 s | +| II | Registers | push(9) at line 11, `mov edi, 0x10`, malloc's argument, on to that same `push rbp` | 4284 (1:11) | 3121 f, 52.0 s | +| III | The stack | that `push rbp`, then `mov rbp, rsp` and `sub rsp, 0x18` | 7405 (2:03) | 2118 f, 35.3 s | +| IV | Code and meaning | the load on line 21, `mov rax, [rax + 8]` | 9523 (2:38) | 2851 f, 47.5 s | + +Each view grows out of the rawer thing under it, in the order the +direction rule gives: memory first (the deepest); then the CPU's own words, +which point into it; then the stack, which two of them keep; then the code +that acts on all of it, and the idea last, at the top. Nothing cuts to a +finished panel: the same bytes become the word, the same word the row, the +same row the slot. + +**Why the registers second.** They need what I gives (eight bytes make a +word, a word can be an address, an address has the ink of its place, a +chain follows it) and nothing the stack gives: a register is read exactly +as a word of I is, and the address space I leaves in the program column is +where their values point, rip's into list's code, rsp's and rbp's into the +stack. The stack in turn leans on them: its first beats are rsp's row +landing on the top word and `push rbp`. In the three videos the stack +chapter named rsp and rbp before anything had said what a register is, +and the registers panel came last, built over the finished stack as "the +other place values live". Now it is built first, whole, in its place, and +the stack chapter opens with rsp and rbp already known. + +**What II teaches, and leaves out.** A register is the CPU's own word, +named and not addressed, sixteen of them and rip, read as a word of I is, +its chain and its ink (II1); rip is where the CPU is in the code (II2) and +the address of the row about to run (II4); rsp and rbp point into the +stack and others into the heap (II3); code names a register's low bytes +(`edi` is rdi's four: II5); an instruction writes a register and it is +struck (II5); a call takes its argument in rdi and gives its result in rax, +and leaves other registers changed (II6); the panel as the working frame +keeps it, the registers the scene moves as rows and the rest folded (II8). +It leaves out a compare and the jump that reads its flags: the program's +only compare in the recording is reverse's `while (cur)` (`cmp [rbp - +0x10], 0; je`), after III's moments and before IV's, so II could show it +only by running the recording backward at its seam to III. The flags are +on rip's row from II2, and II6 changes two of them (corners, unnarrated); +a compare and its jump are walked where they belong, in list's loop and +the graph's `leave`. + +**One recording, one clock.** II starts before I's moment: its call +(malloc's, from push(9)) happens before reverse is reached, and the +chapter walks forward to the instruction I stood at. Nothing on screen +says when I is (no clock, no code, no register: memory at an instant), and +I's dump waits folded on the shelf through II's moments, coming back as I +left it when II reaches that instruction (II8: "back where the 128 bytes +were read"); no frame ever shows two moments' state side by side. The +clock comes with II's first registers (II2's `frame up`) and counts one +recording, from its first stop at line 40: 6 at II's start, 7, 169 after +malloc, 182 at reverse's first instruction (III to 185), 191 at the load (of +193, in this run's numbering): forward only. Its label, ranged right +before the count, names the chapter (`II registers`); in I, which has no +clock, the label alone (`I memory`). **Where the parts are.** Each part is built in the place it has in the finished frame, never centred and moved later: the bytes where the stack will stand (the state column), the address space in the program column, -which is empty until the code comes. The camera frames the part being -built (x2 for the bytes and the words, x1 for the address space beside -them and for the stack and registers, whose text stands in the program -column while it is empty; once more at x2 for the visit of I8, and none -in III, where the band is whole at x1), so the frame's empty parts are -out of shot until the parts that fill them come. An introduction earns -that emptiness; nothing else does. A panel's tag and rule come last -(`frame up`): first the rows, then what they are called. +which is empty until the code comes; the registers at the state column's +top, the dump folded on the shelf meanwhile; the code at the program +column's foot, where the disassembly's panel will hold it. The camera +frames the part being built (x2 for the bytes and the words, x1 for the +address space beside them, for the registers, whole at x1 with the address +space they point into, and for the stack, whose texts stand in the program +column while it is empty; once more at x2 for the visit of I8, and none in +II, III or IV after it), so the frame's empty parts are out of shot until +the parts that fill them come. An introduction earns that emptiness; +nothing else does. A panel's tag and rule come last (`frame up`): first +the rows, then what they are called. **Forms.** Each part is built in the place it keeps, so the forms follow the parts: the working frame with its text `below` while the bytes stand in the @@ -1543,90 +1663,143 @@ state column under the camera; the [column](README.md#column) for the address space, a tall subject (the bar is the column's height, to scale), its bubbles level with each end as it is enlarged, so the chapter goes down the address space with them, while the bytes wait on the shelf; the working -frame again to tie the bytes to their place; in chapter II the text `beside` -on the left, in the program column, which holds nothing else until III but -main's three rows round its call (the return address aims at one: II3, the -scene's one `aim`) and reverse's first seven under them (the disassembly II -walks), level with the stack's rows it speaks of; in III `above` the aligned +frame again to tie the bytes to their place. In II the working frame with +its text `below` while `segments` holds the program column (II1 to II3), +the bytes on the shelf over it as in I4 to I6, then `beside` on the left +once the address space has gone and the code has come to the column's foot +(II4 to II8), each text level with the register it speaks of. In III the +text `beside` on the left, in the program column, which holds nothing else +but main's rows round its call (the return address aims at one: III3, the +scene's one `aim`) and reverse's first six under them (the disassembly III +walks), level with the stack's rows it speaks of; in IV `above` the aligned source and code, which span both columns and read down (wrapped at 80 characters: two lines in the band of 120), then `below` as the working frame assembles, and still `below` as the map surfaces under it. Every text lands -in a rest, leads its step by 60 f (120 for a form's first in III: III1 -above, III3 below; I1's is 60 too, so that its rows come while it is read +in a rest, leads its step by 60 f (120 for a form's first in IV: IV1 +above, IV3 below; I1's is 60 too, so that its rows come while it is read rather than its "here" standing over an empty stage), is up its reading time and at most 720 f, and is covered by its lead, its steps and a hold of at -most 84 f. A chapter's last picture holds until its last text is read and -2 s at least ([caption](README.md#clock-and-caption)); II and III hold the -2 s after the reading, so that the map is never cut while it is read about. +most 84 f. A chapter's last picture holds until its last text is read; then +its seam (below), and the scene's last, IV's, 2 s more +([caption](README.md#clock-and-caption)), so that the map is never cut +while it is read about. **Names after the things.** Nothing is named before it is shown, in a text or a label: the first text says bytes, not the stack; the dump's header is `128 bytes at 7fffffffebc8` and its tag on the shelf `the 128 bytes`; the -stack is named at I7, where its box is on screen, and rsp at II2, where its -row arrives. A convention is said where it first shows: the chain's arrows -at I10, the stack panel's direction at II1 (the bar draws high addresses on -top, the panel low on top, and the push goes up a row), the width squares -with `columns`, the minimaps at III4. +stack is named at I7, where its box is on screen; the registers at II1, as +their rows arrive; rip at II2, its row; "the next to run" at II4, where the +row is; `edi` at II5, its row of the parts. A convention is said where it +first shows: the chain's arrows at I10, a register's parts at II5, the +calling convention at II6 on the call that uses it, the stack panel's +direction at III1 (the bar draws high addresses on top, the panel low on +top, and the push goes up a row), the width squares with `columns`, the +minimaps at IV4. **Notation.** From I's regroup on, a word that is no address is written as the stack will write it (the [`value`](README.md#value) atom: `0`, `1`, -`0x100000000`), so a number reads the same in I and in II. The stack's +`0x100000000`), so a number reads the same in I, II and III. The stack's offsets and a pin's amount take `0x` from 0x10 up (`-8`, `+0x10`, `rsp -0x18`): beside a symbol's decimal offset (`main+50`), `-10` after `-8` would read as ten. -The frames are the build's: a text *lands* when it has arrived, its step -*fires* its lead after, and it *leaves* when it starts to go (a bubble -that stays as the account *dims* instead). +**The seams.** A chapter ends when its last text has been read (call that +frame e) and the next begins there, with its title +([`title`](README.md#6-verbs)): e to e+30 still, the finished picture; its +texts leave together (e+30 to e+42); the title arrives in the caption's +place, `II Registers` (e+48 to e+66), the clock's label with it (e+54 to +e+66, secondary); still under the title (e+66 to e+126); then the next +chapter's opening, its own table's second row, under the title, which +leaves at its reading time or the opening's end, whichever is later; the +chapter's first text arrives 6 f after. So a seam is one pause of 2.1 s +(e to e+126) in which nothing moves but the old text going and the title +coming, where the three videos had two: a chapter's 2 s closing hold and +the next one's 30 f on the same picture, 2.5 s, then each chapter's +opening and a second more before its first text. The video's start is +I's seam from nothing: the title, `I Memory`, arrives at 6 (to 24), still +to 84, leaves at its reading time (143 to 155); I1's text arrives at 161 +and its step fires at 239, by 4.0 s as a scene's first must. Mock 62 is +II's seam, four instants. + +The frames below are each chapter's own, from its e: a text *lands* when it +has arrived, its step *fires* its lead after, and it *leaves* when it starts +to go (a bubble that stays as the account *dims* instead). + +**I. Memory** (71.4 s; the video's frames, the title 6 to 155) + +| | Form · text | Panes (rows) · shelf | Level | The step, and what plays | Text (characters) | Lands | Fires | Leaves | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | +| I1 | working frame · below; the camera at x2 on the state column | the dump of 128 bytes, sixteen a row, eight rows, no ink, the addresses faint, its header over them, `128 bytes at 7fffffffebc8` (mock 29) | | the rows fade in a row at a time (18 f each, 18 f apart: they come while the text is read) | A running program is bytes in memory: here are 128 of them. (59) | 179 | 239 | 481 | +| I2 | the same | the dump | | `regroup`: sixteen a row to eight, the return address (the dump's first word) walked, the other fifteen at a run (mock 37, [chart](#a-word-read)) | Eight bytes make a word, stored low byte first: the lowest byte is its last two digits. (87) | 517 | 577 | 1066 | +| I3 | the same | the dump, sixteen words | | three words that hold addresses framed as read, one at a time, 30 f apart | Some words are addresses: they name a place in memory. (54) | 1101 | 1161 | 1386 | +| | | | | 1386 to 1577, into the column: the text leaves (12 f); the camera out to x1 (72 f, then 36 still); the dump folds to its tag on the shelf, `the 128 bytes` (its rows glide up into its header, the header becomes the tag, the tag slides to the shelf, 24 f each way: README, [column](README.md#column), "Mixing them"); the program column opens to the column's height for `segments` | | | | | +| I4 | column · beside | `segments` (treatment A, mock 34), the panes' column from 84 to 888: a slim bar the column's height, true scale | the bar's middle | the whole builds, deliberately ([chart](#the-address-space-enlarged)) | Its address space, 128 TiB, to scale: mapped only at each end. (62) | 1577 | 1637 | dims 1891 | +| I5 | column · beside | `segments` | the stack's box, at the top | `enlarge`: the stack's box rides out (78 f) and its names come, each band with its start and end addresses and its size; the libraries' box rides as the stack's lands | Enlarged, the top end: the stack, then the libraries, each file with its addresses and size. (92) | 1909 | 1969 | dims 2330 | +| I6 | column · beside | `segments` | the program's box, at the foot (the bubble's way down) | `enlarge`: the program's box, by segment (code, read-only data, data, the heap), its names | At the foot, the program: its code, its data, its heap. (55) | 2348 | 2408 | 2643, the three together | +| | | | | 2643 to 2762, back to the working frame: the texts leave together (12 f); `segments` keeps the program column, its height eased to the stage's (24 f, the drawing scaling as one); the dump unfolds from the shelf in the state column, at x1, the fold backwards (2679 to 2727) | | | | | +| I7 | working frame · below | `segments` in the program column; the dump in the state column | | the dump's place ([chart](#the-address-space-enlarged), mock 30): the `tie` bracket on its rows, the `link` over the top onto the stack's box, the band framed bright as it lands, and with it the dump's addresses taking the stack's ink | These 128 bytes are here, at the very top of the stack. (55) | 2762 | 2822 | 3050 | +| I8 | working frame · below | the same | | a camera `visit` at x2 to the dump's place, the stack's box and the dump's top rows framed together ([chart](#the-address-space-enlarged)): the move (72 f), the place marked `128 bytes` on the box, back (72 f) | Were the bar the Eiffel Tower, they would be an atom thick, at its top. (71) | 3086 | 3146 | 3471 | +| I9 | working frame · below | the same | | `ink` on the return address, walked: its digits, its bytes, its band and the band's row framed (an echo); the rest at a run, 2 f apart; the link and its bracket quiet to standing (24 f) | A word takes the ink of where it points: 401272 is list's code. (63) | 3506 | 3566 | 3830 | +| I10 | working frame · below | the same | | the words glide to their field's left (24 f) to give their chains room; three chains grow (`extend`), 36 f apart | Follow an address and you reach another word: a chain. → points to a word, ← holds a value. (91) | 3866 | 3926 | II's seam | + +The chapter's last picture holds until its text is read, 4284: II's e. -**I. Memory** (70.0 s) +**II. Registers** (52.0 s), opening on I's last picture | | Form · text | Panes (rows) · shelf | Level | The step, and what plays | Text (characters) | Lands | Fires | Leaves | | --- | --- | --- | --- | --- | --- | --- | --- | --- | -| I1 | working frame · below; the camera at x2 on the state column | the dump of 128 bytes, sixteen a row, eight rows, no ink, the addresses faint, its header over them, `128 bytes at 7fffffffebc8` (mock 29) | | the rows fade in a row at a time (18 f each, 18 f apart: they come while the text is read) | A running program is bytes in memory: here are 128 of them. (59) | 78 | 138 | 380 | -| I2 | the same | the dump | | `regroup`: sixteen a row to eight, the return address (the dump's first word) walked, the other fifteen at a run (mock 37, [chart](#a-word-read)) | Eight bytes make a word, stored low byte first: the lowest byte is its last two digits. (87) | 416 | 476 | 965 | -| I3 | the same | the dump, sixteen words | | three words that hold addresses framed as read, one at a time, 30 f apart | Some words are addresses: they name a place in memory. (54) | 1000 | 1060 | 1285 | -| | | | | 1285 to 1476, into the column: the text leaves (12 f); the camera out to x1 (72 f, then 36 still); the dump folds to its tag on the shelf, `the 128 bytes` (its rows glide up into its header, the header becomes the tag, the tag slides to the shelf, 24 f each way: README, [column](README.md#column), "Mixing them"); the program column opens to the column's height for `segments` | | | | | -| I4 | column · beside | `segments` (treatment A, mock 34), the panes' column from 84 to 888: a slim bar the column's height, true scale | the bar's middle | the whole builds, deliberately ([chart](#the-address-space-enlarged)) | Its address space, 128 TiB, to scale: mapped only at each end. (62) | 1476 | 1536 | dims 1790 | -| I5 | column · beside | `segments` | the stack's box, at the top | `enlarge`: the stack's box rides out (78 f) and its names come, each band with its start and end addresses and its size; the libraries' box rides as the stack's lands | Enlarged, the top end: the stack, then the libraries, each file with its addresses and size. (92) | 1808 | 1868 | dims 2229 | -| I6 | column · beside | `segments` | the program's box, at the foot (the bubble's way down) | `enlarge`: the program's box, by segment (code, read-only data, data, the heap), its names | At the foot, the program: its code, its data, its heap. (55) | 2247 | 2307 | 2542, the three together | -| | | | | 2542 to 2661, back to the working frame: the texts leave together (12 f); `segments` keeps the program column, its height eased to the stage's (24 f, the drawing scaling as one); the dump unfolds from the shelf in the state column, at x1, the fold backwards (2578 to 2626) | | | | | -| I7 | working frame · below | `segments` in the program column; the dump in the state column | | the dump's place ([chart](#the-address-space-enlarged), mock 30): the `tie` bracket on its rows, the `link` over the top onto the stack's box, the band framed bright as it lands, and with it the dump's addresses taking the stack's ink | These 128 bytes are here, at the very top of the stack. (55) | 2661 | 2721 | 2949 | -| I8 | working frame · below | the same | | a camera `visit` at x2 to the dump's place, the stack's box and the dump's top rows framed together ([chart](#the-address-space-enlarged)): the move (72 f), the place marked `128 bytes` on the box, back (72 f) | Were the bar the Eiffel Tower, they would be an atom thick, at its top. (71) | 2985 | 3045 | 3370 | -| I9 | working frame · below | the same | | `ink` on the return address, walked: its digits, its bytes, its band and the band's row framed (an echo); the rest at a run, 2 f apart; the link and its bracket quiet to standing (24 f) | A word takes the ink of where it points: 401272 is list's code. (63) | 3405 | 3465 | 3729 | -| I10 | working frame · below | the same | | the words glide to their field's left (24 f) to give their chains room; three chains grow (`extend`), 36 f apart | Follow an address and you reach another word: a chain. → points to a word, ← holds a value. (91) | 3765 | 3825 | | +| | | | | 0 to 126, the seam: I's last picture (30 f); I10's text leaves (30 to 42); the title, `II Registers`, arrives (48 to 66), the label with it (54 to 66); still (66 to 126); mock 62 | | | | | +| | | | | 126 to 216, the opening: the dump's link and its bracket fade (18 f); its header comes back over its rows (12 f), the rows glide up into it (24 f), it becomes the tag, `the 128 bytes` (12 f, crossfading), and the tag rises to the shelf's height and slides along it to the shelf over the program column (24 f, `glide`), over the address space's labels, crossing none: the bytes wait there, folded, while the chapter's moments run, which come before I's (the bytes are I's); the title leaves (216 to 228) | | | | | +| II1 | working frame · below; `segments` in the program column as I left it, the 128 bytes on the shelf | the `registers` at their place, the state column's top (48), every register a row: sixteen here, rip's and the panel's frame to come (II2) | rax's row | the rows arrive top down, a row at a time, the name and then the chain, in the inks of I9 and followed as I10 follows a word (12 f each, 14 f apart: they come while the text is read) | The CPU keeps sixteen words of its own, named, not addressed: the registers. (76) | 252 | 312 | 618 | +| II2 | the same | rip's row, the flags at its end; `frame up`; the clock | rip's row | rip's row arrives (12 f), the gold plaque on its name; its value framed as read (6 f), then (18 f after) list's code band and its row of names framed in the program's box (`ink`'s echo, 6 f) and the `◂ rip` pin coming in at the row's end ([`segments`](README.md#segments), live; 12 f, rising 8); held 60 f; the frames go (18 f); `frame up` on the registers: the rule (12 f), the tag and its legend, the inks of I9 (12 f); the clock's rule and gold and its count (12 f, secondary) | And rip: where the CPU is, an address in list's code. (53) | 654 | 714 | 936 | +| II3 | the same | | the stack's box | rbp and rsp framed as read, 6 f apart; the stack's band and its row framed (18 f after); their `under` pin in the band, rbp's name left of the stub and rsp's right (12 f, rising 8); held 90 f, the frames go (18 f); then rax, rcx and rsi at a run, each framed with the heap's band (12 f, 2 f apart) (mock 58) | rsp and rbp point into the stack, rax, rcx and rsi into the heap. (65) | 972 | 1032 | 1296 | +| | | | | 1296 to 1384, into the code: the text leaves (12 f); `segments` fades with its pins (18 f, 1314 to 1332): what it said, the registers' inks carry from here; push's six rows round the pc arrive at the disassembly's place, the program column's foot (740 to 884), with no panel round them (III5's `frame up` gives the disassembly one), 12 f each, 2 f apart (1338 to 1360); the caption band is empty from here: the texts stand beside, on the left, over the code | | | | | +| II4 | working frame · beside, on the left | push's rows, `40115c mov edi, 0x10` the pc's, its line 11 gold | rip's row | the pc's mark comes to its row, plaque and wash (12 f); rip's value and the row's address framed as read together (an echo, 6 f), held 96 f, out (18 f) | rip holds this row's address: the next to run, in push(9). (58) | 1384 | 1444 | dims 1683 | +| II5 | the same | rdi's row opened into its [`parts`](README.md#reg), three rows under it (mock 59) | rdi's row | rdi framed as read (6 f: push's argument); `unpack` (54 f); still 24 f; `mov edi, 0x10` walked ([chart](#a-registers-parts)): fire; the operand `edi`, the part edi and its four bytes framed together (an echo); the byte that changes armed and struck, `09` to `10`, the row's annotation `rdi 0x10 16` with it; hold 36 f; advance, the cool; `pack` (36 f) | rdi holds push's argument, 9. Its low four bytes are edi, as eax are rax's. (75) | 1701 | 1761 | dims 2073 | +| II6 | the same | the call's row; rax's | rax's row | `call malloc@plt` stepped over ([chart](#a-call-stepped-over), mock 60): rdi framed with the argument hanging under the call; the call runs, unseen; rax armed and struck, `405050`, and the row's annotation with it, `malloc(16) = 405050`; then rcx, rsi, rdi in a wave; r11's word and PF, ZF held; hold, advance, the clock's gold for malloc's 162 moments with the advance | Arguments go in rdi, rsi…; the result comes back in rax. (56) | 2091 | 2151 | dims 2383 | +| II7 | the same | reverse's first six rows, after the fade through | rsp's row | a [`continue`](README.md#6-verbs) from `401166` to reverse's first instruction: fire (12 f); the wave, rcx, rbp, rsp, 2 f apart; rax's held word (`◂ 9`, written under it) and ZF take their corners; the disassembly fades through to reverse's rows (12 out, 12 in), the mark in on `push rbp`, rip's value with it; the clock's gold for the 13 moments | On, into reverse(): rsp and rbp move with the calls. (52) | 2401 | 2461 | dims 2678 | +| II8 | the same | the registers folded to eleven rows; the 128 bytes under them (mock 61) | the first folded row | [`fold`](README.md#6-verbs): the ten registers the video never changes glide into their cells, three to a row, under a rule, rip's row up with them (36 f, then the rule 12 f); then the 128 bytes come back: the tag slides along the shelf's height and down to its place under the registers (24 f), becomes the header (12 f), the rows glide down out of it (24 f) and the header goes (12 f): the words as I left them, with their three chains, each at the row III's stack will give it (rsp's at 480, four free rows over it) | Registers we will not follow fold, three to a row. We are back where the 128 bytes were read. (93) | 2696 | 2756 | III's seam | -The chapter's last picture: 2 s after the last step, and on until its text -is read, to 4199. +The chapter's last picture holds until its text is read, 3121: III's e. +Its registers panel is the scene's from here to the end, one set: rax, rcx, +rsi, rdi, rbp, rsp as rows (II changes all six), the ten others folded, +rip; eleven rows (48 to 344), as the `subject` split has them in IV. -**II. The stack** (42.5 s), opening on I's last picture +**III. The stack** (35.3 s), opening on II's last picture | | Form · text | Panes (rows) · shelf | Level | The step, and what plays | Text (characters) | Lands | Fires | Leaves | | --- | --- | --- | --- | --- | --- | --- | --- | --- | -| | | | | 0 to 96: I's last picture (30 f); the address space and the dump's link fade (18 f); the words glide into the stack panel's rows where it stands in the working frame (36 f, the bytes going first and the addresses travelling to the slots' column) and become it (12 f): sixteen words and four `free` over rsp. The window is held there through the chapter: the push and `sub rsp` fill the free words and only pins move, no row | | | | | -| II1 | working frame, text beside on the left (the program column, empty until II3) | the stack; its offsets, roles, spans and tag, and the registers, under the page until their beats | the stack's first row | the convention said where the panel first stands: the offsets come down the rows (`column`, 4 f apart), counting from rsp | Here lower addresses are drawn higher: down a word is up a row. (63) | 114 | 174 | 431 | -| II2 | the same | rbp's and rsp's rows, the registers' first two, arrive over the stack | rsp's row | the two rows (12 f); rsp's pin lands on the top word (12 f); rsp's link from its row down to the word, a link on the beat (README, [`link`](README.md#6-verbs)): rsp framed, the link (36 f), held 1 s, drawn back (18 f) | rsp holds the address of the top of the stack. (46) | 466 | 526 | 730 | -| II3 | the same; the scene's one `aim`, `drawn` | main's three rows in the program column, level with the lower stack (a descent's head, `main`; `40126d call 4011a0 reverse`; `401272 call 401200 clear`; `401277 xor eax, eax`): the first code on screen | the return address's row | the call first, as it happened, before the push: the word `401272 main+50` framed as read (6 f); main's rows (12 f each, 2 f apart); the `aim` from the word down the gutter's left lane to `401272`, the row after the call, head first at full ink (18 f), the address framed as the head lands (6 f) | A call pushes the address to come back to: here, main+50. (57) | 765 | 825 | 1068 | -| II4 | the same | reverse's first seven rows, the disassembly, under main's (its rules, tag and strip under the page until II5); rbp's pin | the free word over rsp | the aim falls to standing at 60% (18 f), the word's frame goes and main's rows go faint (18 f); reverse's rows (12 f) and rbp's pin (12 f); `push rbp` walked, its row fired by the pc's mark: the touch to the word, then rbp's value carried there from rbp's row (`carry` `after_touch`) and struck, though the word held that value; rsp's pin climbs onto it, `rsp -8`, and rsp is struck | A push moves rsp down a word and stores there: push rbp keeps the caller's rbp. (79) | 1104 | 1164 | 1500 | -| II5 | the same | the stack, its roles and spans; the disassembly's and the stack's rules and tags | the frame's span | the aim leaves (18 f); `mov rbp, rsp` walked (rbp's pin flies to rsp's row; the offsets now count from rbp), `sub rsp, 0x18` walked (rsp's pin climbs three rows, `rsp -0x18`, `3 words`); the roles (`column`: `cur`, `prev`, `saved rbp`, `the way back`, and the callers' below), the spans (`column`); `frame up` on the disassembly and the stack, the rules (12 f) then the tags and strips (12 f) | rbp marks the frame's base. A function's words are its frame: the saved rbp, its locals, the way back. (102) | 1536 | 1596 | dims 2088 | -| II6 | the same | the registers' other rows built over the stack, a row at a time, top down, then their rules and tag, its legend the inks of I (mock 31) | the registers' third row | the build, 12 f a row, 12 f apart | The registers are the other place values live: seventeen of them. (65) | 2106 | 2166 | | +| | | | | 0 to 126, the seam: II's last picture (30 f); its texts leave together (30 to 42); the title, `III The stack` (48 to 66); still (66 to 126) | | | | | +| | | | | 126 to 174, the opening: the words become the stack panel where they stand (II8 put them at its rows): the bytes fade (12 f), the addresses travel to the slots' address column and the words to its chains' (24 f), and the rows are the panel's (12 f): sixteen words and four `free` over rsp. The window is held there through the chapter: the push and `sub rsp` fill the free words and only pins move, no row. The stack stands under the registers' eleven rows, 356 to 868; the title leaves (203 to 215) | | | | | +| III1 | working frame, text beside on the left (the program column: reverse's six rows at its foot since II7, nothing else until III3) | the stack; its offsets, roles, spans and tag under the page until their beats | the stack's first row | the convention said where the panel first stands: the offsets come down the rows (`column`, 4 f apart), counting from rsp | Here lower addresses are drawn higher: down a word is up a row. (63) | 239 | 299 | 556 | +| III2 | the same | | rsp's row | rsp's pin lands on the top word (12 f); rsp's link from its row down to the word, a link on the beat (README, [`link`](README.md#6-verbs)): rsp framed, the link (36 f), held 1 s, drawn back (18 f). Its row was built in II: nothing arrives | rsp holds the address of the top of the stack. (46) | 591 | 651 | 855 | +| III3 | the same; the scene's one `aim`, `drawn` | main's three rows in the program column over reverse's (a descent's head, `main`; `40126d call 4011a0 reverse`; `401272 call 401200 clear`; `401277 xor eax, eax`), 604 to 700, level with the lower stack | the return address's row | the call first, as it happened, before the push: the word `401272 main+50` framed as read (6 f); main's rows (12 f each, 2 f apart); the `aim` from the word down the gutter's left lane to `401272`, the row after the call, head first at full ink (18 f), the address framed as the head lands (6 f) | A call pushes the address to come back to: here, main+50. (57) | 890 | 950 | 1193 | +| III4 | the same | reverse's six rows (the disassembly's panel 712 to 888, its rules, tag and strip under the page until III5); rbp's pin | the free word over rsp | the aim falls to standing at 60% (18 f), the word's frame goes and main's rows go faint (18 f); rbp's pin (12 f); `push rbp` walked, its row fired by the pc's mark: the touch to the word, then rbp's value carried there from rbp's row (`carry` `after_touch`) and struck, though the word held that value; rsp's pin climbs onto it, `rsp -8`, and rsp is struck | A push moves rsp down a word and stores there: push rbp keeps the caller's rbp. (79) | 1229 | 1289 | 1625 | +| III5 | the same | the stack, its roles and spans; the disassembly's and the stack's rules and tags | the frame's span | the aim leaves (18 f); `mov rbp, rsp` walked (rbp's pin flies to rsp's row; the offsets now count from rbp), `sub rsp, 0x18` walked (rsp's pin climbs three rows, `rsp -0x18`, `3 words`); the roles (`column`: `cur`, `prev`, `saved rbp`, `the way back`, and the callers' below), the spans (`column`); `frame up` on the disassembly and the stack, the rules (12 f) then the tags and strips (12 f) | rbp marks the frame's base. A function's words are its frame: the saved rbp, its locals, the way back. (102) | 1661 | 1721 | IV's seam | -The chapter's last picture, 2 s after its text is read, to 2552. +The chapter's last picture holds until its text is read, 2118: IV's e. (The +three videos' chapter II ended on a sixth beat, the registers built over +the finished stack, a row at a time; II builds them now, and III has its +beats as they were, 125 f later, less the arrival of rbp's and rsp's rows +in III2 and of reverse's rows in III4, both on screen since II.) -**III. Code and meaning** (44.8 s), opening on II's last picture +**IV. Code and meaning** (47.5 s), opening on III's last picture | | Form · text | Panes (rows) · shelf | Level | The step, and what plays | Text (characters) | Lands | Fires | Leaves | | --- | --- | --- | --- | --- | --- | --- | --- | --- | -| | | | | 0 to 96: II's last picture (30 f); its texts leave (12 f) and its code fades (18 f); its state column is veiled at 50% (18 f) and stays, veiled, until the decoded rows come to span it | | | | | -| III1 | working frame · above | the code's bytes as a dump row in code's ink, in the program column | | the row arrives (12 f), its sixteen bytes take code's ink 2 f apart, one instruction's four bytes framed | Code is bytes too: 48 8b 40 08 is one instruction. (50) | 96 | 216 | 374 | -| III2 | `aligned` · above | `aligned`, `interleaved`, across both columns (mock 32) | | `decode`, the instruction walked (60 f) as II's state column goes under it (12 f); its neighbours at half a run's pace (rows 4 f apart), each line heading its run, while the text is read; the panel's rules and tag (24 f) | Decoded: mov rax, [rax + 8], from line 21. Each line heads the instructions it compiled to. (91) | 409 | 469 | 834 | -| III2b | `aligned` · above | `aligned`, `columns` (mock 36) | | `align` to `columns` at two thirds of its pace (120 f), while the text is read | Two columns: each line by its first instruction. A square after ]: a byte it touches. (85) | 870 | 930 | 1274 | -| | | | | 1274 to 1435, into the working frame: the texts above leave (12 f); `stack`: the lines glide to the source panel's rows, the instructions to the disassembly's (60 f), those panels coming in under them as the aligned panel goes (12 f); `establish`: the clock, the registers, the stack and the ties, at III's moment | | | | | -| III3 | working frame · below | the program column, the state column at the load; the band | | the heap's dump in the band's right half (18 f), then the nodes drawn from it, rising (`establish`); rax framed as read and its link up to the node it points at, a link on the beat | Later, at line 21, rax points at a list node on the heap: its bytes, and drawn, the node. (89) | 1435 | 1555 | 1853 | -| III4 | working frame · below | the working frame of mock 9 | | each pane's minimap draws itself, last, top down (24 f each, 72 f apart, while the text is read). No camera: at x1.5 the nodes and their bytes would not both be in frame | This is the whole frame. Every view in it is these same bytes; each strip, the whole of its pane. (97) | 1888 | 1948 | 2328 | -| III5 | the map · below: the text lands before the move and stays under the map as under the frame | the map | | `surface` | And all of it at once: the map. (31) | 2364 | 2424 | | +| | | | | 0 to 126, the seam: III's last picture (30 f); its texts leave together (30 to 42); the title, `IV Code and meaning` (48 to 66); still (66 to 126) | | | | | +| | | | | 126 to 144, the opening: its code fades (18 f); its state column is veiled at 50% (18 f) and stays, veiled, until the decoded rows come to span it; the clock and its label stay, under the stage; the title leaves (224 to 236) | | | | | +| IV1 | working frame · above | the code's bytes as a dump row in code's ink, in the program column | | the row arrives (12 f), its sixteen bytes take code's ink 2 f apart, one instruction's four bytes framed | Code is bytes too: 48 8b 40 08 is one instruction. (50) | 260 | 380 | 538 | +| IV2 | `aligned` · above | `aligned`, `interleaved`, across both columns (mock 32) | | `decode`, the instruction walked (60 f) as III's state column goes under it (12 f); its neighbours at half a run's pace (rows 4 f apart), each line heading its run, while the text is read; the panel's rules and tag (24 f) | Decoded: mov rax, [rax + 8], from line 21. Each line heads the instructions it compiled to. (91) | 573 | 633 | 998 | +| IV2b | `aligned` · above | `aligned`, `columns` (mock 36) | | `align` to `columns` at two thirds of its pace (120 f), while the text is read | Two columns: each line by its first instruction. A square after ]: a byte it touches. (85) | 1034 | 1094 | 1438 | +| | | | | 1438 to 1599, into the working frame: the texts above leave (12 f); `stack`: the lines glide to the source panel's rows, the instructions to the disassembly's (60 f), those panels coming in under them as the aligned panel goes (12 f); `establish`: the registers, the stack and the ties, at IV's moment (the clock is on since II2) | | | | | +| IV3 | working frame · below | the program column, the state column at the load; the band | | the heap's dump in the band's right half (18 f), then the nodes drawn from it, rising (`establish`); rax framed as read and its link up to the node it points at, a link on the beat | Later, at line 21, rax points at a list node on the heap: its bytes, and drawn, the node. (89) | 1599 | 1719 | 2017 | +| IV4 | working frame · below | the working frame of mock 9 | | each pane's minimap draws itself, last, top down (24 f each, 72 f apart, while the text is read). No camera: at x1.5 the nodes and their bytes would not both be in frame | This is the whole frame. Every view in it is these same bytes; each strip, the whole of its pane. (97) | 2052 | 2112 | 2492 | +| IV5 | the map · below: the text lands before the move and stays under the map as under the frame | the map | | `surface` | And all of it at once: the map. (31) | 2528 | 2588 | | -The last picture, the map, 2 s after its text is read, to 2687. Together 157 s. +The last picture, the map, 2 s after its text is read, to 2851. Together +12374 f, 206 s; the video's chapter marks at its titles: 0:00 Memory, +1:12 Registers, 2:04 The stack, 2:39 Code and meaning. ## A scene in the column: `open` followed down |
