User’s Manual MCUez HC12 Assembler
120 Assembler Syntax MOTOROLA
Assembler Syntax
7.4.1 Label Field
The label field is the first field in a source line. A label is a symbol followed by
a colon. Labels can include letters (A... Z or a... z), underscores, periods, and
numbers. The first character must not be a number.
NOTE:
For compatibility with other macro assembler vendors, an identifier starting on
column 1 is considered to be a label, even if it is not terminated by a colon.
When option
-MCUasm(switch on MCUasm compatibility) is activated, labels
must be terminated with a colon. An error message is issued, if a label is not
followed by a colon.
Labels are required on assembler directives that define the value of a symbol
(SET or EQU). For these directives, labels are assigned the value corresponding
to the expression in the operand field.
Labels specified in front of another directive, instruction, or comment are
assigned the value of the location counter in the current section.
NOTE:
When the macro assembler expands a macro it generates internal symbols
starting with an underline symbol (_). Therefore, to avoid potential conflicts,
user-defined symbols should not begin with an underscore.
NOTE:
For the macro assembler, a
.Bor
.W at the end of a label has a specific
meaning. Therefore, to avoid potential conflicts, user-defined symbols should
not end with
.B or
.W.
7.4.2 Operation Field
The operation field follows the label field and is separated by white space. The
operation field must not begin in the first column.
An entry in the operation field is one of the following:
• An instruction mnemonic
• A directive name
• A macro name