Including arbitrary data in bytecode
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.
I have added a #bytes directive for literal bytes. The full syntax (with { ... }) is not implemented yet.
#bytes and several other related features have been added in release v0.3.0, completing this feature idea. I didn't end up implementing the fancy { ... } syntax, but it'll be easy enough to add if needed.