Thread View: net.lang.forth
1 messages
1 total messages
Started by Murray Sherk
Mon, 07 Jul 1986 19:04
Slow 4xFORTH multiplication
Author: Murray Sherk
Date: Mon, 07 Jul 1986 19:04
Date: Mon, 07 Jul 1986 19:04
26 lines
1903 bytes
1903 bytes
*** REPLACE THIS LINE WITH YOUR MESSAGE *** I recently discovered something pretty interesting that rather disillusioned me about 4xFORTH for the Atari ST. Apparently the authors did not use the multiplication instructions available in the 68000 instruction set. It is easy to hack together a 32 bit by 32 bit multiplication routine using four 68000 MULU instructions and some SWAPping (SWPping in 4xFORTH assembler). This yields a 64 bit product. If you want only a 32 bit product then you can get away with only two MULU instructions. The new multiplication routine is at least 4 or 5 times faster than the oone supplied with 4xFORTH (and about the same as the one supplied with Holmes & Duckworth FORTH). The word : TEST 100000 0 DO I I * DROP LOOP ; runs in under 10 seconds with the new "*". For a product that prides itself on speed, the slow multiplication is really unacceptable. By the way, the 68000 DIVU instruction can be used to speed up /MOD, /, and MOD as well but it is trickier. You can only use it if the divisor's magnitude fits into 16 bits. Resort to the old versions if the divisor is too big. One last thing: I found the 4xFORTH assembler to be quite quirky and VERY poorly documented (even with the examples that came with Version 2.0). Does anybody have a public domain FORTH 68000 assembler? -- Murray Sherk (University of Toronto, Ontario, Canada)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads