编写一段程序,比较两个5字节的字符串OLDS和NEWS,若相同,在RESULT 置0,否则置0FFH。
DATA SEGMENT
OLDS DB 1,2,3,4,5
NEWS DB 1,2,3,6,8
RESULT DB ?
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START: MOV AX,DATA
MOV DS,AX
LEA SI,OLDS
LEA DI,NEWS
CLD
REPE CMPSB
JNZ AA
MOV AL,0
JMP OUTPUT
AA: MOV AL,0FFH
OUTPUT: MOV RESULT,AL
CODE ENDS
END START