NASM - The Netwide Assembler

NASM Forum => Programming with NASM => Topic started by: dukester on February 02, 2015, 09:01:38 PM

Title: Having trouble getting `cr' to render on screen - SOLVED
Post by: dukester on February 02, 2015, 09:01:38 PM
Hey ...

Newbie to assembly - not programming!
Trying to work through `Hello world' proggie. Assembles and links OK!

CR/LF don't want to show up!

My sandbox is latest Lubuntu on VMware on top of a win7 box.

Hello World! <my prompt>

instead of

Hello World!
<my prompt>

Terminal issue?  Or did I blow it somewhere? TIA ...
Title: Re: Having trouble getting `cr' to render on screen
Post by: sebastiencs on February 02, 2015, 10:11:53 PM
I suppose you're also newbie on Unix system.
To mark a newline on Unix you have to use '\n', 0xA
Title: Re: Having trouble getting `cr' to render on screen - SOLVED
Post by: dukester on February 02, 2015, 10:53:55 PM
Nope! Been using Freebsd/linux since the late '80s.  8)

I added:

msg_len  equ $ - msg

and then:

mov edx,  msg_len

to let the assembler figure out the correct length

and now all's well!

Thx for the input!