AFAIK and as has been pointed out, operand sizes for
multiplication in C determine the width of the result:

16 x 16 gives a 16-bit result
32 x 32 gives a 32-bit result.

The MSP's hardware multiplier does 16 x 16 with a
32-bit result, but there's no general way to ask
for that in C. I just wrote a function to do it.

unsigned long umul_161632(unsigned int, unsigned int);

Regards

Kris
--
Kris Heidenstrom       Embedded systems designer / programmer
[email protected]       Abbey Systems Ltd - Telemetry Specialists
Wellington NEW ZEALAND  Voice +64-4-385-6611  Fax +64-4-385-6848

Reply via email to