asar icon indicating copy to clipboard operation
asar copied to clipboard

Add ASM builder

Open Horrowind opened this issue 7 years ago • 0 comments
trafficstars

Since you are adding new items to the asar wishlist:

How about a ASM builder API (similar to LLVM)? The idea would be that if I want to create ASM with a tool, I wouldn't need to write it to a string buffer to be read again, but instead I could write something like this:

asm_builder_label(asm, "labelname");
asm_builder_lda(asm, 0x1234);
[...]
asm_builder_bne(asm, "labelname");
asm_build(asm);

Clearly this is far fetched, will need additional thought and might as well cause a rewrite of the core of asar. I would hope that this would make the semantics of asar precise, since many of the commands in asar would map directly to those function calls.

Horrowind avatar Mar 08 '18 00:03 Horrowind