flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > determine if macro-argument is string during preprocessing

Author
Thread Post new topic Reply to topic
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
is this possible somehow? I can't find any solution.
Post 15 Dec 2005, 02:43
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1171
Location: Overflow
Matrix
you whould somehow have to define string to the variable, like a type.
though string is a set of bytes, ending with 0 , $ , or starting with length
from this, nearly anything could be string, even a x: dw 2113
since there is not a type "string" in fasm, like in c

so technically, when you pass string, you pass an address, so you can pass anything as string
Post 15 Dec 2005, 09:23
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
no, there is type string constant - one enclosed in "" and ''. This is one i would like to determine
Post 15 Dec 2005, 11:27
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17717
Location: In your JS exploiting you and your system
revolution
Code:
if parameter eqtype ""    
Does that not work? Or did I miss something.
Post 15 Dec 2005, 12:44
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7802
Location: Kraków, Poland
Tomasz Grysztar
No, you cannot determine that at preprocessor stage. With "match" you can only check for the literally the same quoted string.
Post 15 Dec 2005, 13:36
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
too bad, more overhead for assembler then.

This would be also solved with parse-time evalutating of predicatable ifs (if 'aaaa' eqtyoe ''). Have you already been planning something more this way?
Post 15 Dec 2005, 22:05
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7802
Location: Kraków, Poland
Tomasz Grysztar
I've been planning it, however only partial solution is possible - that is, replacing the <if 'aaaa' eqtype ''> with <if 1> during the parsing, etc.
Post 15 Dec 2005, 22:14
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.