summaryrefslogtreecommitdiff
path: root/design/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'design/README.md')
-rw-r--r--design/README.md95
1 files changed, 59 insertions, 36 deletions
diff --git a/design/README.md b/design/README.md
index ffbb820..f9bdf35 100644
--- a/design/README.md
+++ b/design/README.md
@@ -1321,45 +1321,68 @@ What stays, and why:
### segments
-The process's address space, which is where the inks come from: a panel
-of its mappings as the recording has them, low addresses on top, a row
-each. A bar 8 wide in the mapping's ink, its first address, its file or
-name (`list`, `heap`, `libc.so.6`, `[vdso]`, `[stack]`), what it is (code,
-read-only data, data, malloc's, the stack: from its permissions), its
-size ranged right (`4 KiB`, `1.5 MiB`). Rows, not a scale: the code and
-the stack are 127 TiB apart, and a hole between mappings is one row, a
-faint zig-zag and its size (`nothing mapped · 127 TiB`). When a word takes
-its ink, the mapping it points into is framed as read with it (an
-`echo`). It is the legend's long form: the registers' tag carries its
-inks in short; the title card's legend and the map's key draw this panel.
-It is not the far view (mock 8), which is time over pages; the far view
-can stand on it as its axis. Mock 30.
+The address space, the textbook's picture: one tall rectangle, high
+addresses on top (the stack at the top growing down, the heap growing up),
+the mapped parts as bands in their inks (55% toward the page), the holes
+between them broken. It is where the inks come from.
+
+| Part | Drawn |
+| --- | --- |
+| the rectangle | 140 wide; `ffffffffffffffff` over it and `0` under it, faint |
+| a band | a mapping: its ink as fill, a 2-unit page line at its top so a file's mappings read as parts of one thing; 24 high at least and 4 more a doubling past 4 KiB (1.5 MiB is 58): schematic, by the logarithm of its size, and its title says `not to scale` |
+| a hole | what is not mapped: a fixed 40, two zig-zags across it, its size beside it (`nothing mapped · 127 TiB`; `15 EiB` above the stack) |
+| its labels | outside, so the bands stay clean: on the left the band's first address in its ink, at the band's foot; on the right, after a 2-unit leader, its permissions in its ink, what it is (code, read-only, data, data (anonymous), `[stack]`, `[heap]`, `[vdso]`), its size |
+| a file's parts | a bracket right of the labels spanning its bands, the file's name beside it (`libc.so.6`: r--, r-x, r--, r--, rw-) |
+| growth | a 2-unit `bright` arrow in the stack's band pointing down, in the heap's pointing up |
+| live | rsp's and rip's pins at their place in their bands; a band framed as read (3 units) when a word is inked into it; the heap's top glides when `brk` grows it (12 f); a new mapping fades into its hole (12 f), the hole closing round it |
+
+**Orientation.** High addresses on top, against every panel of the
+language, which keeps low addresses on top. The rectangle is the whole
+space at once, read as the textbook draws it, as the user asked; the
+panels are rows of memory read like text. The introduction says it once,
+in the beat that sets the stack panel beside the rectangle: the stack
+grows down the rectangle and up its panel, the same pushes; the growth
+arrows carry it.
+
+**Where it lives.** The introduction (mock 30), the map's key, the title
+card's legend. In the working frame it has no standing place (the
+registers' tag carries its inks in short); a scene about memory layout can
+take it as its drawing (`brk`, `mmap`), its view the mappings as rows.
+Mocks 30 and 34.
### aligned
-The source and the disassembly side by side, a table in address order:
-each source line level with the first row of its instructions, a quiet
-bracket by the gutter from the line down its run's last row. A line whose
-code comes in several runs (a `for`'s test and step, a `while` tested
-before and after its body, code the compiler moved) is drawn at its first
-run and repeated faint at each other; a line with no code of its own is
-not drawn, and the gap in the numbers says so (the scene's caption may);
-instructions of no line (padding, another function without source) have
-the function's name beside them, faint. The pc's row and its line are one
-band across both columns and the gutter: the alignment is the thread, so
-no thread is drawn. A call followed down puts the callee's lines beside
-the callee's rows, under the caller's waiting call (the `descent`, both
-columns at once).
+The source with the instructions it compiled to, as one panel and one
+listing, as `objdump -S` prints it: each run of a line's instructions is a
+group, its head a row with the line on `raised` paper, its rows under it,
+indented one step under the line's text. Lines and addresses share one
+column, the place column (ranged right at 196: `21` over `1001926`): both
+say where. A 2-unit `rule` across over every head marks where a line's
+group starts and ends; nothing alternates.
+
+- A group of one row: its head and one row; of many: its head and all of
+ them, never folded in the working frame.
+- A line's second run (a `for`'s step, a `while` tested again after its
+ body): its head again, on the page, faint, `again: its second run`.
+- Rows of no line (padding, another function without source): a faint head
+ with the function's name, `_init · no line`.
+- A line with no code of its own has no group; the gap in the numbers says
+ so.
+- The pc's row has the wash and the plaque, its line's number the gold
+ plaque in its head. The grouping is the thread.
+
+It replaces the side-by-side rows first drawn: the user asked for one
+panel, the two closer, a line's start and end unmistakable, and the line
+number and the address in one column, and the interleaved listing gives
+all four while keeping what was liked, each instruction level with its
+line, right under it. A `pair` puts the source in the middle and each
+build's rows aligned to it on its side.
-It is a split a scene chooses, and the default nowhere: the program
-column becomes the source (left, 880) and the state column the
-disassembly (right, 880), the band and the registers and stack giving way
-for as long as it lasts. Across the gutter is "the same thing one level
-down", as in the band; down is still deeper in each column. Reach for it
-to teach what a line compiles to, in the introduction, and in a pair (the
-source in the middle, 586 wide, each build's rows aligned to it on its
-side). The two columns scroll as one. `align` and `stack` change between
-it and the stacked form. Mocks 32 and 33.
+A split a scene chooses, the default nowhere: the panel spans both columns
+(1792), the band and the state giving way while it lasts. Reach for it to
+teach what a line compiles to, in the introduction, and in a pair. `align`
+and `stack` change between it and the stacked form; it scrolls as one.
+Mocks 32 and 33.
### pair
@@ -1542,7 +1565,7 @@ Frames at 60 a second. `s` is the frame a strike lands. Curves:
| `column` | rows gaining a column (offsets, roles, pins, lines) | the rows make room (18 f, as rows do), then the column's values fade in top down, 2 f apart, 12 f each |
| `frame up` | a panel arriving round rows already built | its rule draws round them (12 f), then its tag fades in (12 f): the last thing, never the first |
| `decode` | an instruction's bytes becoming its row | the bytes of one instruction gather (12 f), the mnemonic and operands fade in beside them (12 f), and the bytes dim; the row then travels to its place (`glide`, 24 f) |
-| `align` | the stacked program column to `aligned`, and back (`stack`) | the band and the state column fade out (12 f); the disassembly glides from under the source to beside it (36 f, `glide`); then the source's lines glide apart to their instructions' rows (24 f, rows making room) and the run brackets fade in (12 f). `stack` is the reverse |
+| `align` | the stacked program column to `aligned`, and back (`stack`) | the band and the state column fade out (12 f); the panel widens to both columns (24 f, `glide`); the source's lines glide to their heads and the instructions glide in under them (36 f, rows making room), each instruction from its row in the disassembly to its row under its line; the heads' paper and rules fade in last (12 f). `stack` is the reverse |
| `arc` | a pointer to a row of its panel | written: with the arm (s−12) the old arc goes dashed; from s+6 it fades (12 f) while the new one draws from the pointer's row along its lane to the target, head first, 12 f, `standard`, at full ink; with the cool at the advance it quiets to standing (24 f). Read: to full ink with the read (6 f), back with the advance. Overwritten with a target off the panel or NULL: it fades from s+6 (12 f). A lane change glides 12 f. Scrolled: it rides its rows, fading as its target leaves. At a run 8 f, at a sprint none |
| `advance` | the current marks | last. The thread, the plaques and rip move together: 12 f to an adjacent row, 24 f up to eight rows, `standard`; farther, out and in over 6 f. A taken jump's line draws in the jump lane with it |
| `cascade` | a step | `fire` (12); then its effects a level at a time, 18 f apart: CPU (`reg`s, the pc's annotation), memory (`slot`s, `bytes`), the idea (the drawing, by `project`); each armed, then struck; hold 36 f after the last strike and 12 f a further value, 84 at most; `advance`; rest 24 f. A level with nothing on screen to change gives up its slot |