datasg segment para 'code' msg1 db 'Enter acapital leter string: ',"$" msg2 db 'The result string is: ',"$" strlist label byte max db 20 len db ? buffer db 20 dup(' ') dolar db '$' datasg ends codesg segment para 'code' main proc far assume ds:datasg,cs:codesg mov ax,datasg mov ds,ax mov ah,6h mov al,25 mov ch,0 mov cl,0 mov dh,24 mov dl,79 mov bh,7 int 10h mov ah,2h mov dh,10 mov dl,30 mov bh,0 int 10h lea dx,msg1 mov ah,9h int 21h mov ah,0ah lea dx,strlist int 21h lea bx,buffer mov cl,len mov ch,0 next: mov ah,[bx] cmp ah,41h jb p1 cmp ah,5ah ja p1 xor ah,00100000B mov [bx],ah p1: inc bx loop next mov ah,2h mov dh,12 mov dl,30 mov bh,0 int 10h mov ah,0 lea dx,msg2 mov ah,9h int 21h lea dx,buffer mov ah,9h int 21h mov ax,4c00h int 21h main endp codesg ends end main