flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > String from 'equ' ...

Author
Thread Post new topic Reply to topic
IronFelix



Joined: 09 Dec 2004
Posts: 141
Location: Russia, Murmansk region
IronFelix 27 Mar 2006, 06:44
Hi all!
Please tell me, is there any opportunity to define string from equ in FASM? Or the same with another equ or define.
For example:

Code:
 A equ 1-1-1-1

 str db A,0 ; <- can't use "" here, as in another 'equ' too
 ; with another equ i maen the following:
 ; B equ '1-1-1-1' but with earlier defined A 

    


Thanks and regards.

_________________
Flat Assembler is the best!
Post 27 Mar 2006, 06:44
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8358
Location: Kraków, Poland
Tomasz Grysztar 27 Mar 2006, 09:29
Something like:
Code:
macro dbsymb c { match value,c \{ irps symb,value \\{ db \\`symb \\} \} }

dbsymb 1-1-1-1    

would work. However it just converts the symbols to text, and remember that whitespace from between the symbol doesn't count. Thus
Code:
dbsymb 1 -1  -    1-  1    

would do exactly the same.
Post 27 Mar 2006, 09:29
View user's profile Send private message Visit poster's website Reply with quote
IronFelix



Joined: 09 Dec 2004
Posts: 141
Location: Russia, Murmansk region
IronFelix 27 Mar 2006, 11:30
Thanks, Tomasz!
Your FASM is really the best!
Regards.
Post 27 Mar 2006, 11:30
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 27 Mar 2006, 13:21
Hey,
I didn't understand the question neither the answer - could one of you explain to me what just happened here Neutral

Where do you use this kind of construct (1-1-1-1)?

Confused Madis Smile

PS. Oh my, I've got 666 posts...
Post 27 Mar 2006, 13:21
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
IronFelix



Joined: 09 Dec 2004
Posts: 141
Location: Russia, Murmansk region
IronFelix 27 Mar 2006, 13:43
Hi Madis731!

It is an abstract example based on UUID form like

11111111-2222-3333-4444-555555555555
And i just wanted to get binary data defined and string to register COM server in registry. That's why i needed such kind of macro.
Now it is implemented and works fine.
Regards.
Post 27 Mar 2006, 13:43
View user's profile Send private message 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.