Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Assembly Language Programming (ALP) Forum (http://www.go4expert.com/forums/assembly-language-programming-forum/)
-   -   Very simplest code, takes string as input in upper case and result it in lower case (http://www.go4expert.com/forums/simplest-code-takes-string-input-upper-t29796/)

Shayaan_Mustafa 3Sep2013 14:48

Very simplest code, takes string as input in upper case and result it in lower case
 
Hello experts!

I am trying to making a program which takes string as input in upper case and give result in lower case.

First, I wrote a program which takes a letter as input in upper case and give result in lower case.
Here is that program,
Code:

.model small
.stack 32h
.code
mov ah,08
int 21h
add al,20h
mov dl,al
mov ah,02h
int 21h
mov ah,4ch
int 21h
end

Now I want to write a program which takes string as input in upper case and give output the same string as lower case,
Here is what I did so far,
Code:

.model small
.stack 100h
.data
string db 20
.code
mov ax,@data
mov ds,ax
mov dx,offset string
mov ah,0ah
int 21h
mov ah,4ch
int 21h
end

In the second code, I have written a program which takes input in any case. But what should I do now to convert it in lower case?

NOTE: I am using MASM v6.11 and using windows 7. Intel assembly Language

Thank you


All times are GMT +5.5. The time now is 04:38.