A new line in assembly (EASY)

How do you create a new line in assembley?
IanWilloAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

billiousCommented:
NEWLINE:
  DB  0DH,0AH
  DB '$'

  MOV DX,OFFSET NEWLINE
  MOV AH,9
  INT 21H

...Bill
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GooZCommented:
You have to know that a new line is basicly coded on two bytes: One is $0D (13) and the other $0A. But only the $0A part is needed in linuxs systems.
In assembly, just go to the end of ur string, and add the two char #13 and #10, (mov word [UrStr], 0A0D or mov byte [UrStr], 0A)

GooZ
0
sherifrofaelCommented:
MOV DX,12 ; place any value on screen
MOV AH,2 ; cont.
INT 21H  ; cont.

; creating a new line but writing 10d or Ah to screen
MOV DX,10
MOV AH,2
INT 21H

;write any thing to screen , u will see that it is a new line
MOV AH,1
INT 21H


regards,

sherif rofael.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Assembly

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.