求看下这代码有什么问题
assume cs:code,ds:datadata segment
match db 'MATCH'
no_match db 'NO MATCH'
string1 db 'chenji'
string2 db 'string'
data ends
code segment
start:
mov ax,data
mov ds,ax
mov es,ax
mov cx,03h
loop_cmp:
cmpsw ds:[bx+0dh],es:[bx+13h]
jne reset2
add bx,02h
loop loop_cmp
reset1:
mov cx,05h
mov bx,0h
jmp loop_match
reset2:
mov cx,05h
mov bx,0h
jmp loop_no
loop_match:
mov dl,ds:[bx]
mov ah,02h
int 21h
inc bx
loop loop_match
jmp ok
loop_no:
mov dl,ds:[bx+05h]
mov ah,02h
int 21h
inc bx
loop loop_no
ok:
mov ax,4c00h
int 21h
code ends
end start
试编写一段程序,要求比较两个字符串string1和string2所含字符是否相等,如相等则显示“MATCH”, 若不相同则显示“NO MATCH”.
这段代码一直都只是输出MATCH,改变了string1和string2的内容还是只输出MATCH