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

Create built-in instruction macros %hex("...") and %string("...") #106

Open
SamWilsn opened this issue Aug 3, 2022 · 0 comments
Open

Create built-in instruction macros %hex("...") and %string("...") #106

SamWilsn opened this issue Aug 3, 2022 · 0 comments
Labels
A-assembler Area: assembler C-enhance Category: a request for an improvement E-medium Experience: of moderate difficulty

Comments

@SamWilsn
Copy link
Contributor

SamWilsn commented Aug 3, 2022

%hex("...")

An instruction macro that inserts the argument literally into the assembled output:

jumpdest
%hex("7FAB")
invalid

Would become:

5b7fabfe

We already have %include_hex, but this would be useful for smaller snippets.

%string("...")

An instruction macro that inserts the argument literally into the assembled output, encoded as UTF-8:

jumpdest
%string("hello world")
invalid

Would become:

5b68656c6c6f20776f726c64fe

This macro is useful for revert reasons.

@SamWilsn SamWilsn added C-enhance Category: a request for an improvement A-assembler Area: assembler E-medium Experience: of moderate difficulty labels Aug 3, 2022
@SamWilsn SamWilsn mentioned this issue Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-assembler Area: assembler C-enhance Category: a request for an improvement E-medium Experience: of moderate difficulty
Projects
None yet
Development

No branches or pull requests

1 participant