Merged
Conversation
This adds a new bubble sort example implementation. Array is stored at $20-$2F and supports up to 16 elements. Demonstrates: - Zero-page indexed addressing - Conditional branching and loops - Interactive input/output with the emulator
- Add early exit for n<2 in Rust wrapper (workaround for emulator bug) - Keep assembly early exit for documentation - Add extensive comments to assembly code - Handle edge case: 1-element arrays now work correctly Note: There appears to be an emulator bug where the BCC instruction after CMP doesn't branch correctly for n=1. This needs investigation in a separate issue.
omarandlorraine
requested changes
Jan 6, 2026
omarandlorraine
approved these changes
Jan 8, 2026
Collaborator
omarandlorraine
left a comment
There was a problem hiding this comment.
That all seems right to me
Owner
Author
|
Thanks for the review. 👍 |
Closed
mre
added a commit
that referenced
this pull request
Feb 6, 2026
This adds a new bubble sort example implementation. Array is stored at $20-$2F and supports up to 16 elements.
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.
Adds another example, a simple bubble sort algorithm, to the repo with the goal to demonstrate how interrupt handling works (used for halting the program after execution).
The goal was to document as much of the algorithm and scaffolding code as possible to help beginners get started with the library.
Depends on #122, because we use the new interrupt handling.
Closes #35