Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. int solution(int x, int y, int z)
  2. {
  3. x=4;
  4. y=5;
  5. z=2;
  6. int result;
  7. __asm
  8. {
  9. mov eax, -2
  10. imul [x]
  11. imul [y]
  12. mov ebx, eax
  13. mov eax, -3
  14. imul [z]
  15. sub eax, ebx
  16.  
  17.  
  18. mov [result], eax ;
  19. }
  20. assert(result == -2*x*y – 3*z);
  21. printf("solution_for_grade_6(%d, %d,**strong text** %d) = %dn", x, y, z, result);
  22. return result;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement