954,479 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to Break Line in Assembly? - Using NASM



org 0100h

mov dx, msg
mov ah, 09h
int 21h
mov ah, 4ch
int 21h
msg db 'Hello Wold! \nThis is my first program using Assembly', '$'

Hi guys,

I'm learning Assembly Programming using NASM and had a question. Would it be possible to break lines in Assembly?

Say for instance I would like to display the line above as. Hello World!

This is my
first program
using Assembly

Thanks in advance for the help.

tformed
Junior Poster in Training
58 posts since May 2007
Reputation Points: 21
Solved Threads: 1
 

Yes, insert 0ah where you want the line to break.

org 0100h

mov dx, msg
mov ah, 09h
int 21h
mov ah, 4ch
int 21h
msg: db 'Hello World!',0ah,0ah,'This is my',0ah,'first program',0ah,'using Assembly$'
thines01
Postaholic
Team Colleague
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
 

Thank you thines01 :D

tformed
Junior Poster in Training
58 posts since May 2007
Reputation Points: 21
Solved Threads: 1
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You