0
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.

2
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by tformed
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$'

Edited by thines01: added code

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.