If I define a string variable in my .data section as such:

szStuff db "stuff",0


....but wanted to have a quotation mark in that string (i.e. ....db "more"stuff",0), what is the escape character used in masm?

btw, I apologize if this has been answered before but my searches turned up zilch. So this thread also has another purpose (I made the thread subject easier to search by). ;)
Posted on 2002-09-19 17:00:03 by Will
blah db "unquoted ",34,"quoted",34,0
Posted on 2002-09-19 17:10:11 by iblis
What took you so long?!?!

(j/k :) )

I figured that it must be something really simple.


Thanks
Posted on 2002-09-19 17:15:24 by Will
str db 'hello "cruel" world', 0

remember the sequence, that is single quote, double quote, double quote, single quote.
Posted on 2002-09-19 18:34:05 by stryker
Here's another way. If you want double quotes, include the string in single quotes

szStuff db 'use "double" quotes'

And if you want single quotes, include the string in double quotes:

szStuff db "use 'single' quotes"

:)

ED" Posted at the same time huh. Great minds think alike, and at the same time I guess...
Posted on 2002-09-19 18:34:11 by S/390
s/390 I posted faster than you, a few seconds. :grin:
Posted on 2002-09-19 18:35:38 by stryker
Another approach:

szStuff db "use ""double"" quotes", 0
szStuff db 'use ''single'' quotes', 0
Posted on 2002-09-20 01:53:32 by Four-F