TITLE LOWER TO UPPERCASE
.MODEL SMALL
.STACK 64
.DATA
MAXCHR DB 20
ACTCHR DB ?
ACTSTR DB 20 DUP(?)
RESULT DB 20 DUP(?)
.CODE
MAIN PROC FAR
MOV AX,@DATA
MOV DS,AX
MOV DX,OFFSET MAXCHR
MOV AH,0AH
INT 21H
LEA SI,ACTSTR
LEA DI,RESULT
MOV CX,0000H
MOV BX,0000H
LEA BX,ACTCHR
MOV CX,[BX]
L2:
MOV AL,[SI]
CMP AL,61H
JB L1
CMP AL,7AH
JA L1
SUB AL,20H
L1:
MOV [DI],AL
INC SI
INC DI
LOOP L2
MOV DL,0AH
MOV AH,02H
INT 21H
LEA DX,RESULT
MOV AH,09H
INT 21H
MOV AX,4C00H
INT 21H
MAIN ENDP
END MAIN
.MODEL SMALL
.STACK 64
.DATA
MAXCHR DB 20
ACTCHR DB ?
ACTSTR DB 20 DUP(?)
RESULT DB 20 DUP(?)
.CODE
MAIN PROC FAR
MOV AX,@DATA
MOV DS,AX
MOV DX,OFFSET MAXCHR
MOV AH,0AH
INT 21H
LEA SI,ACTSTR
LEA DI,RESULT
MOV CX,0000H
MOV BX,0000H
LEA BX,ACTCHR
MOV CX,[BX]
L2:
MOV AL,[SI]
CMP AL,61H
JB L1
CMP AL,7AH
JA L1
SUB AL,20H
L1:
MOV [DI],AL
INC SI
INC DI
LOOP L2
MOV DL,0AH
MOV AH,02H
INT 21H
LEA DX,RESULT
MOV AH,09H
INT 21H
MOV AX,4C00H
INT 21H
MAIN ENDP
END MAIN