ERR MSG DB 'INPUT', 0 dh, 0 ah, '$'
The DATA ENDS
CODE SEGMENT
ASSUME the DS: DATA, CS: CODE
START:
MOV AX, DATA
MOV DS, AX
MOV AH, 01 h
INT 21 h
CMP AL, 'A'
JB ERR
CMP AL, 'Z'
JA ONE
The ADD AL, 20 h
JMP TWO
ONE: CMP AL, 'a'
JB ERR
CMP AL, 'z'
JA ERR
SUB AL, 20 h
JMP TWO
TWO: MOV DL, AL
MOV AH, 02 h
INT 21 h
MOV DL, ah 0
MOV AH, 02 h
INT 21 h
Dh MOV DL, 0
MOV AH, 02 h
INT 21 h
ERR: MOV DX, OFFSET MSG
MOV AH, 09 h
INT 21 h
MOV AH, 4 ch
INT 21 h
CODE ENDS
The END START
CodePudding user response:
ERR: front is normal, but also ran to ERR: here, so always show ERR INPUT; Can before ERR: add a JMP instruction behind the jump to mov ah, 4 ch,CodePudding user response: