From beb2616a243e01826c3103209d5525381a5da73d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 11 Nov 2026 11:27:09 -0300 Subject: design: an introduction that builds the views; segments; source and disassembly aligned From the user. Three short chapters teach the frame by assembling it: bytes become words, words that are addresses take the ink of the mapping they point into, the stack's conventions are shown on those same rows by a real push and call, an instruction's bytes decode into its row beside its source line, and the working frame stands at the end. segments is the process's mappings as rows, the legend's long form. aligned is a split a scene chooses: each source line level with the first row of its instructions. Verbs for building a view: regroup, ink, column, frame up, decode, align. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa --- design/mock/32-intro-code.svg | 155 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 design/mock/32-intro-code.svg (limited to 'design/mock/32-intro-code.svg') diff --git a/design/mock/32-intro-code.svg b/design/mock/32-intro-code.svg new file mode 100644 index 0000000..35597b8 --- /dev/null +++ b/design/mock/32-intro-code.svg @@ -0,0 +1,155 @@ + + + + + + +list.c +each line beside the first of its instructions + + + +disassembly +reverse + + + + + + + + + + + + + + + +20 +while +( +head +) +{ +10019 +10 +48 85 ff +test +rdi, rdi +10019 +13 +74 20 +je +1001935 +10019 +15 +55 +push +rbp +10019 +16 +48 89 e5 +mov +rbp, rsp +10019 +19 +31 c0 +xor +eax, eax +10019 +1b +0f 1f 44 00 00 +nop +[rax + rax] +10019 +20 +48 89 c1 +mov +rcx, rax +10019 +23 +48 89 f8 +mov +rax, rdi + + + + + + +21 +struct +node +* +next += +head +- +> +next +; +10019 +26 +48 8b 7f 08 +mov +rdi, [rdi + 8] +1004098 + + +1004070 + + +9 +22 +head +- +> +next += +prev +; +10019 +2a +48 89 48 08 +mov +[rax + 8], rcx +20 +while (head) { +10019 +2e +48 85 ff +test +rdi, rdi +10019 +31 +75 ed +jne +1001920 +10019 +33 +5d +pop +rbp +26 +return +prev +; +10019 +34 +c3 +ret + +10019 +35 +31 c0 +xor +eax, eax +10019 +37 +c3 +ret + +48 8b 7f 08 is one instruction: mov rdi, [rdi + 8], line 21's +head->next. The line sits level with its code: they are one row. + -- cgit v1.3