data segment
value db 'SanjaY', '$'
v_size dw $-value
val db 7 dup (?)
upper db 40h
lower db 60h
data ends
code segment
assume cs:code, ds:data
begin:
mov ax, data
mov ds, ax
mov es, ax
lea si, value
lea di, val
mov cx, v_size
dec cx
mov ah, 09h
lea dx, valueint 21h
counter:
mov al, [si]
cmp al, lower
jg ltou_case
jmp utol_case
ltou_case:
sub al, 20h
mov [di], al
inc si
inc di
dec cx
jnz counter
jmp exit
utol_case:
add al, 20h
mov [di], al
inc si
inc di
dec cx
jnz counter
exit:
mov [di], '$'
mov ah, 09h
lea dx, val
int 21h
mov ax, 4c00h
int 21h
code ends
end begin