views:

132

answers:

1

I am learning inline assembly in C. As far as I can tell, the only difference between __asm { ... }; and __asm__("..."); is that the first uses mov eax, var and the second uses movl %0, %%eax with :"=r" (var) at the end. Also, there are a lot less websites about the first. What other differences are there?

+4  A: 

Which one you use depends on your compiler. This isn't standard like the C language.

Ben Voigt
Uhm, yeah. The whole point of those leading underbars is to make it clear that this is non-standard.
Steven Sudit