linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Marmond <zebarbuc@free.fr>
To: Lorenzo <lollo_c@alice.it>
Cc: linux-assembly@vger.kernel.org
Subject: Re: Very newbie question...
Date: Sat, 12 Nov 2005 00:29:47 +0100	[thread overview]
Message-ID: <200511120029.48097.zebarbuc@free.fr> (raw)
In-Reply-To: <437523A4.6080707@alice.it>

Hi,
in amd64, registers are different (64bits...) ;)
So, I think you'd better use the 64 bits name version
push rbp
mov rbp,rsp
...

What do you have as result in your case?
can you try it with gdb and step your prog?

Fred

Le Samedi 12 Novembre 2005 00:05, Lorenzo a écrit :
> Hi,
>
> i have some problems with my first linux/nasm asm program.
> This is a simple "hello world" program but i can't see the "hello world"
> on my screen and i don't find my error.
> I work on 64bit amd system.
> Someone can illuminate me? :)
>
>
> Thx
>
> -----------------------------------
>
> section .text
>     global   _start
>
> msg   db   'hello, world!',0xa
> len   equ   $ - msg
>
> _start:
>     push   ebp
>     mov   ebp,esp
>
>     push   len
>     push   msg
>     push   1
>     mov   ebx,esp
>     mov   eax,4
>     int   0x80
>
>     add   esp,12
>
>     mov   ebx,0
>     mov   eax,1
>     int   0x80
> -
> To unsubscribe from this list: send the line "unsubscribe linux-assembly"
> in the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Frederic Marmond
-
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2005-11-11 23:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-11 23:05 Very newbie question Lorenzo
2005-11-11 23:16 ` John Rodriguez
2005-11-12  1:04   ` Brian Raiter
2005-11-12  7:35     ` Lorenzo
2005-11-12  7:34   ` Lorenzo
2005-11-11 23:29 ` Frederic Marmond [this message]
2005-11-12  7:35   ` Lorenzo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200511120029.48097.zebarbuc@free.fr \
    --to=zebarbuc@free.fr \
    --cc=linux-assembly@vger.kernel.org \
    --cc=lollo_c@alice.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).