试编写一程序,从键盘上输入一个字符,如果该字符为Y,则显示"MATCH”,若不是Y,则显示"NOMATCH"。
DATA SEGMENT STRING1 DB ‘MATCH’ STRING2 DB ‘NOMATCH’ DATA ENDS CODE SEGMENT ASSUME CS:CODE,DS:DATA START: MOV AX,DATA MOV DS,AX MOV AH,01H INT 21H CMP AL,‘Y’ JNZ NEXT MOV AH,O9H LEA DX,STRING1 INT 21H JMP EXITO NEXT: MOV AH,09H LEA DX,STRING2 INT 21H EXIT0: MOV AH,4CH INT 21H CODE: ENDS END START