但为什么非要这两句?不是在ASSUME语句中已经给DS分配了吗?
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 AX,DATA
MOV DS,AX
MOV SI,OFFSET STR1
MOV DI,OFFSET STR2
MOV CX,07H
CLD
REPZ 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
END START