Logo 
Search:

Assembly Language Articles

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

Program to get the message and print the message five times

Posted By: Bradley Evans     Category: Assembly Language     Views: 5692

Write a program to get the message and print the message five times.

Code for Program to get the message and print the message five times in Assembly Language

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

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

        MOV AX,DATA
        MOV DS,AX

        LEA SI,STR2
        MOV CL,N

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

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


    L1: 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

        LOOP L1
        
        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: 



Bradley Evans
Bradley Evans author of Program to get the message and print the message five times 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!