Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

A new line in assembly (EASY)

Posted on 2003-03-28
5
Medium Priority
?
753 Views
Last Modified: 2006-11-17
How do you create a new line in assembley?
0
Comment
Question by:IanWillo
3 Comments
 
LVL 7

Accepted Solution

by:
billious earned 80 total points
ID: 8229295
NEWLINE:
  DB  0DH,0AH
  DB '$'

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

...Bill
0
 

Expert Comment

by:GooZ
ID: 8232327
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
 

Expert Comment

by:sherifrofael
ID: 8274642
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

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This applies to Dell but may also apply to other manufacturers as well. We ran across a few machines that just dropped recently it trust relationship with the server. After doing the basic removing and joining the domain again, it changed to No logo…
The number of companies understanding the potential of IoT on B2B market is growing with each day. And yet only a small share of IoT developers have managed to equalize incomes and stay competitive in the international market.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question