Re: Very newbie question...

Frederic Marmond <[email protected]>
Newsgroups org.kernel.vger.linux-assembly
Message-ID <[email protected]>
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 [email protected]
> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.