28.2.65 __builtin_lac_16

Architecture: 

dsPIC33A, dsPIC33C/E/F, dsPIC30

Description: 

Load accumulator with a 16-bit, possibly shifted, value; extending as needed.

Example:

volatile register int Accum asm("A");
int16_t v;
 
Accum = __builtin_lac_16(v,0);

Prototype

int __builtin_lac(int16_t v, int16_t shift);

Arguments:

v  - value to load into accumulator

shift  - literal shift amount

Return Value

The the shifted value v is stored into the accumulator.

Machine Instruction

lac

Error Messages

If the shift argument is not literal or is out of range, an error message will be generated.