The label field is optional and has two uses. Most frequently, the field contains a symbol used to identify a statement referenced by other statements. Symbols used in this way are labels. Alternatively, the field contains a symbol whose value is set by the assignment operator. For more information on the second use, see Chapter 5
When the assembler encounters a label, it assigns the current value of the location counter to the label. A colon (:) is used to delimit (terminate) each label in the label field. (When the label is used in the operand field of an instruction, the colon is omitted.)
The rules for label name construction are the same as the rules as for any symbol. Refer to the Section called symbol and label construction
A label referencing an instruction need not be on the same line as the instruction. This allows the programmer, when writing source code, to devote a separate line with comments to labels, providing clearer documentation of the program and allowing for easier editing of the source code.
| Caution |
Read the following before using labels on a blank line. |