MASM : How do you declare a string with carriage return?

天涯浪子 提交于 2019-12-08 11:26:37

问题


I would like to know if it is possible in MASM to write special character in string.

HelloWorld db "Hello World!\r\n", 0

Would be an intuitive way but it does not work. Thanks.


回答1:


The ASCII codes for CR and LF are 13 and 10, so:

HelloWorld db "Hello World!",13,10,0


来源:https://stackoverflow.com/questions/22090605/masm-how-do-you-declare-a-string-with-carriage-return

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!