32 bit math

By Bit Addict

Resident (34)

Аватар пользователя Bit Addict

11-06-2016, 17:36

How to add and multiply two 32 bit numbers?

Для того, чтобы оставить комментарий, необходимо регистрация или !login

By ARTRAG

Enlighted (6912)

Аватар пользователя ARTRAG

12-06-2016, 00:27

look for a web page about z80 coding

By santiontanon

Paragon (1730)

Аватар пользователя santiontanon

12-06-2016, 01:42

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

By popolony2k

Hero (544)

Аватар пользователя 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

By AxelStone

Prophet (3189)

Аватар пользователя AxelStone

12-06-2016, 19:20

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

By popolony2k

Hero (544)

Аватар пользователя 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