【发布时间】:2016-05-04 19:59:02
【问题描述】:
如何删除字符串中“?”之后的所有内容?到目前为止,我的代码搜索“?”。我该如何从那里着手?
这是我的代码。
INCLUDE Irvine32.inc
.data
source BYTE "Is this a string? Enter y for yes, and n for no",0
.code
main PROC
mov edi, OFFSET source
mov al, '?' ; search for ?
mov ecx, LENGTHOF source
cld
repne scasb ; repeat while not equal
jnz quit
dec edi ; edi points to ?
end main
【问题讨论】:
标签: assembly x86 masm masm32 irvine32