int Calculate(int x, int n) { __asm { mov eax, x mov ecx, n mov ebx, 0 for: push eax imul eax, ecx imul eax, 2 add ebx, eax pop eax loop for mov eax, ebx } } void main() { int s = Calculate(2, 2); cout << "Result=" << s; }
while (r16 >= 100) { r17++; r16 -= 100; } while (r16 >= 10) { r18++; r16 -= 10; } r19 = r16;
if (r16 >= 200) { r17 = 2; r16 -= 200; } else if (r16 >= 100) { r17 = 1; r16 -= 100; } if (r16 >= 50) { r18 = 5; r16 -= 50; } if (r16 >= 20) { r18 += 2; r16 -= 20; } if (r16 >= 20) { r18 += 2; r16 -= 20; } if (r16 >= 10) { r18++; r16 -= 10; } r19 = r16;