Log in

View Full Version : quick question about __allrem function


dive2code
December 8th, 2004, 07:58
I have a quick question about __all??? (__alldiv, _allmul, __allrem) function.
I googled and got only that these funtions are related with int64 converstion.
But I couldn't find any stuff explaing that.
Plz let me know the the definition, meaning or reference.

This code is what I met.

Code:
push 0
push 1Ah
push FFFFFFFF
push 80000011h
call __allrem


After the call, debuger showed changed register values,
such as EAX=FFFFFFF9, ECX=1A, EDX=FFFFFFFF, EBX=0

Thank you

Neitsa
December 8th, 2004, 15:15
Hello,
I've disasembled those functions from ntdll. Here's what I guess they do :

Code:

//******************
//*_alldiv.NTDLL
//******************
LONGLONG WINAPI _alldiv( LONGLONG a, LONGLONG b )
{
return a / b;
}


//******************
//*_allmul.NTDLL
//******************
LONGLONG WINAPI _allmul( LONGLONG a, LONGLONG b )
{
return a * b;
}


//******************
//*_allrem.NTDLL
//******************
LONGLONG WINAPI _allrem( LONGLONG a, LONGLONG b )
{
return a % b;
}


//******************
// * _aulldiv.NTDLL
// ******************
ULONGLONG WINAPI _aulldiv( ULONGLONG a, ULONGLONG b )
{
return a / b;
}


//*******************
// *_aullrem.NTDLL
// ******************
ULONGLONG WINAPI _aullrem( ULONGLONG a, ULONGLONG b )
{
return a % b;
}


Hope it could help...

Regards, Neitsa.

TQN
December 8th, 2004, 21:26
Hi dive2code !
If you have Visual Studio 6 or VS .NET, go to the CRT\Src\Intel directory, and you will see the llmul.asm, lldiv.asm, llrem.asm... They are source code of _alldiv, _allmul, _allrem functions.
Regards,
TQN

dive2code
December 8th, 2004, 23:48
Thanx so much Neitsa, TQN