Here are your specific issues:
- You specify
msgtwice (a86 will be barf on this). - You call int21 fn9 with the same msg value so that you do not print two messages, but only two copies of the first.
- You do not have a newline character in any message so that they abut against each other, rather than on separate lines.
( ).
msg2.msg2 dx int21 .- , '$' (, , ).
: - , . , . , :
jmp start ; This will start the program
msg db "Hello Word.",0a,"$" ; A string variable .
msg2 db "Michael J. Crawley$" ; A string variable with a value.
start: mov ah,09 ; subfunction 9 output a string
mov dx,offset msg ; DX for the string
int 21h ; Output the message
mov dx,offset msg2 ; DX for the string
int 21h ; Output the message
exit:
mov ah,4ch
mov al,00 ; Exit code
int 21h ; End program
:
Hello Word.
Michael J. Crawley