# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MPLAB XC16 C-Compiler

- 1
- 2
…
- 303
- 304
- 305
- 306
- 307
…
- 365
- 366

Built-in Functions
 2012-2013 Microchip Technology Inc. DS50002071C-page 305
__builtin_divf
Description: Computes the quotient num / den. A math error exception occurs if den is zero. Function
arguments are unsigned, as is the function result.
Prototype: unsigned int __builtin_divf(unsigned int num,
unsigned int den);
Argument: num numerator
den denominator
Return Value: Returns the unsigned integer value of the quotient num / den.
Assembler Operator/
Machine Instruction:
div.f
__builtin_divmodsd
Description: Issues the 16-bit architectures native signed divide support with the same restrictions given
in the dsPIC30F/33F Programmers Reference Manual (DS70157). 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: signed int __builtin_divmodsd(
signed long dividend, signed int divisor,
signed 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:
divmodsd
Error Messages None.

- 1
- 2
…
- 303
- 304
- 305
- 306
- 307
…
- 365
- 366