Re: Hello World assembly language

2011-09-29 Thread Colin Barnabas
Thank you to all who responded. I changed the 13 to 14 so as to include the new line and that sorted everything out. Oddly, however, while I was using bash, the shell still returned on the same line as the output even after the fix. It was not until after I switched shells that things worked out pr

Re: Hello World assembly language

2011-09-29 Thread Achim Patzner
Am 29.09.2011 um 03:03 schrieb Greg 'groggy' Lehey: >> Add a 0x0d to the end of the string (0xa = LF, 0xd = CR) > > No, that is a Microsoftism. UNIX doesn't use \r to terminate a line. No, actually that's a teletype thing and predates Microsoft. And not a problem of line termination. Achim

Re: Hello World assembly language

2011-09-28 Thread Aldis Berjoza
On Wed, 28 Sep 2011 13:26:47 -0700 Colin Barnabas wrote: > I found a hello world program written in assembly language which > runs on my amd64 8.2 stable box. However, I can not seem to get > it to print a new line. Any suggestions on how to print a line > feed in assembly? You need to write 0xA

Re: Hello World assembly language

2011-09-28 Thread Nate Dobbs
Alter the stuff in red, the message will print irrespective of your `message' length. Change 13 to 14. section .data message: db 'hello, world!', 0x0a message_len equ $-message section .text global _start _start: mov rax, 4 mov rdi, 1 mov rsi, message mov rdx, *message

Re: Hello World assembly language

2011-09-28 Thread Duane Hill
On Wed, Sep 28, 2011 at 8:26 PM, Colin Barnabas wrote: > I found a hello world program written in assembly language which > runs on my amd64 8.2 stable box. However, I can not seem to get > it to print a new line. Any suggestions on how to print a line > feed in assembly? > > Here is the code- >

Re: Hello World assembly language

2011-09-28 Thread Ryan Stone
On Wed, Sep 28, 2011 at 4:26 PM, Colin Barnabas wrote: > I found a hello world program written in assembly language which > runs on my amd64 8.2 stable box. However, I can not seem to get > it to print a new line. Any suggestions on how to print a line > feed in assembly? > > Here is the code- > >

RE: Hello World assembly language

2011-09-28 Thread Andrew Duane
Add a 0x0d to the end of the string (0xa = LF, 0xd = CR)  ... Andrew Duane Juniper Networks o   +1 978 589 0551 m  +1 603-770-7088 adu...@juniper.net   > -Original Message- > From: owner-freebsd-hack...@freebsd.org [mailto:owner-freebsd- > hack...@freebsd.

Re: Hello World assembly language

2011-09-28 Thread Doug Barton
On 09/28/2011 13:26, Colin Barnabas wrote: > I found a hello world program written in assembly language which > runs on my amd64 8.2 stable box. However, I can not seem to get > it to print a new line. Any suggestions on how to print a line > feed in assembly? No, we will not help you do your comp