Advertisement
dllbridge

Untitled

Feb 18th, 2024
743
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.56 KB | None | 1 0
  1.  
  2. #define _CRT_SECURE_NO_WARNINGS
  3.  
  4.  
  5. #include  <stdio.h>
  6. #include <stdlib.h>
  7. #include <locale.h>
  8.  
  9. int _RGB(int, int, int);
  10.  
  11. ///////////////////////////////////////////////////////////
  12. int main()                                               //
  13. {
  14.    
  15.     int n = _RGB(10, 22, 22);
  16.     printf("n = %d\n", n);
  17.  
  18. }
  19.  
  20.  
  21.  
  22. ////////////////////////////////////////////////////////////
  23. int _RGB(int R, int G, int B )                             //
  24. {
  25.     int nRes = 0;
  26.     __asm
  27.     {
  28.        mov  eax, R
  29.        add  eax, 4
  30.        mov nRes, eax
  31.     }
  32. return nRes;
  33. }
  34.  
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement