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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

__builtin_fbcl<br />

Built-in Functions<br />

Argument: valueInteger number of first bit change.<br />

Return Value: Returns the shifted addition result to an accumulator.<br />

Assembler Opera- fbcl<br />

tor / Machine<br />

Instruction:<br />

Error Messages An error message will be displayed if the result is not an accumulator<br />

register.<br />

__builtin_lac<br />

Description: Shifts value by shift (a literal between -8 <strong>and</strong> 7) <strong>and</strong> returns the value<br />

to be stored into the accumulator register. For example:<br />

register int result asm("A");<br />

int value;<br />

result = __builtin_lac(value,3);<br />

Might generate:<br />

lac w4, #3, A<br />

Prototype: int __builtin_lac(int value, int shift);<br />

Argument: valueInteger number to be shifted.<br />

shiftLiteral amount to shift.<br />

Return Value: Returns the shifted addition result to an accumulator.<br />

Assembler Opera- lac<br />

tor / Machine<br />

Instruction:<br />

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

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

• the shift value is not a literal within range<br />

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

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

Saved successfully!

Ooh no, something went wrong!