strings with quotation marks in assembly

Viewed 2501

I am using emu8086. I am trying to define a string like "I don't "listen" to radio".
When I use either of the following:

mystr db "I don't ""listen"" to radio"

mystr db 'I don"t "listen" to radio'

and try to print mystr, it prints either of the following, respectively:

I don't ""listen"" to radio

I don"t "listen" to radio

which is not what I want (I don't "listen" to radio). So, how can I define such a string?

2 Answers

In NASM you can use single quotes for strings with embedded double quotes (and vise versa):

mystr db "I don't ", '"listen" to radio'
Related