flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > irp instruction

Author
Thread Post new topic Reply to topic
Joshua



Joined: 12 Jul 2003
Posts: 56
Location: Belgium
Joshua
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...
Post 28 Jul 2006, 23:09
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7106
Location: Slovakia
vid
just a note: irp is NOT a instruction, it's directive
Post 29 Jul 2006, 13:54
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Joshua



Joined: 12 Jul 2003
Posts: 56
Location: Belgium
Joshua
Heh, can't really argue with that, but i can't be bothered to go and edit my first post...
How about this as a solution: instruction fix directive
Post 29 Jul 2006, 14:14
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7106
Location: Slovakia
vid
use fix fix fix to unfix fix
Post 29 Jul 2006, 15:19
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number 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-2019, Tomasz Grysztar.

Powered by rwasa.