Single Character, String and Number Printing to
Display.
Write an assembly level program to print a given string .
- Create a string
- Load the effective address of the string in dx using LEA command
- Print the sting by calling the interrupt with 9H in AH
- The string must be terminated by ‘$’ sign
.MODEL SMALL .STACK 100H .DATA ;The string to be printed STRING DB 'Anando Nath Rabidas' , '$' .CODE MAIN PROC FAR MOV AX,@DATA MOV DS,AX ; load address of the string LEA DX,STRING ;output the string ;loaded in dx MOV AH,09H INT 21H ;interrupt to exit MOV AH,4CH INT 21H MAIN ENDP END MAIN |
Output: Anando Nath Rabidas