Re: how to print a new line?
Quote:
Originally Posted by RedDevil
Hi guys!
Im starting off with a super simple program that prints only words on the screen. I want to print 2 words and seperate each word in another line. The command for c is "\n" and im not sure what is the command for assembly. What is the command for printing a new line? I'll paste part of my code here...
Code:
mov ah,09h
mov dx,offset hello_message
int 21h
mov ah,09h
mov dx,offset hello_message2
int 21h
Thanks!
look up the asci code =)
hint below umm lets say 30
Re: how to print a new line?
Quote:
Originally Posted by Maven
look up the asci code =)
hint below umm lets say 30
I have no idea what are you trying to say Maven >_<! I'm still learning very slowly.
Re: how to print a new line?
Quote:
Originally Posted by RedDevil
I have no idea what are you trying to say Maven >_<! I'm still learning very slowly.
You would print 0DH to screen.
You could also use it in you're variable like:
myvar db "Some message", 0DH
Re: how to print a new line?
Quote:
Originally Posted by Maven
You would print 0DH to screen.
You could also use it in you're variable like:
myvar db "Some message", 0DH
0DH which is 13 in ascii, is the number for the newline charecter. Print it to screen anytime you want to have a newline.
Re: how to print a new line?
Don't you need both char 13 and 10? (i'm a n00b at ASM myself :))
13 is CR (Carriage Return)
10 is LF (Line Feed)