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

Discussion in 'Assembly Language Programming (ALP) Forum' started by Shayaan_Mustafa, Sep 3, 2013.

  1. Shayaan_Mustafa

    Shayaan_Mustafa New Member

    Joined:
    Dec 25, 2010
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Still a student.
    Location:
    Karachi
    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
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice