Does anyone know a good GNU assembly manual

Apr 18, 2005 2 Replies

especially about the format for using asm code inside a C code. __asm__(" " : : )



thanks.



Try this one, quite useful

formatting link

There is also a HOWTO, but I haven't read that in detail

formatting link

mdc at manbw dk - MAN B&W Diesel A/S, Copenhagen www.manbw.com - Electronics & software dept. - Speaking for myself only. -

There's really only one manual for this particular instruction: the GCC documentation, node "C Extensions" --> "Extended Asm". What's not explained there is:

1) the (GNU) assembly language for whatever processor you're going to use this on. This should usually be the same as the CPU vendor's official assembly language, but sometimes (--> x86) it's not. If you don't know how to write separate asm code modules using GNU as, it's unlikely you'll get very far with inline asm. 2) the names and meanings of the "constraints" you can use in the 2nd and 3rd part. These you may have to look up in the GCC target definition for your hardware. You'll have to at least glance over the "porting gcc" part of the manual, too (the relevant parts are referenced in the "extended asm" section). There you'll find generic explanation of what types of constraints there are, and how they're supposed to be used.
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required