News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

MulDiv64 and OWORD procs

Started by Biterider, March 10, 2024, 07:07:09 PM

Previous topic - Next topic

Biterider

Hi
Looking into the asm files from NT5Src I found the assembler implementation of lldiv and llmul as well as MulDiv. 
Checking the actual implementation in Win10 I found that it has changed completely and it uses similar code as found in lldiv and llmul.

I took the sources and adapted them to create sqwordDiv and sqwordMul.
The second step was to extend the 32 bit code to 64 bit. This allowed sowordDiv and sowordMul to be created with full 128 bit precision.
The last step was quite simple, building MulDiv64 which uses the last 2 procedures.
Note that Window, curiously, does not provide this procedure natively.

Attached are all sources  :biggrin:

Biterider

jj2007

Well done :thumbsup:

I see you have both 32- and 64-bit code in the source. What about a little iMath32.lib and iMath64.lib?