Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #include <stdio.h>
- #include <stdlib.h>
- #include <locale.h>
- int _RGB(int, int, int);
- ///////////////////////////////////////////////////////////
- int main() //
- {
- int n = _RGB(10, 22, 22);
- printf("n = %d\n", n);
- }
- ////////////////////////////////////////////////////////////
- int _RGB(int R, int G, int B ) //
- {
- int nRes = 0;
- __asm
- {
- mov eax, R
- add eax, 4
- mov nRes, eax
- }
- return nRes;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement