4.5. Statements

A statement ends at a newline character ("\n") or line separator character. (The line separator is usually ";", unless this conflicts with the comment character; see Chapter 2..) The newline or separator character is considered part of the preceding statement. Newlines and separators within character constants are an exception: they do not end statements.

It is an error to end any statement with end-of-file: the last character of any input file should be a newline.

You may write a statement on more than one line if you put a backslash (\) immediately in front of any newlines within the statement. When the assembler reads a backslashed newline both characters are ignored. You can even put backslashed newlines in the middle of symbol names without changing the meaning of your source program.

An empty statement is allowed, and may include white-space. It is ignored.

A statement begins with zero or more labels, optionally followed by a key symbol that determines what kind of statement it is. The key symbol determines the syntax of the rest of the statement. If the symbol begins with a dot "." then the statement is an assembler directive: typically valid for any computer. If the symbol begins with a letter the statement is an assembly language instruction: it assembles into a machine language instruction. Different versions of the assembler for different computers recognize different instructions. In fact, the same symbol may represent a different instruction in a different computer's assembly language.

A label is a symbol immediately followed by a colon (:). White-space before a label or after a colon is permitted, but you may not have white-space between a label's symbol and its colon. See Section 6.1.

label:     .directive    followed by something
another_label:           # This is an empty statement.
   instruction   operand_1, operand_2, ...