|
|
@@ -95,7 +95,7 @@ Current rung (measured today, normalised position):
|
|
|
|
|
|
| position | blocker |
|
|
|
|---|---|
|
|
|
-| **9202** | `MCFile : file of CellRec` — a **file** type (`ParseType` `TkFile`, `ERR 102`) |
|
|
|
+| **10350** | `procedure Center(S : AnyString)` — a **string value parameter**, INSIDE `CALC.INC` |
|
|
|
|
|
|
Rungs behind it (now passed):
|
|
|
|
|
|
@@ -107,12 +107,13 @@ Rungs behind it (now passed):
|
|
|
| 8098 | `Attributes = (Constant,…)` — enum; and `SetOfAttri = Set of Attributes` | Stage 5 (enums) |
|
|
|
| 8362 | `CellRec = record … end` — record type | Stage 7 (record types) |
|
|
|
| 8705 | `Cells = array['A'..'G',1..FYMax]`, `Sheet : Cells`, `XPOS : array[…] = (…)` | Stage 8 (declarations) |
|
|
|
+| 9202 | `MCFile : file of CellRec` — the file type, the whole `var` block, and the `{$I}` expansion | Stage 13 (file types) |
|
|
|
|
|
|
Rungs ahead:
|
|
|
|
|
|
| position | blocker |
|
|
|
|---|---|
|
|
|
-| 9202 | the `var` block's `file of`, then `{$I}` at 9404, and everything in `CALC.INC` |
|
|
|
+| 10350 | a string value parameter, then the rest of `CALC.INC`: file operations, indexing, `with`, pointers, `var` params, reals, string builtins, CRT, recursion |
|
|
|
|
|
|
Corrections the measurements force, worth stating plainly because the stage list
|
|
|
below was written before them:
|
|
|
@@ -163,7 +164,7 @@ stripped.
|
|
|
| nested procedures / functions | `DisplayMessage` in `Help`; `Fact`/`Factor` in `Evaluate` | parses OK |
|
|
|
| local `type`/`const`/`var` sections in a nested function | `CALC.INC:767-778` | `ERR 41`/`ERR 102` |
|
|
|
| `case` labels `^E`, `^X, ^J`, `#27`, comma lists | `CALC.PAS:169`, `CALC.INC:91,1200,1567` | comma lists/`^X`/`#` unknown |
|
|
|
-| `file of CellRec`, `text` | `CALC.PAS:144`, `CALC.INC:582` | `ERR 102` |
|
|
|
+| `file of CellRec`, `text` | `CALC.PAS:144`, `CALC.INC:582` | **types done (Stage 13)** — operations next |
|
|
|
| lexical `#27` and `^M` char constants | many | `ERR 41` at the `#`/`^` |
|
|
|
| `write`/`writeln`/`read` with a leading file argument | `CALC.INC:562,625` | not implemented |
|
|
|
|
|
|
@@ -428,14 +429,15 @@ The ladder row now sits on **sets**.
|
|
|
Fixture `t64_arrays` (compile-only: its ~16 KB image is past the exec
|
|
|
harness's 8 KB boot-sector read). `t14` re-baselined: the array DECLARES now;
|
|
|
the refusal moved to element access.
|
|
|
-- **Array/record ELEMENT and FIELD access is landed for CONSTANT indices**
|
|
|
- (constant subscript + `.field`), with the value's width carried on the
|
|
|
- expression (`ERes.sz`/`VarSize`). Fixture `t65_array_access`; `t14`
|
|
|
- re-baselined `ERR 102 109` → `OK 41 15`. A VARIABLE index (and `with`) is the
|
|
|
- next increment and is still loud.
|
|
|
-- **The ladder now stops at `ERR 102` at `9202`** — `MCFile : file of
|
|
|
- CellRec`, the file type in the `var` block. So the next stage is files, then
|
|
|
- the `{$I}` at 9404 and the `CALC.INC` body.
|
|
|
+- **File TYPES are landed (Stage 13, first half).** `text` and `file of T`; a
|
|
|
+ file variable is our control block (`FileVarSize` = 4). Fixture `t66_files`.
|
|
|
+ This is the step that carried the compiler **inside `CALC.INC`**: the whole
|
|
|
+ `var` block passed and the `{$I}` expanded, so the rung jumped from 9202 to
|
|
|
+ **10350**, where the first blocker is a string VALUE parameter in a nested
|
|
|
+ procedure. File OPERATIONS (`Assign`/`Reset`/…, read/write with a file
|
|
|
+ argument) are the next increment and are loud until then.
|
|
|
+- **The ladder now stops at `ERR 102` at `10350`** — `procedure Center(S :
|
|
|
+ AnyString)` in `CALC.INC`, a value parameter wider than a word.
|
|
|
- **One surprise on resuming:** the working tree was found holding the
|
|
|
nonvacuity script's *frame-rule* mutation of `shell/Compiler.mod` (the
|
|
|
`locFree := 0FFFEH` / pre-decrement-base revert), i.e. a mutation from a
|
|
|
@@ -445,8 +447,8 @@ The ladder row now sits on **sets**.
|
|
|
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 this commit:** `./tests/run_all.sh` →
|
|
|
- **OVERALL: ALL PASS**, compile matrix **66/66**, CALC ladder **1/1** at
|
|
|
- `ERR 102 9202`, 57 `.COM` linked and 55 executed under both qemu and Exec86
|
|
|
+ **OVERALL: ALL PASS**, compile matrix **67/67**, CALC ladder **1/1** at
|
|
|
+ `ERR 102 10350`, 58 `.COM` linked and 56 executed under both qemu and Exec86
|
|
|
(`t64_arrays` is compile-only: its image is past the 8 KB boot-sector read).
|
|
|
- **`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
|
|
|
@@ -730,12 +732,22 @@ currently reserves a fresh **256-byte** global scratch (`NewScratchStr`), which
|
|
|
for CALC's concat sites buys ~2 KiB of the budget in §3 — it needs to be sized
|
|
|
to the operand, or reused.
|
|
|
|
|
|
-**Stage 13 — files.** `text` and `file of CellRec`; `Assign`, `Reset`,
|
|
|
-`Rewrite`, `Close`, `EndOfFile`, `IoResult`; `read`/`write` with a leading file
|
|
|
-argument (`writeln (MCFile, Line)`, `Readln (H, Buffer^[count])`). DOS
|
|
|
-`INT 21h` open/create/read/write/close in the runtime, with text-mode newline
|
|
|
-and `^Z` semantics (`RESUME-TP3.md` §2). `{$I-}`/`{$I+}` (Stage 2) already gate
|
|
|
-the checking that `IoResult` reports.
|
|
|
+**Stage 13 — files. Types DONE; operations next.**
|
|
|
+
|
|
|
+Done: `text` and `file of T`. A file variable is our own control block
|
|
|
+(`FileVarSize = 4`: the DOS handle word and a mode word), because this runtime
|
|
|
+does unbuffered `INT 21h` I/O where TP3 keeps a 128-byte buffer inside the
|
|
|
+variable - a recorded divergence. `file of T` parses its element type so the
|
|
|
+RECORD size a Read/Write must move is known. Fixture `t66_files`; this let the
|
|
|
+whole `var` block pass and the `{$I CALC.INC}` expand, which is why the ladder
|
|
|
+moved from `9202` to **`10350` - inside the include**.
|
|
|
+
|
|
|
+Not yet, and loud (unknown identifier): `Assign`, `Reset`, `Rewrite`, `Close`,
|
|
|
+`EndOfFile`, `IoResult`, and `read`/`write` with a leading file argument
|
|
|
+(`writeln (MCFile, Line)`, `Readln (H, Buffer^[count])`). These need runtime
|
|
|
+entries doing `INT 21h` open/create/read/write/close, with text-mode newline
|
|
|
+and `^Z` semantics (`RESUME-TP3.md` §2). `{$I-}`/`{$I+}` (Stage 2) already
|
|
|
+gate the checking that `IoResult` reports.
|
|
|
|
|
|
**Stage 14 — the CRT identifiers.** `GotoXY` (25), `LowVideo`/`NormVideo`
|
|
|
(16 + 16), `ClrEol` (10), `ClrScr` (6), `KeyPressed` (3), `Delay` (1),
|