读书人

关于string db #039;hello world!#039;,#039;$#039;中的

发布时间: 2012-02-28 13:06:35 作者: rapoo

关于string db 'hello world!','$'中的$
string db 'hello world!','$'
这里$是什么作用
为什么没有这个$的话
MOV AX,DATAS
MOV DS,AX
string db 'hello world!','$'

mov ah,9
mov dx,seg string
mov ds,dx
mov dx,offset string
int 21h
MOV AH,4CH
INT 21H
这个运行时就会不正常输出结果


[解决办法]
'$' 代表字符串结束,相当c里的‘\0’

读书人网 >汇编语言

热点推荐