|
|
@@ -97,7 +97,7 @@ Current rung (measured today, normalised position):
|
|
|
|
|
|
| position | blocker |
|
|
|
|---|---|
|
|
|
-| **12901** | `procedure IBMCh(var Ch: Char)` — a `var` parameter, and its name shadows a global (`ERR 41`) |
|
|
|
+| **13052** | `'G', 'I', 'O', 'Q':' in `IBMCh` — a comma-separated CASE label list (`ERR 1`) |
|
|
|
|
|
|
Rungs behind it (now passed):
|
|
|
|
|
|
@@ -115,12 +115,13 @@ Rungs behind it (now passed):
|
|
|
| 10927 | `Read(Kbd, Ch)` — a READ with a leading file | `Kbd` + `ClrEol` |
|
|
|
| 12083 | `NormVideo`/`LowVideo`/`Delay` | attribute byte + busy loop; and the repeat-body parser bug fixed |
|
|
|
| 12672 | `KeyPressed` | `INT 21h AH=0B`, in Exec86 and bootcom too |
|
|
|
+| 12901 | `var` parameters | by reference + DupTest shadowing (`t73_varparam`) |
|
|
|
|
|
|
Rungs ahead:
|
|
|
|
|
|
| position | blocker |
|
|
|
|---|---|
|
|
|
-| 12901 | `var` parameters (implement by reference, do not record as value), plus parameter shadowing of globals; then the rest of `CALC.INC` |
|
|
|
+| 13052 | comma-separated CASE labels; then the rest of `CALC.INC` |
|
|
|
|
|
|
Corrections the measurements force, worth stating plainly because the stage list
|
|
|
below was written before them:
|
|
|
@@ -394,12 +395,12 @@ ladder order (each stage removes the blocker the previous one exposed).
|
|
|
|
|
|
### Session state — where to resume
|
|
|
|
|
|
-Last touched 2026-10-20. **Seventeen rungs are landed across two sessions**
|
|
|
+Last touched 2026-10-21. **Eighteen 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`, and `KeyPressed`). The ladder row has
|
|
|
-moved from the first typed constant at 7791 to **12901, inside `CALC.INC`'s
|
|
|
-`procedure IBMCh(var Ch: Char)`**.
|
|
|
+`Length`, the CRT identifiers, `Kbd`, `KeyPressed`, and `var` parameters).
|
|
|
+The ladder row has moved from the first typed constant at 7791 to **13052,
|
|
|
+inside `CALC.INC`'s `IBMCh` — its comma-separated CASE labels**.
|
|
|
|
|
|
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
|
|
|
@@ -423,10 +424,11 @@ Exec86):
|
|
|
| `14ce590` | `v-TP3-CALC-CRT` | `ERR 41 10927` (`Read(Kbd, Ch)`) |
|
|
|
| `4c165e1` | `v-TP3-CALC-KBD` | `ERR 102 12083` (`NormVideo`) |
|
|
|
| `89c6ca6` | `v-TP3-CALC-CRT2` | `ERR 41 12672` (`KeyPressed`) |
|
|
|
-| `033eb8e` | `v-TP3-CALC-KEYPRESSED` | **`ERR 41 12901`** (`IBMCh`'s `var` parameter) |
|
|
|
+| `033eb8e` | `v-TP3-CALC-KEYPRESSED` | `ERR 41 12901` (`IBMCh`'s `var` parameter) |
|
|
|
+| `5eb82c4` | `v-TP3-CALC-VARPARAM` | **`ERR 1 13052`** (comma-separated CASE labels) |
|
|
|
|
|
|
-- **Code HEAD** `033eb8e` (`v-TP3-CALC-KEYPRESSED`); this commit only updates
|
|
|
- this document. Nothing pushed; `origin/master` is behind by ten code
|
|
|
+- **Code HEAD** `5eb82c4` (`v-TP3-CALC-VARPARAM`); this commit only updates
|
|
|
+ this document. Nothing pushed; `origin/master` is behind by eleven 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`.
|
|
|
@@ -528,10 +530,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 **73/73**, CALC ladder **1/1** at
|
|
|
- `ERR 41 12901`, terminal config **4/4**, 64 `.COM` linked and **62 executed
|
|
|
+ **OVERALL: ALL PASS**, compile matrix **74/74**, CALC ladder **1/1** at
|
|
|
+ `ERR 1 13052`, terminal config **4/4**, 64 `.COM` linked and **63 executed
|
|
|
under both qemu and Exec86** (`t64_arrays` is compile-only: its image is past
|
|
|
- the 8 KB boot-sector read). `tests/nonvacuity.sh`: **92 ok, 0 failed**.
|
|
|
+ the 8 KB boot-sector read). `tests/nonvacuity.sh`: **94 ok, 0 failed**.
|
|
|
- **`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.
|
|
|
@@ -567,7 +569,7 @@ Exec86):
|
|
|
|
|
|
### Next session — the concrete plan
|
|
|
|
|
|
-The ladder is at `ERR 41 12901`, **`procedure IBMCh(var Ch: Char)`**. Everything
|
|
|
+The ladder is at `ERR 1 13052`, **`IBMCh`'s comma-separated CASE labels**. 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
|
|
|
@@ -597,14 +599,10 @@ commit.
|
|
|
first range's count. Constant indices and `.field` are already done.
|
|
|
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 — THE NEXT RUNG (12901).** Today `var` is
|
|
|
- parsed and then **silently recorded as a value parameter**, which is the §7
|
|
|
- failure mode and must be replaced, not extended. Push an address (a 2-byte
|
|
|
- slot) from the caller, load/store through `[BP+off]` in the callee, and fix
|
|
|
- `DupTest` in the same increment so an inner declaration may shadow an outer
|
|
|
- name (duplicates at the SAME level stay errors). Fixing `DupTest` alone
|
|
|
- would let CALC past `IBMCh` with a silent miscompile: `IBMCh(Ch)` must
|
|
|
- update the caller's `Ch`.
|
|
|
+6. **`var` parameters by reference — DONE** (`v-TP3-CALC-VARPARAM`). The slot
|
|
|
+ holds an address; loads and stores go through it; READ into one pushes the
|
|
|
+ pointer. `DupTest` now rejects only same-scope duplicates, so a parameter
|
|
|
+ may shadow a global. `t73_varparam` executes all the address paths.
|
|
|
7. **6-byte `real`** — literals, `+ - * /` and the six comparisons,
|
|
|
`and`/`or` on results, integer conversions, `Str`/`Val` with widths and
|
|
|
decimals, and `ln`/`exp`/`abs`/`sqrt`/`sqr`/`sin`/`cos`/`arctan`/`int`.
|
|
|
@@ -617,8 +615,10 @@ commit.
|
|
|
10. **Recursion, `forward`, nesting** — `Fact` (direct self-recursion) and
|
|
|
`Expression`/`Factor` (mutual via `forward`, the definition repeating only
|
|
|
the name).
|
|
|
-11. **The `case` labels** (`^E`, `^X, ^J`, `#27`, comma lists) once `case` over
|
|
|
- enumerators and chars is reached.
|
|
|
+11. **The `case` labels — THE NEXT RUNG (13052).** `case Ch of 'H': ...
|
|
|
+ 'G', 'I', 'O', 'Q': ... end`: the parser reads one label and then demands
|
|
|
+ `':'`, so a comma-separated list is `ENoSemi`. Char labels themselves
|
|
|
+ (`^E`, `#27`) already parse; the list is what `IBMCh` uses.
|
|
|
|
|
|
Then the two that are *outside* the ladder and gate the goal as stated:
|
|
|
|