?
Solved

A new line in assembly (EASY)

Posted on 2003-03-28
5
Medium Priority
?
746 Views
Last Modified: 2006-11-17
How do you create a new line in assembley?
0
Comment
Question by:IanWillo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

What's worse than having your data encrypted by ransomware? Getting attacked by a so-called "wiper," which simply destroys the data and offers you no hope of ever seeing it again.
If you're a modern-day technology professional, you may be wondering if certifications are really necessary. They are. Here's why.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month12 days, 18 hours left to enroll

777 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