4.1 Internal Processor
The assembler has an internal processor which handles the following tasks:
- Adjusts and removes extra white space. It leaves one space or tab before the keywords on a line, and turns any other white space on the line into a single space.
- Removes all comments, replacing them with a single space, or an appropriate number of new lines.
- Converts character constants into the appropriate numeric value.
If you have a single character (e.g., ‘b’) in your source code, this will be changed to the appropriate numeric value. If you have a syntax error that occurs at the single character, the assembler will not display ‘
b
’, but instead display the first digit of the decimal equivalent.For example, if you had
.global mybuf
, ‘b
’ in your source code, the error message would say “Error: Rest of line ignored. First ignored character is ‘9’.” Notice the error message says ‘9’. This is because the ‘b’ was converted to its decimal equivalent 98. The assembler is actually parsing.global mybuf,98
.
The internal processor does not do:
- Macro processing.
- Include file handling.
- Anything else you may get from your C compiler’s processor.
You can do include file processing with the .include
directive. See Assembler Directives.
You can use the C compiler driver to get other C-style processing by
giving the input file a .S
suffix. See the MPLAB® XC32 C
Compiler User’s Guide for PIC32A MCU (DS-50003831) for more
information.
#NO_APP
or if you use the -f
option, white
space and comments are not removed from the input file. Within an input file, you can ask
for white space and comment removal in certain portions by putting a line that says #APP
before the text that may contain white space or comments,
and putting a line that says #NO_APP
after this text.
This feature is mainly intended to support assembly statements in compilers whose output is
otherwise free of comments and white space.