| 123456789101112131415161718192021222324252627 |
- trans8to64.mod baseline md5 = 36170a8bd630d93b90fc4c9b3c03cbbc (uncommitted; translator
- emit-locked, dep-chain milestone done)
- Any step that rewrites this file without first raising the lock paper is a session bug.
- == DEP-CHAIN MILESTONE CLOSED ==
- What changed (trans8to64.mod): reads ndeps=H16(6), deps16=H16(4); validates
- 16+deps16+ndeps*12<=got and ndeps<=32; writes real DescDepCount (image byte 294);
- appends dcnt*8 dep-name table (NUL-padded, 8 bytes each) at the image tail, summed
- into the checksum. dcnt=0 output is byte-identical to the 5f922946 baseline.
- What changed (Loader2.mod): multi-window chain loader.
- - LoadOne(slot, name, next, allowDeps): loads one image into MTBL slot `slot`;
- per-slot dataWin = desc+imgLen (8-aligned) + zero-filled globals; advances `next`.
- - Call: deps (slots 0..dcnt-1) loaded first, main at slot dcnt; dep names come
- from the image tail (buf[got-dcnt*8 + ...]); dep TOINIT then main TOINIT run.
- - Slot convention = the 16-bit semantics: extern mod 0 == first import
- (verified at runtime by mkdep synthetic test: DEP extern_call mod=0 -> STAK slot 0,
- "cross-module ok", rc=0).
- - NOT allowed yet: nested dependencies (dep modules must have dcnt=0).
- - Known trap fixed: `FOR j := 0 TO dcnt - 1` wrapped to 2^32-1 iterations when
- dcnt=0 (CARDINAL underflow); now `FOR j := 1 TO dcnt` / j-1 indexing.
- Regression battery (all rc=0): Stack64 (dcnt=0, byte-identical image), boot.mc4,
- example.MCD, readtest (stdin), mkdep DEP cross-module call, and the real reference
- libraries Extended/Array/Local (dcnt=1, dep=STACK) under mcint.
- Old baseline (5f922946) kept for rollback.
|