我得不到正确的结果
请帮我看看,错在哪里。
谢谢!
dseg segment
string1 db 'input string1: $'
string2 db 0ah,0dh,'input string2: $'
mess1 db 'match$'
mess2 db 'no match$'
bufo1 db 80
db ?
db 81 dup (0)
dseg ends
eseg segment
bufo2 db 80
db ?
db 81 dup (0)
eseg ends
cseg segment
assume cs:cseg,ds:dseg,es:eseg
start:
mov ax,dseg
mov ds,ax
mov ax,eseg
mov es,ax
lea dx,string1
mov ah,9
int 21h
lea dx,bufo1
mov ah,10
int 21h
lea dx,string2
mov ah,9
int 21h
lea dx,bufo2
mov ah,10
int 21h
lea si,bufo1
lea di,bufo2
mov cl,[si+1]
cld
repz cmpsb
jz l1
jnz l2
l1:
lea dx,mess1
mov ah,9
int 21h
jmp exit
l2:
lea dx,mess2
mov ah,9
int 21h
exit :
mov ah,4ch
int 21h
cseg ends
end start
[此贴子已经被作者于2006-12-20 22:02:55编辑过]