Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
MPLAB
®
XC16 C Compiler Users Guide
DS50002071C-page 322 2012-2013 Microchip Technology Inc.
__builtin_sftac
Description: Shifts accumulator by shift. The valid shift range is -16 to 16.
For example:
volatile register int result asm("A");
int i;
result = __builtin_sftac(result,i);
Might generate:
sftac A, w0
Prototype: int __builtin_sftac(int Accum, int shift);
Argument: Accum Accumulator to shift.
shift Amount to shift.
Return Value: Returns the shifted result to an accumulator.
Assembler Operator/
Machine Instruction:
sftac
Error Messages An error message will be displayed if:
the result is not an accumulator register
Accum is not an accumulator register
the shift value is not a literal within range
__builtin_subab
Description: Subtracts accumulators A and B with the result written back to the specified accumulator.
For example:
volatile register int result asm("A");
volatile register int B asm("B");
result = __builtin_subab(result,B);
will generate:
sub A
Prototype: int __builtin_subab(int Accum_a, int Accum_b);
Argument: Accum_a Accumulator from which to subtract.
Accum_b Accumulator to subtract.
Return Value: Returns the subtraction result to an accumulator.
Assembler Operator/
Machine Instruction:
sub
Error Messages An error message will be displayed if the result is not an accumulator register.
Protego_Release_01_05-Related-OEM-Documentation-MPLAB-XC16-C-Compiler.pdf