Bladeren bron

docs: record the set-field rung (ladder 15201)

CALC-COMPILE.md: the rung table gains v-TP3-CALC-SETFIELD (21ef4e1,
ERR 102 15201), the session state says twenty-three rungs, the baseline
is the run just made (79/79 compile, 68/68 executed under both oracles,
non-vacuity 101/101), and the next item is the string field assignment
through DI (sets are done).

SUMMARY.md: the intro now stops at ERR 102 15201 and lists set-field
assignment among the landed features.
Eric Streit 2 dagen geleden
bovenliggende
commit
317be3de16
2 gewijzigde bestanden met toevoegingen van 30 en 27 verwijderingen
  1. 24 22
      CALC-COMPILE.md
  2. 6 5
      SUMMARY.md

+ 24 - 22
CALC-COMPILE.md

@@ -97,7 +97,7 @@ Current rung (measured today, normalised position):
 
 | position | blocker |
 |---|---|
-| **15131** | `CellStatus := [Txt]` in `Init` — a SET assignment to a record field (`ERR 102`) |
+| **15201** | `Contents := ''` in `Init` — a STRING assignment to a record field through DI (`ERR 102`) |
 
 Rungs behind it (now passed):
 
@@ -120,12 +120,13 @@ Rungs behind it (now passed):
 | 14195 | variable array subscripts | scaled addressing, 1 byte or 2 (`t75_arrvar`) |
 | 14330 | write field widths | `wrintw`, runtime 770 -> 878 (`t76_width`) |
 | 15026 | WITH + n-D subscripts | row strides, fields via DI (`t77_with`) |
+| 15131 | set field assignment | typed by the target; run-time `in` (`t78_setfield`) |
 
 Rungs ahead:
 
 | position | blocker |
 |---|---|
-| 15131 | set/string assignment to a record field; then the rest of `CALC.INC` |
+| 15201 | string assignment to a record field through DI; then the rest of `CALC.INC` |
 
 Corrections the measurements force, worth stating plainly because the stage list
 below was written before them:
@@ -399,14 +400,14 @@ ladder order (each stage removes the blocker the previous one exposed).
 
 ### Session state — where to resume
 
-Last touched 2026-10-21. **Twenty-two rungs are landed across three sessions**
+Last touched 2026-10-21. **Twenty-three rungs are landed across three sessions**
 (Stages 1-4, sets, enums, record types, array declarations, element/field
 access, file types, the calling convention and string value parameters,
 `Length`, the CRT identifiers, `Kbd`, `KeyPressed`, `var` parameters, the CASE
-labels, variable array subscripts, write field widths, and WITH with
-n-dimensional subscripts).  The ladder row has moved from the first typed
-constant at 7791 to **15131, inside `CALC.INC`'s `Init` — `CellStatus :=
-[Txt]`, a set assignment to a record field**.
+labels, variable array subscripts, write field widths, WITH with
+n-dimensional subscripts, and set-field assignment).  The ladder row has moved
+from the first typed constant at 7791 to **15201, inside `CALC.INC`'s `Init` —
+`Contents := ''`, a string assignment to a record field through DI**.
 
 The rung commits and their tags, in order (each is one rung with its own
 fixture, red proof, and — where the harness allows — execution under qemu and
@@ -435,10 +436,11 @@ Exec86):
 | `8a265e7` | `v-TP3-CALC-CASELIST` | `ERR 102 14195` (variable array subscript) |
 | `b41c669` | `v-TP3-CALC-ARRVAR` | `ERR 1 14330` (write field width) |
 | `099f8fd` | `v-TP3-CALC-WIDTH` | `ERR 102 15026` (2-D subscript + `with`) |
-| `a559843` | `v-TP3-CALC-WITH` | **`ERR 102 15131`** (set assignment to a field) |
+| `a559843` | `v-TP3-CALC-WITH` | `ERR 102 15131` (set assignment to a field) |
+| `21ef4e1` | `v-TP3-CALC-SETFIELD` | **`ERR 102 15201`** (string field through DI) |
 
-- **Code HEAD** `a559843` (`v-TP3-CALC-WITH`); this commit only updates
-  this document.  Nothing pushed; `origin/master` is behind by fifteen code
+- **Code HEAD** `21ef4e1` (`v-TP3-CALC-SETFIELD`); this commit only updates
+  this document.  Nothing pushed; `origin/master` is behind by sixteen code
   commits.  Two non-ladder commits in the same period are the terminal-config
   work (`v-TP3-TERMCFG`) and the editor key map (`v-TP3-EDITORKEYS`); they do
   not move the ladder and are documented in `TERMINAL.md`.
@@ -540,10 +542,10 @@ Exec86):
   byte-for-byte the same for INTEGER locals, so the compile matrix would have
   been green and only `t40_readln` (and later CALC) would have noticed.
 - **Verified baseline, run on the code HEAD above:** `./tests/run_all.sh` →
-  **OVERALL: ALL PASS**, compile matrix **78/78**, CALC ladder **1/1** at
-  `ERR 102 15131`, terminal config **4/4**, 64 `.COM` linked and **67 executed
+  **OVERALL: ALL PASS**, compile matrix **79/79**, CALC ladder **1/1** at
+  `ERR 102 15201`, terminal config **4/4**, 64 `.COM` linked and **68 executed
   under both qemu and Exec86** (`t64_arrays` is compile-only: its image is past
-  the 8 KB boot-sector read).  `tests/nonvacuity.sh`: **99 ok, 0 failed**.
+  the 8 KB boot-sector read).  `tests/nonvacuity.sh`: **101 ok, 0 failed**.
   The runtime is 878 bytes (wrintw added; the golden was re-blessed).
 - **`tests/nonvacuity.sh`:** re-run after this commit's cases (the set
   membership bit among them); see the commit message for the count. It is not in
@@ -580,8 +582,8 @@ Exec86):
 
 ### Next session — the concrete plan
 
-The ladder is at `ERR 102 15131`, **`CellStatus := [Txt]` — a set
-assignment to a record field**.  Everything
+The ladder is at `ERR 102 15201`, **`Contents := ''` — a string
+assignment to a record field through DI**.  Everything
 below is ordered by what the ladder will hit next, not by the original stage
 numbers (the measurements have reordered them repeatedly).  Each item is the
 same shape as the rungs already landed: one focused change, one fixture that is
@@ -647,13 +649,13 @@ Then the two that are *outside* the ladder and gate the goal as stated:
     `Value:FW:DEC`, which waits for real support) and widths on
     CHAR/BOOLEAN/STRING, which are loud today.
 
-15. **SET and STRING assignments to a record field — THE NEXT RUNG (15131).**
-    `CellStatus := [Txt]` is the first: the target is `set of Attributes`
-    (one byte), so the RHS set constructor must take its base/size from the
-    TARGET rather than defaulting to 32-byte `set of Char`, and the store
-    must go through DI.  `Contents := ''`/`Contents := S` follows on the same
-    addressing with a counted-string copy (or a runtime entry taking a DI
-    destination).  Both are loud today.
+15. **Record-field writes — SET is DONE, STRING is THE NEXT RUNG (15201).**
+    Set constructors now take base/size from the target and store through DI
+    (`v-TP3-CALC-SETFIELD`), and `in` tests a field's byte at run time.
+    `Contents := ''` (and later `Contents := S`) needs a counted-string copy
+    to a DI address: the literal path can store <len><chars> directly; a
+    string variable source can push DI as strstore's destination.  The field
+    is 71 bytes, so the copy truncates at 70 characters.
 
 14. **Raise the execution harness's read.**  `tests/exec/bootcom.s` reads 16
     sectors (8192 bytes); `t64_arrays` is already compile-only for that reason,

+ 6 - 5
SUMMARY.md

@@ -2037,9 +2037,9 @@ census of what `CALC.PAS` actually needs and the reference measurements from
 the original `TURBO.COM`. Two tracks run in parallel: the ladder (front-end,
 verifiable on small fixtures) and the layout (§3, the only thing that stops
 the compiler *emitting* a 16,560-byte program). The ratchet and front-end
-features through **WITH and n-dimensional subscripts** are landed: the ladder
+features through **set-field assignment** are landed: the ladder
 (`tests/calc_ladder.sh` + `tests/fixtures/calc_ladder.tsv`, run by `run_all.sh`;
-CALC.PAS now stops at `ERR 102` at pos 15131, `CellStatus := [Txt]` in `Init`), the `{$I}` include,
+CALC.PAS now stops at `ERR 102` at pos 15201, `Contents := ''` in `Init`), the `{$I}` include,
 `^X`/`#nn`, scalar typed constants, sets, enums, records (CellRec = 80),
 subranges, arrays, element/field access, file types, string value parameters,
 `Length`, the CRT identifiers (`ClrScr`/`GotoXY`/`ClrEol`/`LowVideo`/
@@ -2047,9 +2047,10 @@ subranges, arrays, element/field access, file types, string value parameters,
 (by reference; `t73_varparam`), comma-separated CASE labels and real CASE
 ranges (`t74_caselist`), variable array subscripts scaled by the element size
 (`t75_arrvar`), write field widths (`t76_width`, runtime entry 20 `wrintw`),
-WITH and n-dimensional subscripts (`t77_with`), and `INT 10h`+`C6` in Exec86
-(fixtures through `t77_with`). The next rung is the set/string assignment to
-a record field; then the remaining string
+WITH and n-dimensional subscripts (`t77_with`), set-field assignment and
+run-time `in` (`t78_setfield`), and `INT 10h`+`C6` in Exec86 (fixtures through
+`t78_setfield`). The next rung is the string assignment to a record field;
+then the remaining string
 builtins, file operations, variable-index subscripts + `with`, pointers, `var`
 params, reals, recursion, and the layout change. Items 1-4 below are
 independent of both.