/**************************************************
    VOP1616.CPP
    Visual basic OPerations
    for 16:16 format
***************************************************/

#include "TDE.h"
#include "TDE\TDE_VOP1616.h"

long TDE_MUL (long A,long B)
{
 long retour;
 __asm{
         mov eax,A
         mov ebx,B
         imul ebx
         shrd eax,edx,16
         mov retour,eax
 }
 return retour;
}

long TDE_DIV (long A,long B)
{
 long retour;
 __asm{
         mov edx,A
         mov ebx,B
         xor  eax,eax
         shrd eax,edx,16
         sar  edx,16
         idiv ebx
         mov retour,eax
        }
 return retour;
}
