Tuesday, June 19, 2018

8086 Program To Print Text In Assembly

for code explanation please follow how to print text in 8086 assembly code. Thanks



; CODE BEGINS

TITLE TEXT_MESSAGE 
.MODEL SMALL 
.STACK 100H 
.DATA 
 
    MSG DB 0AH, 0DH, "TEXT MESSAGE$" 
.CODE 
    MAIN: 
        MOV AX, @DATA 
        MOV DS, AX 
         
        MOV DX, OFFSET MSG 
        MOV AH, 09H 
        INT 21H        
         
  ;     LEA DX, MSG 
  ;     MOV AH, 09H 
  ;     INT 21H 
         
         
         
         
         
    EXIT:     
        MOV AH, 04CH 
        INT 21H 
    END MAIN 
; CODE ENDS

Following is the output of the program

Output of assembly program which show how the text or character string can be printed in assembly language

No comments:

Complete Video Tutorials