Home > other >  Caps, the input error display err input. The output regardless of right or wrong there are always er
Caps, the input error display err input. The output regardless of right or wrong there are always er

Time:10-12

The DATA SEGMENT
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:

reference 1/f, zara's reply:
ERR: front is normal execution, but also ran to ERR: here, so always show ERR INPUT; Can before ERR: add a JMP instruction to jump to the mov ah, 4 ch,

Thank you big????????
There is a problem, the input and output of letters how to making a career change?