把以下8*2的输入E退出的程序改成只剩下数字键的5*2的输入3166退出的程序
会的请帮帮忙 谢谢大侠 !!!!!
DATA SEGMENT
DA55 EQU 318H
DB55 EQU 319H
CTL EQU 31BH
TABLE DW 0101H,0102H,0104H,0108H,0110H,0120H,0140H,0180H
DW 0201H,0202H,0204H,0208H,0210H,0220H,0240H,0280H
DW 0401H,0402H,0404H,0408H
CHAR DB 'CDEFBA9845673210'
CRT DB 'PLAY ANY KEY IN THE SMALL KEYBOARD! ',0AH,0DH
DB 'IT WILL BE ON THE SCREEN! END WITH E',0AH,0DH,'$'
DATA ENDS
STACK SEGMENT PARA STACK 'STACK'
STA DW 50 DUP(?)
STACK ENDS
CODE SEGMENT
MAIN PROC FAR
ASSUME CS:CODE,DS:DATA
START: MOV AX,DATA
MOV DS,AX
MOV DX,OFFSET CRT
MOV AH,09
INT 21H
LOP: CALL KEY
CMP DL,'E'
JNZ LOP
MOV AX,4C00H
INT 21H
RET
MAIN ENDP
KEY PROC NEAR
LP1: MOV AL,82H
MOV DX,CTL
OUT DX,AL
WAIT1: MOV AL,00
MOV DX,DA55
OUT DX,AL
MOV DX,DB55
IN AL,DX
CMP AL,0FFH
JZ WAIT1
PUSH AX
PUSH AX
MOV CX,1000H
LP2: LOOP LP2
MOV DX,CTL
MOV AL,90H
OUT DX,AL
MOV DX,DB55
POP AX
OUT DX,AL
MOV DX,DA55
IN AL,DX
POP BX
MOV AH,BL
NOT AX
MOV SI,OFFSET TABLE
MOV DI,OFFSET CHAR
MOV CX,16
LP3: CMP AX,[SI]
JZ LP4
DEC CX
JZ LP1
ADD SI,2
INC DI
JMP LP3
LP4: MOV DL,[DI]
MOV AH,02
INT 21H
PUSH DX
MOV AL,82H
MOV DX,CTL
OUT DX,AL
WAIT2:MOV AL,00
MOV DX,DA55
OUT DX,AL
MOV DX,DB55
IN AL,DX
CMP AL,0FFH
JNZ WAIT2
POP DX
RET
KEY ENDP
CODE ENDS
END START