Assembly Level Programming to read a string and display it in lowercase (8086 MP)

Assembly Level Programming to read a string and display it in lowercase




.model small
.data
 str db 100 dup (?)
.code
 main proc
  mov ax,@data
  mov ds,ax
  mov si,offset str
 
  INPUT:mov ah,1
        int 21h
        cmp al,13
        je LAST
        cmp al,60h
        jc SMALLCASE
        mov [si],al
        inc si
        jmp INPUT

  SMALLCASE:mov [si],al
            XOR [si],32
            inc si
            jmp INPUT

  LAST: mov [si],'$'
  mov dx,offset str
        mov ah,09
        int 21h
        mov ah,4ch
        int 21h
 main endp
end