flat assembler
Message board for the users of flat assembler.

Index > Main > Question about backslash

Author
Thread Post new topic Reply to topic
rohagymeg



Joined: 19 Aug 2011
Posts: 77
rohagymeg
Hi again! While I was coding, I ran into some practical brickwalls.

Like how can I break this line in fasmw with the backslash?
Code:
variable db "This is a vvvverrrrryyyyyy llllooooonnnnggg sssssttttrrrriiinnnggg. Blablablablablabla sdsasdsadasdasdsadsdblalblalblalbalblalbalabalbbalalbalasdasdasdasdasdasdasdasdasdasdasdasdadasdasdasdadasdadasdadsda",0    
Post 24 Aug 2011, 20:05
View user's profile Send private message Reply with quote
mindcooler



Joined: 01 Dec 2009
Posts: 423
Location: Västerås, Sweden
mindcooler
Why not just break it into several db statements?
Post 24 Aug 2011, 20:50
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
rohagymeg



Joined: 19 Aug 2011
Posts: 77
rohagymeg
mindcooler wrote:
Why not just break it into several db statements?

I guess it will work that way. I appreciate your answer, thank you! How I didn't try this yet Mad
Post 24 Aug 2011, 20:57
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1418
Location: Toronto, Canada
AsmGuru62
Example:
Code:
variable db 'A HUGE STRING'
                db '-------- WELL... NOT THAT HUGE, ACTUALLY!',0
    
Post 24 Aug 2011, 21:11
View user's profile Send private message Send e-mail Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17635
Location: In your JS exploiting you and your system
revolution
To answer the original question:
Code:
db 'Abc. ',\
   '123. ',\
   'Some more. ',\
   'Finshed.'    
Post 24 Aug 2011, 21:14
View user's profile Send private message Visit poster's website Reply with quote
rohagymeg



Joined: 19 Aug 2011
Posts: 77
rohagymeg
Cool! There is a proper way after all!
The several db statements do the job very well, but with backslash I can see that they are together and make one huge line.
Thanks, revolution! With your answers you don't just answer my questions, but give me a Idea so I can understand more things that I didn't dare to ask lol.
Post 25 Aug 2011, 01:31
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
To be honest, revolution is the best mod here. Very Happy
Post 25 Aug 2011, 02:13
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.