flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Each char of string processing macro

Author
Thread Post new topic Reply to topic
Fatelight



Joined: 17 May 2008
Posts: 2
Fatelight 17 May 2008, 15:59
Hi. Faced with a problem
I need to write a macro, which will take a string as a parameter, e.g. 'fasm' and will convert it to something like db 'f', 0, 'a', 0, 's', 0, 'm', 0. I tried to use
irps char, string {
db char
db 0
}
But that makes preprocessor to write a db 'fasm', 0.
The only thing, i thought, was to pass 'f', 'a', 's', 'm' as that macro parameter. But that's not convenient, because a lot of strings should be written in such a way..
Can you help me? Or there's no way to that?
Post 17 May 2008, 15:59
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4352
Location: Now
edfed 17 May 2008, 16:07
don't code for text mode.
Smile
Post 17 May 2008, 16:07
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20413
Location: In your JS exploiting you and your system
revolution 17 May 2008, 16:10
Use:
Code:
du 'fasm'    
Post 17 May 2008, 16:10
View user's profile Send private message Visit poster's website Reply with quote
Fatelight



Joined: 17 May 2008
Posts: 2
Fatelight 17 May 2008, 16:27
thank you, revolution Smile And thanks for such a quckly reply
Post 17 May 2008, 16:27
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.