Posted By

bedomax on 11/26/08


Tagged

c Assembler


Versions (?)

Assembly in C++ with GCC Inline


 / Published in: C
 

Código en C con Ensamblador para GCC

  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int foo = 10, bar = 15;
  6. asm("addl %%ebx,%%eax"
  7. :"=a"(foo)
  8. :"a"(foo), "b"(bar)
  9. );
  10. printf("foo+bar=%d\n", foo);
  11. return 0;
  12. }

Report this snippet  

You need to login to post a comment.