TITLE Comparing Strings
INCLUDE Irvine32.inc
.data
source BYTE "MARTIN "
dest BYTE "MARTINEZ"
str1 BYTE "Source is smaller",0dh,0ah,0
str2 BYTE "Source is not smaller",0ah,0dh,0
.code
main PROC
cld
mov esi,offset source
mov edi,offset dest
mov cx,lengthof source
repe cmpsb
jb source_smaller
mov edx,offset str2
jmp done
source_smaller:
mov edx,offset str1
done:
call WriteString
exit
main endp
end main
Comparing Strings
最新推荐文章于 2021-03-21 23:21:07 发布