Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 User Manual

Product codes
SW006021-1
Page of 518
MPLAB
®
 XC8 C Compiler User’s Guide
DS52053B-page 250
 2012 Microchip Technology Inc.
6.4.4.1
SPECIAL COMMENT STRINGS
Several comment strings are appended to compiler-generated assembly instructions 
by the code generator. These comments are typically used by the assembler optimizer.
The comment string ;volatile is used to indicate that the memory location being 
accessed in the instruction is associated with a variable that was declared as 
volatile
 in the C source code. Accesses to this location which appear to be 
redundant will not be removed by the assembler optimizer if this string is present.
This comment string may also be used in hand-written assembly source to achieve the 
same effect for locations defined and accessed in assembly code.
The comment string ;wreg free is placed on some CALL instructions. The string indi-
cates that the W register was not loaded with a function parameter; i.e., it is not in use. 
If this string is present, optimizations may be made to assembler instructions before the 
function call which load the W register redundantly.
6.4.5
Constants
6.4.5.1
NUMERIC CONSTANTS
The assembler performs all arithmetic with signed 32-bit precision.
The default radix for all numbers is 10. Other radices may be specified by a trailing base 
specifier as given in Table 6-3.
Hexadecimal numbers must have a leading digit (e.g., 0ffffh) to differentiate them from 
identifiers. Hexadecimal digits are accepted in either upper or lower case.
Note that a binary constant must have an upper case B following it, as a lower case b 
is used for temporary (numeric) label backward references.
In expressions, real numbers are accepted in the usual format, and are interpreted as 
IEEE 32-bit format.
6.4.5.2
CHARACTER CONSTANTS AND STRINGS
A character constant is a single character enclosed in single quotes ’.
Multi-character constants, or strings, are a sequence of characters, not including car-
riage return or newline characters, enclosed within matching quotes. Either single 
quotes ’ or double quotes " may be used, but the opening and closing quotes must be 
the same.
TABLE 6-3:
ASPIC[18] NUMBERS AND BASES
Radix
 Format
Binary
Digits 0 and 1 followed by B
Octal
Digits 0 to 7 followed by O, Q, o or q
Decimal
Digits 0 to 9 followed by D, d or nothing
Hexadecimal
Digits 0 to 9, A to F preceded by Ox or followed by H or h