Logo 
Search:

Assembly Language Articles

Submit Article
Home » Articles » Assembly Language » Homework HelpRSS Feeds

TO CONVERT A STRING INTO UPPER CASE TO LOWERCASE

Posted By: Ava Campbell     Category: Assembly Language     Views: 12924

TO CONVERT A STRING INTO UPPER CASE TO LOWERCASE.

Code for TO CONVERT A STRING INTO UPPER CASE TO LOWERCASE in Assembly Language

        .MODEL SMALL
        .DATA

                MSG  DB  0DH,0AH, ' ENTER THE STRING :-----> :  $'
                MSG2 DB  0DH,0AH, ' YOUR STRING IS  :-----> :  $'
                STR1 DB  255 DUP(?)
                ONE  DB ?
                TWO  DB ?
          .CODE

BEGIN:
          MOV AX,@DATA
          MOV DS,AX

          LEA DX,MSG
          MOV AH,09H
          INT 21H

          LEA SI,STR1
          MOV AH,01H

READ:
          INT 21H
          MOV BL,AL

          CMP AL,0DH
          JE  DISPLAY

          XOR AL,20H
          MOV [SI],AL
          INC SI

          ;CMP BL,0DH
          JMP READ
          


DISPLAY:

          MOV AL,'$'
          MOV [SI],AL

          LEA DX,MSG2
          MOV AH,09H
          INT 21H


          LEA DX,STR1
          MOV AH,09H
          INT 21H



         ; MOV AH,4CH
         ; INT 21H
          .EXIT



END BEGIN 

;**********************************OUTPUT******************************
;ENTER THE STRING :-----> SAMIR
;YOUR STRING IS  :-----> samir
  
Share: 


Didn't find what you were looking for? Find more on TO CONVERT A STRING INTO UPPER CASE TO LOWERCASE Or get search suggestion and latest updates.

Ava Campbell
Ava Campbell author of TO CONVERT A STRING INTO UPPER CASE TO LOWERCASE is from Toronto, Canada.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
Elmer Turla from Philippines Comment on: Oct 04
Hi can i ask.
How is this.
Enter string : Elmer Turla
Converted into uppercase : ELMER TURLA
Coverted into lowercase:elmer turla
Orginal string :Elmer Turla

Pls help

View All Comments