DATAS SEGMENT
STR1 DB 'ASDSA'
STR2 DB 'ASDSA'
MESG1 DB 'MATCH$'
MESG2 DB 'NOMATCH$';此处输入数据段代码
DATAS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS
START:
MOV AX,DATAS
MOV DS,AX
MOV SI,OFFSET STR1
MOV DI,OFFSET STR2
MOV CX,20
CLD
REPE CMPSB
JZ MATCH
LEA DX,MESG2
JMP DISPLAY
MATCH:
LEA DX,MESG1;此处输入代码段代码
DISPLAY:MOV AH,9
INT 21H
MOV AH,4CH
INT 21H
CODES ENDS
END START
STR1 DB 'ASDSA'
STR2 DB 'ASDSA'
MESG1 DB 'MATCH$'
MESG2 DB 'NOMATCH$';此处输入数据段代码
DATAS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS
START:
MOV AX,DATAS
MOV DS,AX
MOV SI,OFFSET STR1
MOV DI,OFFSET STR2
MOV CX,20
CLD
REPE CMPSB
JZ MATCH
LEA DX,MESG2
JMP DISPLAY
MATCH:
LEA DX,MESG1;此处输入代码段代码
DISPLAY:MOV AH,9
INT 21H
MOV AH,4CH
INT 21H
CODES ENDS
END START