Logo 
Search:

Assembly Language Articles

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

READ A STRING CHARACTOR BY CHARACTOR AND DISPLAY THE SAME STRING

Posted By: Ramon Fischer     Category: Assembly Language     Views: 5226

READ A STRING CHARACTOR BY CHARACTOR AND DISPLAY THE SAME STRING.

Code for READ A STRING CHARACTOR BY CHARACTOR AND DISPLAY THE SAME STRING 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 [SI],AL
          INC SI
          CMP AL,0DH
          JNE 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 B PATEL

;YOUR STRING IS  :-----> : SAMIR B PATEL
  
Share: 



Ramon Fischer
Ramon Fischer author of READ A STRING CHARACTOR BY CHARACTOR AND DISPLAY THE SAME STRING is from Frankfurt, Germany.
 
View All Articles

Related Articles and Code:


 

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!