> On Feb 18, 2025, at 5:19 PM, Bernd Böckmann via Freedos-devel 
> <freedos-devel@lists.sourceforge.net> wrote:
> 
> 
>> 
>> I took a look, and it's really cool! I was thinking I'd probably want to 
>> write something like this on my own, but wmincrt seems to do what I'd want, 
>> so I'd like to incorporate it in DOG. :D
>> The header file seems to be under MIT, does that mean that the whole thing 
>> is released under MIT?
> Yes, its MIT.
>> What's the best way to incorporate it into a project? I guess the tags 
>> correspond to separate releases? Which release do you recommend, the newest 
>> 20250105?
> 
> I am quite not satisfied with the releases after 20231113. They work, but 
> these versions are split into multiple files which get built into a .LIB, 
> while the older version is simply a single .asm file called startup.asm. If 
> there is interest I can make WMINCRT available as a separate Github repo and 
> change the trunk version to a single .asm + the header file. That would make 
> incorporating it into other projects very easy. The .asm file compiles with 
> the Watcom assembler WASM.
> 
> There is one piece missing to be of general usefulness: implementation of the 
> 32 and 64 bit multiplication and division routines. I made a start and added 
> U4M for 32-bit unsigned multiplication, but the others are still missing. 
> While these can be added via C code, an assembly version will likely be 
> faster...
> 
> Bernd

You’re more than welcome to grab INT64.INC (using NASM) from V8Power Tools [1]. 
Or, you could port the functionality to a different assembler.

It has a bunch of macros for handling 64-bit numbers on 8086. It also does 
addition, subtraction, multiplication and division on 64-bit integers. Plus, it 
provides other macros and bitwise stuff like OR, AND, etc. 

It was my first attempt at pulling off big number crunching using only 8-bits 
and is a little rough around the edges. But, it definitely does work. 

I’ve made a lot of improvements to performing big number math since that was 
written. For example, my previous version of DOSKIT simply (LOL) extends the 
8086 to support 64-bit numbers and pseudo registers.

The LazyBoy library (aka DOSKIT v4.0) makes the prior version look simplistic 
and primitive. It will handle numbers from a BYTE to a ZWORD. It also can be 
compiled to target processors (like 386) to reduce the code required to handle 
those large numbers. But, that library is a work in progress. 

Unfortunately, using the DOSKIT math stuff is an all or nothing thing. You 
can’t just pick the math out of the library. It requires using the whole 
library. 

:-)

Jerome

[1] https://github.com/LoopZ/V8Power/blob/master/SOURCE/INT64.INC

> 
> 
> 
> 
> _______________________________________________
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to