I have developed a smaller code version of the library multiply routine (al@mul)
- this multiplies WORD * WORD, to produce DWORD (as al@mul)
- uses same library variables (as PDS Beta 3.5.2.2)
- mine uses 120 program bytes, compared to library 184 bytes (both including CALL)
I attach a ZIP with example use of code (using Macro), with the routine in its own BAS include.
Also included is the resultant ASM for "MUL_WW"
- the BAS uses ALIAS so that the library variables can be "shared"
- as these locations will vary in typical application code, ASM version would be used (instead of source BAS)
I hope it is of interest.
I also have a version (MUL_SWW, 200 bytes) which treats the WORDs as signed, producing the expected DWORD result for all sign combinations.
Alan.
Attachment 1165


Menu
Recent Articles


Using PDS with SPI GLCD based on ST7565R Controller
Graphic LCDs based on the ST7565 are cheaper then GLCDs with other controllers. SPI requires only four pins. If the circuit