x86 - Assembly code to print a new line string -
i have assembly code print (display) string. problem i'm not able how print 2 string different line!
.model small .stack 100h .data msg1 db 'fun $' msg2 db 'day!$' .code main proc mov ax, @data mov ds, ax lea dx,msg1 mov ah,9 lea dx,msg2 mov ah,9 int 21h mov ah,4ch int 21h main endp end main
the output should like:
fun day!
but in result:
day!
help me!
you missing int 21h
call first part, that's why second printed. 2 lines, append cr lf string. can print whole thing @ once, such as:
.model small .stack 100h .data msg db 'fun', 10, 13, 'day!$' .code main proc mov ax, @data mov ds, ax lea dx,msg mov ah,9 int 21h mov ah,4ch int 21h main endp end main
Comments
Post a Comment