Add remaining illegal opcodes and tests#127
Merged
omarandlorraine merged 3 commits intomre:illegalfrom Jan 27, 2026
Merged
Conversation
added 2 commits
January 26, 2026 08:02
The illegal opcodes implementation caused README doc tests to hang: 1. First example used 0xff as program terminator - Previously 0xff was unimplemented (returned None), stopping execution - Now 0xff is ISC (INC+SBC) AbsoluteX, causing infinite loop - Fix: Use 0x02 (JAM) which explicitly halts the CPU 2. Second example loads euclid.bin which uses BRK (0x00) to terminate - BRK jumps to IRQ vector at $FFFE/$FFFF - Uninitialized memory contains 0x00, jumping to address $0000 - This causes infinite loop executing whatever is in low memory - Fix: Mark as no_run since it depends on external file anyway
Closed
Collaborator
|
I have one concern and that is that the README test seems to be disabled. Can you shed light on this? I remember you ran into trouble with it, but did you get it running and passing in the end? |
Closed
omarandlorraine
approved these changes
Jan 27, 2026
Collaborator
omarandlorraine
left a comment
There was a problem hiding this comment.
Thanks, this is perfect
- Replace BRK with JAM ($02) to halt CPU after illegal opcodes impl - Fix assembly label structure (algo/algo_ were dead infinite loops) - Simplify linker.cfg to output raw binary at $0010 (was 64KB image) - Enable README doc test (remove no_run marker) The old linker config produced a 64KB memory image with code at $0400, but README loaded at $0010 causing address mismatch. New config outputs only the code segment at the correct load address.
Collaborator
|
So that's been merged into my branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completion of #126 by @omarandlorraine. Fixes #125. Note that this targets the
illegalbranch and should ultimately be merged into main if accepted.