.MODEL SMALL
.DATA
MSG DB "YOUR INPUT IS NOT 1-9!",24H
.CODE
.STARTUP
MOV AH,0
INT 16H
CMP AL,31H
JB ERROR
CMP CL,AL
SUB CL,30H
CYCLE:
MOV DL,7
MOV AH,09H
INT 21H
MOV AH,07H
INT 21H
LOOP CYCLE
JMP _EXIT
ERROR:
LEA DX,MSG
MOV AH,09H
INT 21H
MOV AH,07H
INT 21H
_EXIT:
.EXIT 0
END