|
@@ -27,17 +27,22 @@ END;
|
|
|
Failure mode is uniform with other overlays (`Loader.LoadError` →
|
|
Failure mode is uniform with other overlays (`Loader.LoadError` →
|
|
|
`ERROR: CANNOT LOAD OVERLAY`, delete partial output).
|
|
`ERROR: CANNOT LOAD OVERLAY`, delete partial output).
|
|
|
|
|
|
|
|
-## Trigger chain (partly open)
|
|
|
|
|
|
|
+## Trigger chain (CLOSED 2026-10-04, original media evidence)
|
|
|
|
|
|
|
|
-* Shell run menu sets `ComLine.execute` = 4 (bytecode) vs 5 (native Z80)
|
|
|
|
|
- (`shell.txt` @1351, explicit comment in disassembly).
|
|
|
|
|
-* `CodeGen.InitCodeGenerator` reads `execute` (`checkOverflow := execute = 4`).
|
|
|
|
|
-* Setter of `Compiler.nativeCodeRequested=TRUE` NOT FOUND in any recovered
|
|
|
|
|
- code: no `store COMPILER.word25` exists in `compiler/scanner/symtab/pass1/
|
|
|
|
|
- statement/express/codegen/shell.txt` (only the FALSE init in `compiler.txt`
|
|
|
|
|
- @07ec). Candidates: shell compile path (no COMPILER dependency though),
|
|
|
|
|
- `Scanner.Compile` prologue (not in the decompiled body — which may itself
|
|
|
|
|
- be incomplete), or a lost `%`-option branch. OPEN QUESTION for verification.
|
|
|
|
|
|
|
+* Shell Options menu has a `Native/2` toggle flipping bit 2 of the options
|
|
|
|
|
+ word at absolute `[0x348]` (persisted to M2.COM file offset 584; `%N`
|
|
|
|
|
+ command-line sets the same bit: `N-L=2` in `InitCompiler`).
|
|
|
|
|
+* `InitCompiler` computes `COMPILER.word2 := 2 IN scanOptions` (verified
|
|
|
|
|
+ byte-identical in `m2.ovr` @`0x53A0` and `compiler.txt` @`07ec`).
|
|
|
|
|
+* PASS1 body epilogue copies `COMPILER.word2` -> `COMPILER.word25`
|
|
|
|
|
+ (`compile.mcd` @file `0x1065`, `m2.ovr` PASS1 likewise). In our tree that
|
|
|
|
|
+ reads `rangeCheckEnabled -> nativeCodeRequested` (recorded on the
|
|
|
|
|
+ `InitPass1` stub in PASS1.MOD).
|
|
|
|
|
+* `Scanner.Compile` tests the flag (`m2.ovr` @`0x1D55`, matches our
|
|
|
|
|
+ SCANNER.MOD) and calls `Loader.Call("GENZ80")`.
|
|
|
|
|
+* (`ComLine.execute` = 4 bytecode vs 5 native is the parallel shell-run
|
|
|
|
|
+ knob; `CodeGen` reads it for overflow checks. Shipped M2.COM has Native
|
|
|
|
|
+ OFF by default.)
|
|
|
|
|
|
|
|
## Recovery status: binary absent
|
|
## Recovery status: binary absent
|
|
|
|
|
|
|
@@ -73,3 +78,14 @@ So there is nothing to decompile yet. Recovery plan:
|
|
|
* Uses: `Scanner.*` (source/options), `Compiler.*` (predefs), `CodeGen.*`
|
|
* Uses: `Scanner.*` (source/options), `Compiler.*` (predefs), `CodeGen.*`
|
|
|
(opcodes/fixup helpers), `Files.*` (output).
|
|
(opcodes/fixup helpers), `Files.*` (output).
|
|
|
* Must NOT disturb `SymTab` heaps (they sit above the code window).
|
|
* Must NOT disturb `SymTab` heaps (they sit above the code window).
|
|
|
|
|
+
|
|
|
|
|
+## NATIVE module (found bundled in genz80.mcd)
|
|
|
|
|
+`genz80.mcd` holds TWO modules: NATIVE (base mem `0x19F1`, 52 procs) +
|
|
|
|
|
+INTELL (base `0x39EC`, the emitter). INTELL dep slot points at NATIVE
|
|
|
|
|
+(co-linked same file); NATIVE points back at INTELL. No `native.mcd` on
|
|
|
|
|
+disk, nothing NATIVE in `syslib.lib` — it ships bundled, not standalone.
|
|
|
|
|
+NATIVE is the MCode reader core: GETBYT/NEXTBY/NEXTWO/LOOKAH (bytecode
|
|
|
|
|
+fetch), ASSERT/FATAL/DPATCH/PATCH/SETLAB (labels), GEN1L2/PUSHIT/POPIT/
|
|
|
|
|
+STACKE/GENCAL (codegen callbacks), WRITEP/WRITEH/WRITET/WRITEA (writers),
|
|
|
|
|
+PLUS the driver + epilogue regions no group covered yet.
|
|
|
|
|
+Disassembly: `docs/compiler/disasm/native.txt` (4499 lines).
|