Skip to content

Regenerate 8080.min.js with current interrupt/EI behavior and add drift check - #16

Merged
maly merged 1 commit into
masterfrom
agent/issue-15-regenerate-min
Nov 9, 2026
Merged

maly merged 1 commit into
masterfrom
agent/issue-15-regenerate-min

Conversation

@maly

@maly maly commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Closes #15

Changes

  • 8080.min.js regenerated from current 8080.js with terser 5.51.2 -c -m. The interrupt export now clears INTE and the pending EI, charges 11 T-states and maps interrupt(0) to 0x0000; EI (0xFB) sets eiPending instead of enabling interrupts immediately. The old g.pc=u||56 pattern is gone.
  • package.json: new minify script (npx --yes terser@5.51.2 8080.js -c -m -o 8080.min.js), pinned so the output is deterministic. No dependencies added.
  • test/node/minified.test.js: loads only 8080.min.js in a separate vm context and checks the interrupt(): INTE not cleared on acceptance, no EI delay, 0 T-states charged; steps() leaks a global T #13 contracts (EI delay, 11 T-states, INTE cleared on acceptance, nested request ignored until EI + one instruction, DI cancels pending EI, interrupt(0) → 0x0000, default vector 0x38).
  • .github/workflows/test.yml: new step runs npm run minify and fails on git diff --exit-code -- 8080.min.js.
  • README.md: notes that 8080.min.js is a build artifact, which file browsers/Node/tests load, and how to regenerate it.

Verification

  • npm test: 24 tests, 24 passed.
  • The new minified test against the old 8080.min.js fails 5 of 6 cases; against the regenerated file all pass.
  • Running terser twice produces byte-identical output, and npm run minify && git diff --exit-code -- 8080.min.js is clean after the commit.

@maly
maly merged commit 7c0cc72 into master Nov 9, 2026
4 checks passed
@maly
maly deleted the agent/issue-15-regenerate-min branch November 9, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8080.min.js still has pre-#13 interrupt/EI behavior (does not match 8080.js)

1 participant