28.2.42 __builtin_modud

Description

Issues the DSC architecture’s native unsigned divide support with the same restrictions given in the dsPIC30F/33F Programmer’s Reference Manual (DS-70000157). Notably, if the quotient does not fit into a 16-bit result, the results (including remainder) are unexpected. This form of the built-in function will capture only the remainder.

Prototype

uint16_t __builtin_modud(uint32_t dividend,
 uint16_t divisor);

Arguments

dividend – number to be divided

divisor – number to divide by

Return Value

Remainder.

Machine Instruction

div.ud

Error Messages

None