3.4.37 X: Specify Source Language Option

The -xlanguage option allows you to specify that the source files that follow are written in the specified language, regardless of the extension they use.

The languages allowed by the assembler are tabulated below.

Table 3-7. Language options
LanguageDescription
assemblerAssembly source code
assembler-with-cppAssembly source code that must be preprocessed

For example, the command:

pic-as -mcpu=18f4520 -c -xassembler-with-cpp init.s

will tell the assembler to run the preprocessor over the assembly source file, even though the init.s file name does not use a .S extension.