You have to translate from Intel assembly syntax (Visual Studio style) to
AT&T assembly syntax (GCC). Here is a page with some of the basics, in a
more conversational tone:
http://www-106.ibm.com/developerworks/linux/library/l-ia.html?dwzone=linux
This page has some info on command line arguments to GCC and other issues
you may want to keep in mind. I don't know how old or out of date this
information is, so you would want to check it with current docs, but it
might give some idea where to look and what to look for:
http://www.tldp.org/HOWTO/Assembly-HOWTO/gcc.html
At 01:19 PM 6/28/02 +0200, Klakier wrote:
>Hi
>
>Could somebody help me to translate below Visual Studio's style asembler
>line to GCC standard?
>
>void Proc ()
>{
> unsigned Result;
> __asm
> {
> ...
> mov dword ptr [Result] , eax // setting result
> }
> return Result
>}
>
>I read manual and they advice to translate it this way:
>
>void Proc ()
>{
> unsigned Result;
> asm ("....");
> asm ("movl %eax, %0" : "=r" (Wynik));
> return Result;
>}
>
>How should I do this?
>
> Marcin Kacperek
>
>
>
>
>-----------------------------------------------------------------------
>Polska-Niemcy: Znowu napiete stosunki? >>> http://link.interia.pl/f15fb
>
>
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:ThinkGeek
>Caffeinated soap. No kidding.
>http://thinkgeek.com/sf
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
-
_____________________________ /"\
Mac Reiter \ / ASCII Ribbon Campaign
Nomadics, Inc. X Against HTML Mail
re...@no... / \ (To join the campaign, simply use
this in your signature.)
|