这个虽然能运行,但无论我设定的字符串S1,S2是否相同,它总显示相同,
哪位帮改一下阿
SSEG SEGMENT STACK
STK DB 20 DUP(0)
SSEG ENDS
DSEG SEGMENT
A1 DB 'MATCH$'
A2 DB 'NO MATCH$'
S1 DB 'abcdufg'
DSEG ENDS
ESEG SEGMENT
S2 DB 'ABCDEFG'
ESEG ENDS
CSEG SEGMENT 'CODE'
ASSUME DS:DSEG,CS:CSEG,ES:ESEG
ASSUME SS:SSEG
START: MOV AX,DSEG
MOV DS,AX
MOV AX,ESEG
MOV ES,AX
MOV AX,SSEG
MOV SS,AX
MOV SP,SIZE STK
AGAIN: MOV SI,OFFSET S1
MOV DI,OFFSET S2
MOV CX,7
CLD
REPZ CMPSB
JZ CA
MOV AH,9
LEA DX,A1
INT 21H
JMP ENDA
CA: MOV AH,9
LEA DX,A2
INT 21H
ENDA: MOV AH,4CH
INT 21H
CSEG ENDS
END START