MUL16 or MUL18 - Optimized multiply

Language reference ›› Built-in functions ›› Math ››
Parent Previous Next

MUL18(variable1, variable2) // deprecated

MUL16(variable1, variable2)

Optimized multiply of two 8-bit unsigned values without overflow, giving a 16-bit result.


This function has been designed to take advantage of the PIC18 8-bit multiply single instruction.

On other processors this instruction is enabled but generates standard multiplication code.


NEW! (V2.0): MUL18 is now set to “deprecated” and should be replaced by MUL16. MUL16/MUL18 is now applicable to any processor, it is emulated for processors that have no hardware multiplier.