Logo 
Search:

Assembly Language Articles

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

PROGRAM TO CONVERT UPPPERCASE TO LOWERCASE

Posted By: Ashton Evans     Category: Assembly Language     Views: 3015

WRITE A PROGRAM TO CONVERT UPPPERCASE TO LOWERCASE.

Code for PROGRAM TO CONVERT UPPPERCASE TO LOWERCASE in Assembly Language

READ MACRO MSG
    MOV AH,0AH
    LEA DX,MSG
    INT 21H
ENDM

PRINT MACRO MSG
    MOV AH,09H
    LEA DX,MSG
    INT 21H
ENDM

DATA SEGMENT
    CR EQU 0DH
    LF EQU 0AH
    MSG1 DB "ENTER THE STRING IN UPPERCASE:$"
    MSG2 DB CR,LF,"THE LOWERCASE STRING IS :$"
    BUFF DB 255
              DB 0
              DB 255 DUP('$')
DATA ENDS
    
CODE SEGMENT
    ASSUME CS:CODE,DS:DATA
START:    MOV AX,DATA
    MOV DS,AX
    PRINT MSG1
    READ BUFF
    MOV AI,OFFSET BUFF+2
    MOV CL,BYTEPTR[SI-1]
    MOV CH,00H

LP2:    MOV AL,[SI]
    CMP AL,41H
    JB LP1
    CMP AL,5BH
    JNB LP1
    ADD AL,20H    
MOV [SI],AL
LP1:    INC SI
    LOOP LP2
    PRINT MSG2
    PRINT BUFF+2
    MOV  AH,4CH
    INT 21H
CODE ENDS
END START
  
Share: 


Didn't find what you were looking for? Find more on PROGRAM TO CONVERT UPPPERCASE TO LOWERCASE Or get search suggestion and latest updates.

Ashton Evans
Ashton Evans author of PROGRAM TO CONVERT UPPPERCASE TO LOWERCASE is from London, United Kingdom.
 
View All Articles

 

Other Interesting Articles in Assembly Language:


 
Please enter your Comment

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

 
No Comment Found, Be the First to post comment!