Created
November 2, 2014 13:36
-
-
Save gluschenko/3564ac367ed2156f9fa9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
/// | |
static int Additive(int first, int second); | |
/// | |
int main() | |
{ | |
for (int i = 0; i < 10; i++) | |
{ | |
cout << i << " + 2 -> " << Additive(i - 2, i) << endl; | |
} | |
system("pause"); | |
return 0; | |
} | |
static int Additive(int first, int second) | |
{ | |
int sum = 0; | |
__asm{ | |
mov ebx, [first] | |
mov ecx, [second] | |
add edx, ecx | |
mov [sum], edx | |
}; | |
return sum; | |
} | |
static int AsmValue(int op) | |
{ | |
__asm{ | |
}; | |
return op; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment