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?
Assemblers differ in how they treat embedded special characters like quotation marks, but the ASCII code comes to the rescue.
When a string you need to define has some difficult characters in it, you can always replace these by their ASCII codes. The double quotation mark has 34 for its ASCII code.
mystr db "I don't ", 34, "listen", 34, " to radio"
This will output:
I don't "listen" to radio
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With