Open sy2002 opened 4 years ago
When we write a new assembler it would be nice if it supported macro instructions, i.e. defining a macro consisting of small snippets of assembly. Something similar to the 6502 macro assembler, see sections 6 and 12 here: https://cc65.github.io/doc/ca65.html
@MJoergen Good point: Macros for the native toolchain's assembler would be nice, so @bernd-ulmann if you added a preprocessor, that would be a nice additional point. But @MJoergen Did you know: We already do have a QNICE assembler, that is capable of macros: VASM: When you go to the website, you see QNICE mentioned there. You find infos about how to use it in QNICE-FGA here, scroll down to the section VASM assembler.
Oh, I didn't know about VASM. Thank you for the hint.
Sorry, wrong link in above comment (now edited). You find how to use it in QNICE-FPGA in our README.md, here:
https://github.com/sy2002/QNICE-FPGA/tree/dev-int#programming-in-assembler
Scroll down to the section VASM assembler.
Simple macros are also possible with the existing qasm using the C-preprocessor which is called prior the assembler run by asm. Maybe better than nothing at the moment. :-)
This one is not urgent as the use case would also need writeable SD cards, FAT32 to support writing and possibly also support for more RAM:
The idea is: One day to be able to develop for QNICE on the QNICE. For example do write and assemble QNICE assembler while working on QNICE hardware.
Besides the fact that for that we also would need a nice assembler text editor on QNICE (or even an QNICE assmbler IDE 😏 ): We need the assembler to run on QNICE.
And for that we need to make it "stand-alone", i.e. independent from an external C preprocessor.