Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int func(int A, int B, int C, int D, int E, int F);
- int main(void)
- {
- printf_s("(a+b*c)/(d-e*f) = %d \n if a = 4, b = 3, c = 2, d = 6, e = 1, f = 5\n", \
- func(4, 3, 2, 6, 1, 5));
- }
- int func(int A, int B, int C, int D, int E, int F)
- {
- __asm
- {
- mov eax, 3;
- mov ecx, 2;
- imul eax, ecx;
- mov ecx, 4;
- add eax, ecx;
- mov ecx, 1;
- mov edx, 5;
- imul ecx, edx;
- mov edx, 6;
- sub edx, ecx;
- shr eax, 2;
- }
- // Return with result in EAX
- }
Advertisement
RAW Paste Data
Copied
Advertisement