Logo 
Search:

Assembly Language Articles

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

Program to get the message and print the same when enter key is pressed

Posted By: Corey Brown     Category: Assembly Language     Views: 3743

Write a program to get the message and print the same when enter key is pressed

Code for Program to get the message and print the same when enter key is pressed in Assembly Language

DATA SEGMENT
        STR1 DB "ENTER YOUR STRING HERE ->$"
        STR3 DB "YOUR STRING IS ->$"
        STR2 DB 80 DUP("$")
        NEWLINE DB 10,13,"$"
DATA ENDS

CODE SEGMENT
        ASSUME DS:DATA,CS:CODE
START:

        MOV AX,DATA
        MOV DS,AX

        LEA SI,STR2

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

        MOV AH,0AH
        MOV DX,SI
        INT 21H

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

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

        MOV AH,09H
        LEA DX,STR2+2
        INT 21H
        
        
        MOV AH,4CH
        INT 21H


CODE ENDS
END START

;OUTPUT:-
;Z:\SEM3\SS\21-30>p21
;ENTER YOUR STRING HERE ->jinesh
;YOUR STRING IS ->jinesh
  
Share: 



Corey Brown
Corey Brown author of Program to get the message and print the same when enter key is pressed is from London, United Kingdom.
 
View All Articles

 
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!