Advertisement
dllbridge

Untitled

Mar 8th, 2023
821
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1.  
  2. #include <stdio.h>
  3.  
  4.  
  5.  
  6.  
  7. ////////////////////////////////////
  8. int foo()
  9. {
  10.    
  11.     int n = 3;
  12.  
  13.     __asm
  14.     {
  15.  
  16.        mov EAX, n
  17.        add EAX, 3
  18.        MOV n, EAX
  19.     }
  20.      
  21. return n;
  22. }
  23.  
  24.  
  25.  
  26.  
  27. ////////////////////////////////////////////////////
  28. int main()                                      //
  29. {
  30.  
  31.      int n = foo();
  32.  
  33.      printf("n = %d\n", n);
  34.  
  35. return 0;
  36. }
  37.  
  38.  
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement