6 ms·
Very cool and I like the idea of a "meta-assembler." The most-recent version of flatassembler (fasm 2) is built with fasmg which is also a "meta-assembler" of s
by 2ton_jeff 1y ago
Very cool and I like the idea of a "meta-assembler." The most-recent version of flatassembler (fasm 2) is built with fasmg which is also a "meta-assembler" of sorts, in that it also doesn't directly support a specific instruction set and instead is a very powerful macro assembler. I'm keen to check out functionality overlaps between the two implementations.
https://board.flatassembler.net/topic.php?t=19389 https://board.flatassembler.net/topic.php?t=19389
https://flatassembler.net/download.php https://flatassembler.net/download.php
- benbridle 1y agoOh neat! Thanks for the link, I hadn't heard of fasmg before. It looks like fasmg builds up from the byte level, so it would only work for architectures that use 8-bit words. Torque builds up from the bit level, so it can assemble code for architectures like in PIC microcontrollers, using word sizes of 12 or 14 bits. However, fasmg does allow a lot more control over the syntax of the language. The documentation shows some pretty powerful string manipulation that's used to parse real x86 assembler code, which makes sense given the purpose of it. Torque doesn't allow overriding the syntax to that degree, the macro invocation syntax is baked into the assembler. One thing that intrigues me about fasmg is how it handles circular dependencies in expressions [0] (search for 'circular'). Currently in Torque it isn't possible to use a label reference inside a predicate, because the predicate evaluating one way could insert additional code, moving the label and causing the predicate to evaluate the other way [1]. But in fasmg it's possible to use the result of an expression as part of its own calculation. [0] https://flatassembler.net/docs.php?article=fasmg https://flatassembler.net/docs.php?article=fasmg [1] https://benbridle.com/projects/torque/roadmap.html https://benbridle.com/projects/torque/roadmap.html
- 2ton_jeff 1y agoI reached out to the author of fasmg WRT your post and circular dependency interest and he pointed me toward two posts that he wrote very specifically to explain what he believes is unique to fasm/fasmg and allows to handle circular dependencies of many kinds. [0] Types of multi-pass assembly, and [1] related pitfalls. [0] https://board.flatassembler.net/topic.php?t=20249 https://board.flatassembler.net/topic.php?t=20249 [1] https://board.flatassembler.net/topic.php?t=21060 https://board.flatassembler.net/topic.php?t=21060
- benbridle 1y agoThank you so much! It looks like the issue I described is what he calls the 'oscillator problem' [0]. This is an absolute goldmine, I'm going to be reading for days. [0] https://board.flatassembler.net/topic.php?p=178828#178828 https://board.flatassembler.net/topic.php?p=178828#178828
- 2ton_jeff 1y agoTomasz (of fasmg) added "one more quick thought" re: 8-bit word not being a limitation, he said that since fasm1 had macros for LZW compression [0] (from the assembler alone) and that this is even easier with fasmg the word length isn't a restricting factor with his design either. Cheers and thanks for sharing. [0] https://board.flatassembler.net/topic.php?t=14612 https://board.flatassembler.net/topic.php?t=14612