Chapter 25. Assembler Syntax

Table of Contents
25.1. Preprocessing
25.2. White-space
25.3. Comments
25.4. Symbols
25.5. Statements
25.6. Constants

This chapter describes the machine-independent syntax allowed in a source file. The assembler syntax is similar to what many other assemblers use; it is inspired by the BSD 4.2 assembler.

25.1. Preprocessing

The assembler internal preprocessor:

It does not do macro processing, include file handling, or anything else you may get from your C compiler's preprocessor. You can do include file processing with the .include directive (see Section 29.29). You can use the GNU C compiler driver to get other “CPP” style preprocessing, by giving the input file a “.S” suffix.

Excess white-space, comments, and character constants cannot be used in the portions of the input text that are not pre-processed.

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 specific portions of the 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 intend to support asm statements in compilers whose output is otherwise free of comments and white-space.