From af2d2cfdcdf5976f06fbcc4b1f8507f0b7d4af89 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 10 Nov 2026 12:01:16 -0300 Subject: design: the visual system canim follows, with eight mock frames Lapis page and vellum ink; a role is a form as well as a colour (current, write, read, pointer, allocated, freed, fault, kernel); panels as acme windows; Go Mono for the machine and Go for the narrator; motion as whole frames at 60 fps. design/mock/gen.py redraws the mocks from the tokens. --- design/mock/05-memory-write.svg | 401 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 401 insertions(+) create mode 100644 design/mock/05-memory-write.svg (limited to 'design/mock/05-memory-write.svg') diff --git a/design/mock/05-memory-write.svg b/design/mock/05-memory-write.svg new file mode 100644 index 0000000..2d0d264 --- /dev/null +++ b/design/mock/05-memory-write.svg @@ -0,0 +1,401 @@ + + + +Where a pointer lives +hello.c:8 +kernel + +memory + +cpu + +source + + + + + + +hello.c + +7 +char +buf[ +16 +] = +"Hello, world!\n" +; + + +8 +char +*p = buf; + +lea +rax, [rbp-0x20] + + +mov +[rbp-0x8], rax +9 +write( +1 +, p, +14 +); +10 +return +0 +; + + + + +registers +x86-64 + + +0 +0 +0 +0 +5 +5 +d +4 +a +1 +c +0 +1 +1 +6 +d +rip + + +0 +0 +0 +0 +7 +f +f +d +3 +a +2 +c +1 +e +4 +0 +rax +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +rdi +0 +0 +0 +0 +7 +f +f +d +3 +a +2 +c +1 +e +3 +0 +rsp +0 +0 +0 +0 +7 +f +f +d +3 +a +2 +c +1 +e +6 +0 +rbp + + + + +stack +from 7ffd 3a2c 1e30 · low addresses on top ++0 ++1 ++2 ++3 ++4 ++5 ++6 ++7 +as text + +main + +3a2c +1e30 + + + + + + + + + + + + + + + + +3a2c +1e38 + + + + + + + + + + + + + + + + +3a2c +1e40 + +48 + +65 + +6c + +6c + +6f + +2c + +20 + +77 +H +e +l +l +o +, + +w +buf +3a2c +1e48 + +6f + +72 + +6c + +64 + +21 + +0a + +00 + +00 +o +r +l +d +! +· +· +· +3a2c +1e50 + +00 + +3f + +9a + +c1 + +77 + +d2 + +8e + +5b +· +? +· +· +w +· +· +[ +canary +3a2c +1e58 + +40 + +1e + +2c + +3a + +fd + +7f + +00 + +00 +@ +· +, +: +· +· +· +· +p +3a2c +1e60 + +00 + +1f + +2c + +3a + +fd + +7f + +00 + +00 +· +· +, +: +· +· +· +· +saved rbp +3a2c +1e68 + +90 + +9d + +22 + +5e + +3c + +7f + +00 + +00 +· +· +" +^ +< +· +· +· +return to + + +__libc_start_call_main + + + + + + +rsp + + + +rbp + + + +the same eight bytes, low byte first, as one number + +0 +0 +0 +0 +7 +f +f +d +3 +a +2 +c +1 +e +4 +0 + += where +buf +starts +The pointer p is eight ordinary bytes on the stack. +Read as one number, they are the address of buf. + -- cgit v1.3