Over the last few weeks, i've been adapting some macro's to the new fasm macro instructions (with a little help from this board), and i must say, the extended capabilities are impressive!
But since i also believe everything can always be improved, i have a suggestion:
From the new instructions i believe the irp could be of great use, but is somewhat limited atm.
Since in advanced macro's, i often resort to building lists with equ, irp seems the perfect way to parse those lists with the least overhead. There are two problems though:
Since its arguments aren't expanded, a match is needed (needless overhead)
You can only parse per element, so you need to resolve to a dummy macro if you want the list parsed differently.
So my suggestion:
usage: irp var1,var2,[var3]:varlist {}
ie. define the args as you would with a normal macro, a ':', and then the list
internally varlist would then be expanded before the arg replacing is done.
Any thoughts?
EDIT: a different solution to the expanding problem would be a command that forces evaluating, sort of the opposite of \, although then the entire code line would have to be parsed, before any evaluating can be done...
|