20 likes | 152 Vues
This program demonstrates how to display a string, word, or sentence using assembly language with direct addressing. The core algorithm involves storing the value '9' into the AH register and the address of the string data into the DX register. The program then uses interrupt 21h to display the string, followed by interrupt 20h to terminate the program. An example program shows the steps in code, illustrating the data flow and the necessary instructions to produce the output.
E N D
Prog.-(3)* Write a program to display string, word or sentence. • Algorithm steps • Store 9 into AH • Store OFFSET ADDRESS Into DX • Display to DX Register • End Start AH=9 DX=address of string data OUTPUT STRING DATA End
Example Program Direct Addressing B26:0100 MOV AH,9 B26:0102 MOV DX,0109 B26:0105 INT 21 B26:0107 INT 20 B26:0109dw ‘Aligarh Institute $’