Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
16-bit MCU and DSC Programmer’s Reference Manual
DS70157F-page 454 © 2005-2011 Microchip Technology Inc.
__builtin_divmodud
Description:
Issues the 16-bit architecture’s native unsigned divide support. 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 both the quotient and remainder.
Prototype:
unsigned int _ _builtin_divmodud(
unsigned long dividend, unsigned int divisor,
unsigned int *remainder);
Argument:
dividend number to be divided
divisor number to divide by
remainder pointer to remainder
Return Value:
Quotient and remainder.
Assembler Operator / Machine Instruction:
divmodud
Error Messages:
None.
__builtin_divsd
Description:
Computes the quotient num / den. A math error exception occurs if den is zero. Function
arguments are signed, as is the function result. The command-line option -Wconversions
can be used to detect unexpected sign conversions.
Prototype:
int _ _builtin_divsd(const long num, const int den);
Argument:
num numerator
den denominator
Return Value:
Returns the signed integer value of the quotient num / den.
Assembler Operator / Machine Instruction:
div.sd
Protego_Release_01_05-Related-OEM-Documentation-PIC24FJ64GA004-Programmers_Reference_Manual.pdf