Archived

This topic is now archived and is closed to further replies.

Gultipaka

Dev-C++ inline asm in C code

Recommended Posts

I have such code in Intel. Frankly I don''t really know asm well. Could someone transform this Intel code into AT&T. asm{ push 0 push 1 call RegisterServiceProcess } or how can I solve this in other way?

Share this post


Link to post
Share on other sites
Write in
asm {
.intel_syntax noprefix

... code

.ATT_syntax
}

This way you will get intel code translated by compiler

P.S.
Sory about gramatial errors

[edited by - Red Drake on May 27, 2004 8:37:37 AM]

Share this post


Link to post
Share on other sites
I yust rememberd that gcc/g++ dows not "see private declared objects".
I don't know anything specific about this buth I asume that your code works in VC++.
Hope this helps
If not see docs on GCC.

[edited by - Red Drake on May 27, 2004 1:44:49 PM]

[edited by - Red Drake on May 27, 2004 1:45:20 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by temp_ie_cant_thinkof_name
Would this work as well?:

pushl $0;
pushl $1;
call [__imp__RegisterServiceProcess@8];




Probably. It depends on how the compiler deals with imports and how it mangles names.

// edit: compiler in the sense of compiler + linker

[edited by - lessbread on May 29, 2004 9:33:31 PM]

Share this post


Link to post
Share on other sites