07.04.2013 Views

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

__builtin_clr_prefetch<br />

Argument: xptr Integer pointer to x prefetch.<br />

xval Integer value of x prefetch.<br />

xincr Integer increment value of x prefetch.<br />

yptr Integer pointer to y prefetch.<br />

yval Integer value of y prefetch.<br />

yincr Integer increment value of y prefetch.<br />

AWB Accumulator selection.<br />

Return Value: Returns the cleared value result to an accumulator.<br />

Assembler Operator<br />

/ Machine<br />

Instruction:<br />

clr<br />

Error Messages An error message will be displayed if:<br />

• the result is not an accumulator register<br />

• xval is a null value but xptr is not null<br />

• yval is a null value but yptr is not null<br />

__builtin_divf<br />

Built-in Functions<br />

Description: Computes the quotient num / den. A math error exception occurs if den<br />

is zero. Function arguments are unsigned, as is the function result.<br />

Prototype: unsigned int __builtin_divf(unsigned int num,<br />

unsigned int den);<br />

Argument: num numerator<br />

den denominator<br />

Return Value: Returns the unsigned integer value of the quotient num / den.<br />

Assembler Operator<br />

/ Machine<br />

Instruction:<br />

div.f<br />

__builtin_divmodsd<br />

Description: Issues the 16-bit architecture’s native signed divide support with the<br />

same restrictions given in the “<strong>dsPIC</strong>30F/33F Programmer’s Reference<br />

Manual” (DS70157). Notably, if the quotient does not fit into a 16-bit<br />

result, the results (including remainder) are unexpected. This <strong>for</strong>m of<br />

the builtin function will capture both the quotient <strong>and</strong> remainder.<br />

Prototype: signed int __builtin_divmodsd(<br />

signed long dividend, signed int divisor,<br />

signed int *remainder);<br />

Argument: dividendnumber to be divided<br />

divisornumber to divide by<br />

remainderpointer to remainder<br />

Return Value: Quotient <strong>and</strong> remainder.<br />

Assembler Opera- divmodsd<br />

tor / Machine<br />

Instruction:<br />

Error Messages None.<br />

© 2008 <strong>Microchip</strong> Technology Inc. DS51284G-page 145

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!