Logo 
Search:

Assembly Language Articles

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

PROGRAM TO PRINT THE GIVEN MESSAGE FROM THE KEYBOARD

Posted By: Hildegarde Miller     Category: Assembly Language     Views: 2812

WRITE A PROGRAM TO PRINT THE GIVEN MESSAGE FROM THE KEYBOARD

Code for PROGRAM TO PRINT THE GIVEN MESSAGE FROM THE KEYBOARD in Assembly Language

DATA SEGMENT
     MES DB 10,13,'ENTER A STRING:$'
     BUF DB 255,256 DUP(0)
     MES1 DB 10,13,'THE MESSAGE IS $'
DATA ENDS

CODE SEGMENT
   ASSUME CS:CODE,DS:DATA

START:
           MOV AX,DATA
           MOV DS,AX                 
           MOV AH,09H                

           LEA DX,MES
           INT 21H

           MOV AH,0aH                
           LEA DX,BUF
           INT 21H

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

           LEA SI,BUF              
                                   
           MOV AX,0
           MOV AL,BYTE PTR[SI]       
           ADD SI,AX
           MOV BYTE PTR[SI+1],'$'    

           MOV AH,09H
           LEA DX,BUF+2
           INT 21H

           MOV AX,4C00H
           INT 21H

CODE ENDS


  END START
  
Share: 


Didn't find what you were looking for? Find more on PROGRAM TO PRINT THE GIVEN MESSAGE FROM THE KEYBOARD Or get search suggestion and latest updates.

Hildegarde Miller
Hildegarde Miller author of PROGRAM TO PRINT THE GIVEN MESSAGE FROM THE KEYBOARD is from Frankfurt, Germany.
 
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!