16 bit multiply not working as expected
I wrote this code:
int16 a = 0x0100;
int16 b = 0x1000;
int32 c = a*b;
Now, c should be 0x100000. It certainly is when I compile this code on my PC. However, on the PIC18, using the MPLAB C18 compiler, the result is 0x00000000.
Is there a sensible and efficient way to perform a 16x16 multiplication and store the 32-bit result in a 32-bit variable?