flat assembler
Message board for the users of flat assembler.

flat assembler > Programming Language Design > Change to recursive macros in fasmg

Author
Thread Post new topic Reply to topic
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7002
Location: Kraków, Poland
The new fasmg (version ibh2d) has a change that slightly breaks backward-compatibility and therefore I had to update some of the macro packages. I believe this is a good change, though - because it got rid of one of the problems of fasmg's initial design.

Earlier it was very easy for macro definition to cause an infinite recursion that was unwanted and unasked for. Therefore I have updated the syntax so that a macro can only be recursive when this is explicitly stated (with a ":" character after the name of the macro). With this syntax the assembler also ensures that such macro is treated like a constant and cannot be re-defined.

This change did in fact make some of the warnings in the documentation obsolete. I may need to update some older posts that showed workarounds for problems caused by the initial design. No such workarounds are needed anymore.
Post 01 Oct 2018, 20:10
View user's profile Send private message Visit poster's website Reply with quote
nmyo



Joined: 26 Aug 2011
Posts: 4
Location: Las Vegas, NV
I've been playing around with DOS MZ EXE in fasmg and noticed I couldn't assemble labeled dw and dd. I think word and dword macros in mz.inc should have the ":" character. Not sure if it's the correct solution, but fasmg assembles after adding it.
Code:
macro word?: value
macro dword?: value    
Post 06 Nov 2018, 19:20
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7002
Location: Kraków, Poland
Thank you for reporting this, I had it corrected in PE/ELF formatters but I forgot about MZ.
Post 06 Nov 2018, 19:31
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2018, Tomasz Grysztar.

Powered by rwasa.