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/03-syscall-write.svg | 293 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 293 insertions(+) create mode 100644 design/mock/03-syscall-write.svg (limited to 'design/mock/03-syscall-write.svg') diff --git a/design/mock/03-syscall-write.svg b/design/mock/03-syscall-write.svg new file mode 100644 index 0000000..140369e --- /dev/null +++ b/design/mock/03-syscall-write.svg @@ -0,0 +1,293 @@ + + + + +System calls +write(1, msg, 14) +kernel + +memory + +cpu + +source + + + + + + +hello.c + + +11 +write( +1 +, msg, +14 +); + +mov +eax, 1 +mov +edi, 1 +lea +rsi, [msg] +mov +edx, 14 + + +syscall +12 +return +0 +; + + + + +registers +x86-64 + + +0 +0 +0 +0 +5 +5 +d +4 +a +1 +c +0 +1 +1 +5 +c +rip + + +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +rax + + +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +rdi + + +0 +0 +0 +0 +5 +5 +d +4 +a +1 +c +0 +2 +0 +0 +4 +rsi + + +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +e +rdx +which call +1st +2nd +3rd +four registers, read by the kernel + + + + +memory +read-only data +a1c0 +2004 + +H +48 + +e +65 + +l +6c + +l +6c + +o +6f + +, +2c + + +20 + +w +77 +a1c0 +200c + +o +6f + +r +72 + +l +6c + +d +64 + +! +21 + +\n +0a + +00 + + + + +14 bytes, read by the kernel +user +kernel + + + +syscall + + + +the bytes +what it runs + + +tty_write + +vfs_write + +ksys_write +write +system call 1 + +rdi +fd +1 +the terminal + +rsi +buf +5 +5 +d +4 +a +1 +c +0 +2 +0 +0 +4 + +rdx +count +14 +bytes + +rax +returns +not yet +the terminal's buffer + + +H + + +e + + +l + + +l + + +o + + +, + + + + + +w + + +o + + + +9 of 14 copied +The program cannot reach the terminal. It leaves four numbers +in registers, and syscall hands them to the kernel. + -- cgit v1.3