Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@SamWilsn

Description

@SamWilsn

%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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-assemblerArea: assemblerC-enhanceCategory: a request for an improvementE-mediumExperience: of moderate difficulty

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions