Saturday, 26 August 2017

MASM PROGRAM TO DISPLAY "HELLO" (WITH ALGORITHM)


MASM PROGRAM TO DISPLAY "HELLO" (WITH ALGORITHM) 


AIM : TO DISPLAY HELLO

ALGORITHM :

STEP 1 : WRITE DATA SEGMENT

STEP 2 : MOVE DATA TO AX

STEP 3 : MOVE AX TO DS

STEP 4 : DISPLAY THE MESSAGE IN DS

STEP 5 : PROGRAM TERMINATES

STEP 6 : STOP


PROGRAM :

DATA SEGMENT
          MSG DB "HELLO$"
DATA ENDS
CODE SEGMENT
          ASSUME CS:CODE,DS:DATA
START:
          MOV AX,DATA
          MOV DS,AX
          LEA DX,MSG
          MOV AH,09H
          INT 21H
          MOV AH,4CH
          INT 21H
          CODE ENDS
END START


OUTPUT :

HELLO






No comments:

Post a Comment