Guest User

Untitled

a guest
Dec 16th, 2016
138
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int div64(int hi, int lo, int divisor, int *premainder)
  2. {
  3. __asm
  4. {
  5. mov edx, DWORD PTR [hi];
  6. mov eax, DWORD PTR [lo];
  7. idiv DWORD PTR [divisor]
  8. mov ecx, DWORD PTR [premainder]
  9. mov DWORD PTR [ecx], edx
  10. }
  11. }
  12.  
  13. ----------------
  14.  
  15. PUBLIC ?div64@@YGHHHHPAH@Z ; div64
  16. _TEXT SEGMENT
  17. _hi$ = 8 ; size = 4
  18. _lo$ = 12 ; size = 4
  19. _divisor$ = 16 ; size = 4
  20. _premainder$ = 20 ; size = 4
  21. ?div64@@YGHHHHPAH@Z PROC ; div64, COMDAT
  22. mov edx, DWORD PTR _hi$[esp-4]
  23. mov eax, DWORD PTR _lo$[esp-4]
  24. idiv DWORD PTR _divisor$[esp-4]
  25. mov ecx, DWORD PTR _premainder$[esp-4]
  26. mov DWORD PTR [ecx], edx
  27. ret 16
  28. ?div64@@YGHHHHPAH@Z ENDP ; div64
  29. _TEXT ENDS
RAW Paste Data