inline assembler error - porting Intel syntax to AT&T syntax

inline assembler error - porting Intel syntax to AT&T syntax

Post by Kei » Tue, 20 May 2003 12:44:30



// Intel syntax
void x( int *p ) {
  int example;
  __asm {
    mov esi, p
    mov  [ esi ], ebx
    mov [example], eax
   }

Quote:}

I'm porting the code to GCC, but got error

I couldn't access the data which *p points to, and got error like this:
    - error, undefined reference to `p'
I couldn't access varible example, and got error like this:
    - error, undefined  reference to `example'

and no error if it is a global varible

Can someone help me?

 
 
 

inline assembler error - porting Intel syntax to AT&T syntax

Post by Valentin Nechaye » Mon, 19 May 2003 20:21:12


K> // Intel syntax
K> void x( int *p ) {
K>   int example;
K>   __asm {
K>     mov esi, p
K>     mov  [ esi ], ebx
K>     mov [example], eax
K>    }
K> }

K> I'm porting the code to GCC, but got error

Show *what you wrote in ported code*, not your words about it.

K> I couldn't access the data which *p points to, and got error like this:
K>     - error, undefined reference to `p'

Don't print "like", show exact text of error message.

K> I couldn't access varible example, and got error like this:
K>     - error, undefined  reference to `example'
K> and no error if it is a global varible
K> Can someone help me?

http://www.tuxedo.org/~esr/faqs/smart-questions.html

-netch-

 
 
 

1. intel Syntax -> AT&T Syntax

hi
i got some problems with porting assemler code from windows nt to
linux (both x86 !!!). because of the different notation
windows : normal intel syntax
linux       : AT&T syntax
it is possible of course to rewrite the code in the new syntax but it
would be great if there is a tool witch can convert an Intel assembler
code to AT&T syntax assembler.
if anyone got some expirience with these syntax convertion or got some
cool ideas of solving these problem.
please E-Mail me  :


thx

2. gui diff tool for linux?

3. access.conf syntax error without a syntax error

4. Kernel compilation: no rule to make

5. Linux i386 assembler with Intel/Microsoft syntax?

6. Asd another HDD to the server?

7. AT&T asm syntax but not IBM asm syntax?

8. HELP Needed for Apache

9. where to download "AT&T System V/386 assembler syntax manual"

10. AT&T Assembler Syntax

11. AT&T syntax Assembler tutorial

12. AT&T assembler syntax ?

13. INTEL -> AT&T syntax-conversion ??