The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => The Orphanage => Topic started by: djidji on May 31, 2005, 08:54:05 PM

Title: help with mov command
Post by: djidji on May 31, 2005, 08:54:05 PM
two things:

what does mov 0xfffffff0(%ebp), %eax do?
and
what does mov (%eax), %eax do?

i do understand some basics of the mov command but only it it's simplest form: mov %ebp, %eax

thanks,

seriously clueless
Title: Re: help with mov command
Post by: realcr on May 31, 2005, 09:19:31 PM
What kind of assembly language is that? I can't recognize it..

realcr.
Title: Re: help with mov command
Post by: MichaelW on June 01, 2005, 12:10:26 AM
The code looks like GAS (AT&T) syntax, so these statements:

mov 0xfffffff0(%ebp), %eax
mov (%eax), %eax

Should be equivalent to these statements in MASM (Intel) syntax:

mov eax, [ebp-16]
mov eax, [eax]

http://www.delorie.com/djgpp/faq/converting/asm.html

Title: Re: help with mov command
Post by: djidji on June 01, 2005, 12:47:57 AM
this is something i am running on my IBM ThinkPad so it's on Intel processor running uder Fedora Core III. to be hones, i am not trying to write any code it's just that when i use gdb to dissasamble a program that's the code i get. so all i am trying to do is understand what is going on... any other suggestions? by the way, thanks for responses.
Title: Re: help with mov command
Post by: pbrennick on June 01, 2005, 12:59:47 AM
djidji,
You are disassembling a Linux program and asking a question about the result on a Windows forum.  This is mixing tangerines and oranges.  I don't think we will be able to help you as much as the help you would get from a Linux based forum.  You can try, though, and we will try to help.

Paul
Title: Re: help with mov command
Post by: djidji on June 01, 2005, 03:22:27 AM
Quote from: pbrennick on June 01, 2005, 12:59:47 AM
djidji,
You are disassembling a Linux program and asking a question about the result on a Windows forum.  This is mixing tangerines and oranges.  I don't think we will be able to help you as much as the help you would get from a Linux based forum.  You can try, though, and we will try to help.

Paul

i see... all right, i though that assembler is more architecture specific than it is operating system specific but that just shows how much i know about it. in any case i appreciate the help.