Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int div64(int hi, int lo, int divisor, int *premainder)
- {
- __asm
- {
- mov edx, DWORD PTR [hi];
- mov eax, DWORD PTR [lo];
- idiv DWORD PTR [divisor]
- mov ecx, DWORD PTR [premainder]
- mov DWORD PTR [ecx], edx
- }
- }
- ----------------
- PUBLIC ?div64@@YGHHHHPAH@Z ; div64
- _TEXT SEGMENT
- _hi$ = 8 ; size = 4
- _lo$ = 12 ; size = 4
- _divisor$ = 16 ; size = 4
- _premainder$ = 20 ; size = 4
- ?div64@@YGHHHHPAH@Z PROC ; div64, COMDAT
- mov edx, DWORD PTR _hi$[esp-4]
- mov eax, DWORD PTR _lo$[esp-4]
- idiv DWORD PTR _divisor$[esp-4]
- mov ecx, DWORD PTR _premainder$[esp-4]
- mov DWORD PTR [ecx], edx
- ret 16
- ?div64@@YGHHHHPAH@Z ENDP ; div64
- _TEXT ENDS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement