flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > 'text' to text

Author
Thread Post new topic Reply to topic
Overclick



Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 03 Aug 2022, 23:05
Hi
I need to get clear text without quotes.
mutch =' any,arg {} wants missing quote.
Post 03 Aug 2022, 23:05
View user's profile Send private message Visit poster's website Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 1228
Location: Belarus
DimonSoft 04 Aug 2022, 07:52
From what I know, it’s impossible without at least making changes in FASM. match works with tokens, not characters, other preprocessor statements too. Sometimes it’s possible to invert the logic and convert everything to string literals to do the job, but in your case it doesn’t seem to be a solution.
Post 04 Aug 2022, 07:52
View user's profile Send private message Visit poster's website Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 04 Aug 2022, 08:06
I need to take it from macro parameters, maybe that will help?
Code:
section '.text' code readable executable     

macro section ...
Post 04 Aug 2022, 08:06
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 04 Aug 2022, 09:18
There is no method to tokenize the contents of a quoted string, you'd need something like EVAL in fasmg that allows that there.
Post 04 Aug 2022, 09:18
View user's profile Send private message Visit poster's website Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 04 Aug 2022, 09:31
Then users of my macro will remove that quotes from sections Smile
Code:
section .code code readable executable     
Post 04 Aug 2022, 09:31
View user's profile Send private message Visit poster's website Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 1228
Location: Belarus
DimonSoft 04 Aug 2022, 10:01
Are spaces allowed in section names? Is section name really worth bothering at all?
Post 04 Aug 2022, 10:01
View user's profile Send private message Visit poster's website Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 04 Aug 2022, 10:17
I trying to make it most fasm-user-friendly.
My new multisection macro allows users to easilly migrate to multisection use.
No more extra files needed.
All we need is remove quotes from general sections and then we can use short names multiple times and it is optional.
Macro already done and working smooth. But I have to add all helpfull staf like .frame-.stream and proc fixes and multiplyed import before publication.
Post 04 Aug 2022, 10:17
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.