MATCH".编译能通过,但结果不对,有乱码。
DATA SEGMENT
TONG DB 'MATCH$'
BUTG DB 'NO MATCH$'
STR1 DB 'STRING1'
STR2 DB 'STRING2'
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV CX,7
LEA SI,STR1
MOV DI,OFFSET STR2
REP CMPSB
JNZ NOMATCH
MATCH:
MOV DX,OFFSET TONG
MOV AH,09H
INT 21H
JMP OK
NOMATCH:
MOV DX,OFFSET BUTG
MOV AH,09H
INT 21H
OK:
MOV AH,4CH
INT 21H
RET
CODE ENDS