Readstr proc strname:DWORD
LOCAL szLinkBuff[256]:BYTE
invoke RtlZeroMemory,addr szLinkBuff,sizeof szLinkBuff
mov edi,strname
.while byte ptr [edi]
invoke RtlZeroMemory,addr szLinkBuff,sizeof szLinkBuff
lea esi, szLinkBuff
.while byte ptr [edi] != ","
xor eax,eax
mov al,byte ptr [edi]
mov [esi],al
inc esi
inc edi
.endw
invoke lstrcpy,addr buffer2, addr szLinkBuff
inc edi
.endw
ret
Readstr endp
执行完这段,为什么会退出整个程序
------解决思路----------------------
.while byte ptr [edi] != "," && byte ptr [edi] != "0"
; 上面的 !="0" 应该是 != 0 吧。字符串结束标记不是字符 '0' 而是字节 00h