4.1 Internal Preprocessor

The assembler has an internal preprocessor. The internal processor performs the following actions.

  1. 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.
  2. Removes all comments, replacing them with a single space, or an appropriate number of new lines.
  3. Converts character constants into the appropriate numeric value.

The internal processor does not perform the following actions.

  1. macro preprocessing
  2. include file handling
  3. anything else you may get from your C compiler’s preprocessor

You can do include file preprocessing with the .include directive. See Assembler Directives.

You can use the C compiler driver to perform other C-style preprocessing by ensuring the input file uses a .S extension. For additional information on the compilation driver, see the compiler user's guide relevant for your target device.

If the first line of an input file is #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.

Note: Excess white space, comments and character constants cannot be used in the portions of the input text that are not preprocessed.