These codes convert uppercase letters ("letters only") to lowercase letters and lowercase letters to uppercase. My question is that I want to print them as well and keep them unchanged, if any (non-verbal symbols and actors). With the cmp and ... commands that you see in the program
data segment
; add your data here!
ar db "haP!y bi3Rthday$"
ends
stack segment
dw 128 dup(0)
ends
code segment
start:
; set segment registers:
mov ax, data
mov ds, ax
mov es, ax
; add your code here
mov si,0
mov ah,01
int 21h
cmp al,"c"
je c
cmp al,"l"
je l
jmp exit
c:cmp ar[si],"$"
je exit
cmp ar[si],96
jl c2
sub ar[si],32
c2:inc si
jmp c
l: cmp ar[si],"$"
je exit
cmp ar[si],96
jg l2
add ar[si],32
l2:inc si
jmp l
exit:lea dx,ar
mov ah,09
int 21h
mov ax, 4c00h ; exit to operating system.
int 21h
ends
end start ; set entry point and stop the assembler.