本文介绍了汇编语言数据库问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



最近,我一直在学习某种汇编语言,我对汇编应用程序.Data段上的DB声明有疑问.

直到现在,我总是这样声明一个字节:

Hi,

Lately I have been Studying some Assembly language, I have a question about the DB Decleration on the .Data Segment of an Assembly Application.

Till Now, I always declared a Byte by doing So:

Number db "Please enter a number : ",0



(名称)db(字符串),0

今天,我找到了一个具有如下字符串声明的示例:



(Name) db (String), 0

Today, I found an example which had the String Declaration as Follows:

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



我对13、10有疑问.

谁能指出这些意思.

谢谢

安德鲁·伯格(Andrew Borg)



I Have a Question Regarding the 13, 10.

Can anybody point out what these mean.

Thank You,

Andrew Borg

推荐答案

char* Hello = "Hello World!\n";

不过,最好将它们声明为助记符,因此您可以使用可读的名称代替数字:

It is a good idea to declare these as mnemonics though, so you can use readable names instead of numbers:

Hello db "Hello World!", AS_CR, AS_LF, 0

(我可能不会将AS_NULL用作零,因为它很可能是字符串终止符,而不是一个要显示的字符)

(I probably wouldn''t use AS_NULL for the zero, as it would most likely be a string terminator, rather than a character to display)



这篇关于汇编语言数据库问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 15:57