diff options
| -rw-r--r-- | README.md | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -90,6 +90,37 @@ Everything is a `b.option`, so `zig build -h` lists them all. | `-Dpardes=<bool>` | `false` | build the pardes editor as the application. Needs the object below | | `-Dpardes-obj=<path>` | `../02-pardes-code/zig-out/pardes-p4.o` | the editor, compiled freestanding by its own build and linked here | +### Driving the editor over the wire + +`zig build interact -Dpardes` boots the editor with **one empty output buffer** and no shell pane — +a shell is not a layout preference on bare metal but an impossibility, since there is nothing to +fork and no pty to give a terminal pane. Booting one anyway produced exactly that: a pane with no +gutter, no buffer, and every keystroke vanishing into the Fallback's silent pty. + +Three words exist only here, because with no OS there is no MMU and no supervisor, so all 2^32 +addresses are legitimately this program's (`../02-pardes-code/src/board_memory.zig`): + +| word | does | +|---|---| +| `Peek <addr> [count]` | `count` 32-bit words, one `addr: value` row each | +| `Poke <addr> <value>` | one 32-bit store, then a load back — the read-back is the point, since MMIO rarely returns what you wrote | +| `Hexdump <addr> [len]` | `len` bytes, 16 to a row, hex columns and an ASCII gutter | + +There is no mouse on a serial line, so execution is the keyboard chord: write the command into the +buffer, select it, execute the selection (`pardes.zig:7669`). + +``` +i Peek 0x501101a4 ESC type it into the buffer, then back to normal mode +x select the line +TAB execute the selection; `o` opens a fresh line for the next one +``` + +Measured on ESP32-P4 rev v1.3 silicon: two `Peek`s of the RNG register at `0x501101a4` returned +`0x0e63ce71` then `0xaeaa6919`, so the `*allowzero volatile` reads are genuinely not folded; +`Poke 0x5011002c 0xdeadbeef` into `LP_STORE0` read back as `0xdeadbeef` from a later `Peek`; and +`Peek 0x50110001` answered `peek: MisalignedAddress` on the message row rather than taking the +session down with an unhandled trap, which is the one fault that file exists to prevent. + ## Layout ``` |
