Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add direct-relative assembly mnemonics with a numeric displacement. #22

Open
wants to merge 2 commits into
base: v2-ng-master
Choose a base branch
from

Conversation

moleus
Copy link

@moleus moleus commented Jun 22, 2022

This feature request introduces a possibility to use a numeric displacement in a direct-relative addressing mode.

Previously, we could only use labels with direct-relative addressing mode in assembly, like JUMP L_NAME. But it wasn't really convenient to add new labels just to implement simple two-lines loop or jump a few lines.

Alternative way of defining direct-relative mnemonics JUMP (IP+5) was shown in a bcomp manual, so I decided to implement it.
Now, this mode supports both label reference and numeric displacement mnemonics.

Also, I wrote tests that cover conversions of assembly to instructions for all addressing modes.

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.

1 participant