fork download
  1. #include <stdio.h>
  2.  
  3.  
  4.  
  5. int main(void)
  6. {
  7. int foo = 10, bar = 15;
  8. __asm__ __volatile__("addl %%ebx,%%eax"
  9. :"=a"(foo)
  10. :"a"(foo), "b"(bar)
  11. );
  12. printf("foo+bar=%d\n", foo);
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0.02s 1720KB
stdin
Standard input is empty
stdout
foo+bar=25