Assembly in C++ with GCC Inline


/ Published in: C
Save to your folder(s)

Código en C con Ensamblador para GCC


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.