大家看一下这个_要比较两个字符串是否相同_的程序错在哪里?
哪位帮我看一下这个_要比较两个字符串是否相同_的程序错在哪里?DATA SEGMENT
STR1 DB 'Please enter a string:',0DH,0AH, '$'
STR2 DB 'Please enter the other string:',0DH,0AH, '$'
STR3 DB 'MATCH'
STR4 DB 'NOMATCH'
BUFFER1 DB 100 DUP(?)
BUFFER2 DB 100 DUP(?)
DATA ENDS
STACK SEGMENT STACK
DB 100 DUP(?)
STACK ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA, SS:STACK
COMPARE PROC FAR
START: PUSH DS
MOV AX,0
PUSH AX
MOV AX , DATA
MOV DS , AX
LEA DX ,STR1
MOV AH,09
INT 21H
LEA DX,BUFFER1
MOV AH,0AH
INT 21H
MOV SI,DX
INC SI
MOV BL,[SI]
MOV BH,0
INC SI
LEA DX ,STR2
MOV AH,09
INT 21H
LEA DX,BUFFER2
MOV AH,0AH
INT 21H
MOV DI,DX
INC DI
MOV DL,[DI]
MOV DH,0
INC DI
CMP DX,BX
JE GOON
JMP EXIT
GOON: CLD
PUSH BX
MOV AL,[SI]
MOV BL,[DI]
CMP AL,BL
JNE EXIT
POP BX
CMP BX,DI
JE OK
INC SI
INC DI
JMP GOON
OK: LEA DX,STR3
MOV AH,09
INT 21H
RET
EXIT: LEA DX,STR4
MOV AH,09
INT 21H
RET
COMPARE ENDP
CODE ENDS
END START