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
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: 4242
Location: 2018
edfed
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: 17662
Location: In your JS exploiting you and your system
revolution
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
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.