|
|
@@ -97,7 +97,7 @@ Current rung (measured today, normalised position):
|
|
|
|
|
|
| position | blocker |
|
|
|
|---|---|
|
|
|
-| **15026** | `with Sheet[I,J] do` in `DisplayP` — a 2-D subscript and `with` (`ERR 102`) |
|
|
|
+| **15131** | `CellStatus := [Txt]` in `Init` — a SET assignment to a record field (`ERR 102`) |
|
|
|
|
|
|
Rungs behind it (now passed):
|
|
|
|
|
|
@@ -119,12 +119,13 @@ Rungs behind it (now passed):
|
|
|
| 13052 | comma-separated CASE labels | plus real CASE ranges (`t74_caselist`) |
|
|
|
| 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`) |
|
|
|
|
|
|
Rungs ahead:
|
|
|
|
|
|
| position | blocker |
|
|
|
|---|---|
|
|
|
-| 15026 | 2-D subscripts (`Sheet[I,J]`, row stride) and `with`; then the rest of `CALC.INC` |
|
|
|
+| 15131 | set/string assignment to a record field; then the rest of `CALC.INC` |
|
|
|
|
|
|
Corrections the measurements force, worth stating plainly because the stage list
|
|
|
below was written before them:
|
|
|
@@ -398,13 +399,14 @@ ladder order (each stage removes the blocker the previous one exposed).
|
|
|
|
|
|
### Session state — where to resume
|
|
|
|
|
|
-Last touched 2026-10-21. **Twenty-one rungs are landed across three sessions**
|
|
|
+Last touched 2026-10-21. **Twenty-two 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, and write field widths). The ladder row has
|
|
|
-moved from the first typed constant at 7791 to **15026, inside `CALC.INC`'s
|
|
|
-`DisplayP` — `with Sheet[I,J] do`, the 2-D subscript and `with`**.
|
|
|
+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**.
|
|
|
|
|
|
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
|
|
|
@@ -432,10 +434,11 @@ Exec86):
|
|
|
| `5eb82c4` | `v-TP3-CALC-VARPARAM` | `ERR 1 13052` (comma-separated CASE labels) |
|
|
|
| `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`) |
|
|
|
+| `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) |
|
|
|
|
|
|
-- **Code HEAD** `099f8fd` (`v-TP3-CALC-WIDTH`); this commit only updates
|
|
|
- this document. Nothing pushed; `origin/master` is behind by fourteen code
|
|
|
+- **Code HEAD** `a559843` (`v-TP3-CALC-WITH`); this commit only updates
|
|
|
+ this document. Nothing pushed; `origin/master` is behind by fifteen 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`.
|
|
|
@@ -537,11 +540,11 @@ 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 **77/77**, CALC ladder **1/1** at
|
|
|
- `ERR 102 15026`, terminal config **4/4**, 64 `.COM` linked and **66 executed
|
|
|
+ **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
|
|
|
under both qemu and Exec86** (`t64_arrays` is compile-only: its image is past
|
|
|
- the 8 KB boot-sector read). `tests/nonvacuity.sh`: **97 ok, 0 failed**.
|
|
|
- The runtime is now 878 bytes (wrintw added; the golden was re-blessed).
|
|
|
+ the 8 KB boot-sector read). `tests/nonvacuity.sh`: **99 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
|
|
|
the default `run_all.sh` and must be run **manually** after touching any check.
|
|
|
@@ -577,8 +580,8 @@ Exec86):
|
|
|
|
|
|
### Next session — the concrete plan
|
|
|
|
|
|
-The ladder is at `ERR 102 15026`, **`with Sheet[I,J] do` — a 2-D
|
|
|
-subscript and `with`**. Everything
|
|
|
+The ladder is at `ERR 102 15131`, **`CellStatus := [Txt]` — a set
|
|
|
+assignment to a record field**. 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
|
|
|
@@ -603,14 +606,12 @@ commit.
|
|
|
`IoResult`; `read`/`write` with a leading file argument). Runtime entries
|
|
|
doing `INT 21h` open/create/read/write/close, text-mode newline and `^Z`.
|
|
|
The file *types* and variables are already in place (`FileVarSize`).
|
|
|
-4. **Array subscripts — DONE, 1-D; THE NEXT RUNG is 2-D + `with` (15026).**
|
|
|
- A run-time index is `(i - lo) * elemsize` from the base, with the element's
|
|
|
- address in DI; one and two bytes are loaded/stored. **Still open:**
|
|
|
- `Sheet[I,J]` needs the row stride `(hi1 - lo1 + 1) * elem` accumulated
|
|
|
- across dimensions, and `with Sheet[I,J] do` needs the ELEMENT's record
|
|
|
- field table to follow the DI-addressed element (today `.field` uses the
|
|
|
- array symbol's table). Both are the same "element type travels with the
|
|
|
- expression" change.
|
|
|
+4. **Array subscripts and `with` — DONE** (`v-TP3-CALC-ARRVAR`,
|
|
|
+ `v-TP3-CALC-WITH`): n-dimensional subscripts use per-dimension strides
|
|
|
+ (the last varies fastest), the element's address rides in DI, and `with`
|
|
|
+ resolves fields against a scope stack, parking a DI base in a data slot.
|
|
|
+ Constant-index elements stay symbol+offset. Field reads/writes one or two
|
|
|
+ bytes wide work; wider fields are the next item.
|
|
|
5. **Pointers and the heap** (`^T`, `New`, `Dispose`, `Buffer^[i]`), 4-byte
|
|
|
(offset then segment); the heap must hold `Pages` (16,281 bytes).
|
|
|
6. **`var` parameters by reference — DONE** (`v-TP3-CALC-VARPARAM`). The slot
|
|
|
@@ -646,6 +647,14 @@ 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.
|
|
|
+
|
|
|
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,
|
|
|
and CALC's measured `.COM` is **27,901 bytes**. Without this, "executable
|