Do in dependency order; verify by recompiling to 100% MCode match
(the repo's existing check: decompiled sources must reproduce the .MCD).
Compiler + Scanner (types known)Compiler.Record/RecordPtr/ArrayPtr: document word0..word5/high
once; all later renames refer to it.Compiler PROC3..18, PROC1, GETINP, PROC10..13 per 20-compiler-module.md.
Mechanical: global31->curScope, global32/33->saveScope/baseScope,
global35->lastParamList, global20/21->systemMod/storageMod.Scanner globals + GetSym/Accept/Expect/Test/NextChar/Refill
per 30-scanner-module.md. Keep Z80 helpers (Allocate/FindIdent/
StrCmp/StrLen) byte-identical (padding comments are load-bearing).unassemble.c diff against compiler.txt/scanner.txt.CodeGen (no parser dependency)Emit*/Peek/Poke/Flush/OpenFix/CloseFix
per 50-codegen.md. Opcodes already named; do not renumber.codegen.txt.SymTab + Errors (needs 1+2)SYMTAB.MOD header from SYMTAB.DEF + symtab.txt
proc boundaries; rename moduleTab/curScope/symTop/... per
40-symtab-errors.md.Errors procs per same file; keep DoError stack/heap
MOVE arithmetic exact (CBACKUP.$$$, FREEMARKER, 030CH/0316H).symtab.txt/errors.txt.Express -> Statemen -> Pass1 (needs 1-3)Express: EXPRES/ParseSimpleExpr/FoldConstOp/MatchOpClass/Designator*
first; they are called by the other two.Statemen: STMT/STATSE/ParseStatSeq/CASE/FOR next.Pass1: GetIdent/ParseType/ParseRecord/DCL/DCLS/PROCDE/MAINDE/WriteSym last.COMPILE link order Pass1+Statemen+Express; GENZ80 untouched
until MCode output is stable.~ prefix in docs = inferred, not yet confirmed by recompile.tr -d '\032\r' normalisation out of diffs
(convert once, or keep CRLF — decide once, stay consistent).unassemble match result (yes/no + differing offsets).