Author Topic: Having trouble getting `cr' to render on screen - SOLVED  (Read 3571 times)

Offline dukester

  • Jr. Member
  • *
  • Posts: 2
Having trouble getting `cr' to render on screen - SOLVED
« 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 ...
« Last Edit: February 03, 2015, 04:59:25 PM by dukester »

Offline sebastiencs

  • New Member
  • Posts: 1
Re: Having trouble getting `cr' to render on screen
« Reply #1 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

Offline dukester

  • Jr. Member
  • *
  • Posts: 2
Re: Having trouble getting `cr' to render on screen - SOLVED
« Reply #2 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!


 

SMF spam blocked by CleanTalk