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 212 2012-2013 Microchip Technology Inc.
EXAMPLE 16-10: HANDLING VALUES LARGER THAN INT
Constraint letters and modifiers may be used to identify various entities with which it is
acceptable to replace a particular operand, such as %0 in:
asm("mov %1, %0" : "r"(foo) : "r"(bar));
This example indicates that the value stored in foo should be moved into bar. The
example code performs this task unless foo or bar are larger than an int.
By default, %0 represents the first register for the operand (0). To access the second,
third, or fourth register, use a modifier letter specified in Table .
16.4 PREDEFINED ASSEMBLY MACROS
Some macros used to insert assembly code in C are defined once you include <xc.h>.
The macros are: Nop(), ClrWdt(), Sleep() and Idle(). The latter two insert the
PWRSAV instruction with an argument of #0 and #1, respectively.
Protego_Release_01_05-Related-OEM-Documentation-MPLAB-XC16-C-Compiler.pdf