Advertisement

__asm in linux?

Started by March 04, 2001 10:36 PM
1 comment, last by gimp 23 years, 11 months ago
I''m building a math library and for a few things have used assembler. This library is to be cross platform so how do I (in general) get this to compile under say gcc (thats the most popular linux compiler isn''t it?)? Does gcc use __asm {} to denote a asm block? IT the syntax in this block the same? Should I abandon asm for cross playform code? Many thanks
Chris Brodie
I know I''m gonna get flamed for this, but....inline assembly in GCC is horrible. Have fun dealing with ''input'', ''output'', and ''modified'' fields. Anyway, the syntax is....
  __asm__("    blah  \n\t    do_stuff \n\t    do_more_stuff \n\t    "    : outputs    : inputs    : modified);  


I would recommend you check out some docs such as these.

Martee
Magnum Games.NET
All your code are belong to us.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
Advertisement
You should CERTAINLY abondon asm for cross platform applications. ASM isn''t portable at all!

This topic is closed to new replies.

Advertisement