SESSION.MD5.trans8to64 1.6 KB

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