# Vault 7: Projects

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

### Protego

# MPLAB XC16 C-Compiler

- 1
- 2
…
- 320
- 321
- 322
- 323
- 324
…
- 365
- 366

MPLAB
®
XC16 C Compiler Users 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.

- 1
- 2
…
- 320
- 321
- 322
- 323
- 324
…
- 365
- 366