READ MACRO MSG
MOV AH,0AH
LEA DX,MSG
INT 21H
ENDM
PRINT MACRO MSG
MOV AH,09H
LEA DX,MSG
INT 21H
ENDM
DATA SEGMENT
CR EQU 0DH
LF EQU 0AH
MSG1 DB "ENTER THE STRING IN LOWERCASE:$"
MSG2 DB CR,LF,"THE UPPERCASE STRING IS :$"
BUFF DB 255
DB 0
DB 255 DUP ('$')
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START: MOV AX,DATA
MOV DS,AX
PRINT MSG1
READ BUFF
MOV SI,OFFSET BUFF+2
MOV CL,BYTEPTR[SI-1]
MOV CH,00H
LP1: MOV AH,[SI]
MOV AL,61H
JB LP1
CMP AL,7BH
JNB LP1
SUB AL,20H
MOV [SI],AL
LP2:
INC SI
LOOP SP1
PRINT MSG2
PRINT MSG2
PRINT BUFF+2
MOV AH,4CH
INT 21H
CODE ENDS
END START