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

Including arbitrary data in bytecode #7

Open
fjl opened this issue Sep 13, 2023 · 0 comments
Open

Including arbitrary data in bytecode #7

fjl opened this issue Sep 13, 2023 · 0 comments

Comments

@fjl
Copy link
Owner

fjl commented Sep 13, 2023

This is a pretty standard assembler feature. Sometimes you just need to put some raw bytes into the bytecode. This should be implemented as a new directive, for example:

#bytecode "file.bin"

Including binary files should obviously work, but sometimes it can also be interesting to include the output of expressions. I think the syntax for this could use the same directive but with braces instead of the filename. The size of each expression would also need to be declared:

#bytecode {
   1: 0x01
   4: macro & mask
   2: @label
}

Allowing labels in there is interesting for jumptable constructions.

@fjl fjl changed the title Including arbitrary data in code Including arbitrary data in bytecode Sep 14, 2023
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

No branches or pull requests

1 participant