Skip to content

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