32 bit math

Por Bit Addict

Resident (34)

Imagen del Bit Addict

11-06-2016, 17:36

How to add and multiply two 32 bit numbers?

Login sesión o register para postear comentarios

Por ARTRAG

Enlighted (6843)

Imagen del ARTRAG

12-06-2016, 00:27

look for a web page about z80 coding

Por santiontanon

Paragon (1636)

Imagen del santiontanon

12-06-2016, 01:42

Exactly, for example: http://z80-heaven.wikidot.com/math

Por popolony2k

Hero (544)

Imagen del popolony2k

12-06-2016, 17:49

If you want to have a "readable" idea about these math operations (ADD, SUB, MUL), check my BigInt implementation library. It supports 8, 16, 24, 32, 64 to infinite bits operation.

https://sourceforge.net/p/oldskooltech/code/HEAD/tree/msx/tr...

[]'s
PopolonY2k

Por AxelStone

Prophet (3106)

Imagen del AxelStone

12-06-2016, 19:20

@popolony2k Really brilliant, and can be translated into MSX-C Wink

Por popolony2k

Hero (544)

Imagen del popolony2k

14-06-2016, 03:10

Yes. In fact it will be more optimized if translated to MSX-C because the pointer deference method used in this Turbo Pascal code is not optimized (because the pointer operations are not optmized in this TP version), but I realized a way to turn pointer operations in this TP version to be so optimized as C languages. Soon I'll optimize this TP code and it will be a little bit faster.

There are a lot of unit tests around this implementation and it has been used in MSXDUMP disk editor for 24bit pointer operations used by Sunrise IDE low level functions.

[]'s
PopolonY2k