|
-
Mar 12th, 2005, 01:21 AM
#1
Thread Starter
Lively Member
how to print a new line?
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!
Anime is what i LIVE for, BREATH for, and DIE for!
-
Mar 12th, 2005, 03:38 AM
#2
Hyperactive Member
Re: how to print a new line?
 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
Education is an admirable thing, but it is well to remember from time to time that nothing that is worth knowing can be taught. - Oscar Wilde
-
Mar 13th, 2005, 03:08 AM
#3
Thread Starter
Lively Member
Re: how to print a new line?
 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.
Anime is what i LIVE for, BREATH for, and DIE for!
-
Mar 13th, 2005, 09:49 AM
#4
Hyperactive Member
Re: how to print a new line?
 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
Education is an admirable thing, but it is well to remember from time to time that nothing that is worth knowing can be taught. - Oscar Wilde
-
Mar 13th, 2005, 09:50 AM
#5
Hyperactive Member
Re: how to print a new line?
 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.
Education is an admirable thing, but it is well to remember from time to time that nothing that is worth knowing can be taught. - Oscar Wilde
-
Oct 18th, 2005, 08:58 AM
#6
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)
I don't live here any more.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|