Motorola HC12 Manuale Utente

Pagina di 328
User’s Manual
MCUez HC12 Assembler
148
Assembler Syntax
MOTOROLA
Assembler Syntax
7.6.1  Integer Constants
The assembler supports four representations of integer constants:
A decimal constant is defined by a sequence of decimal digits (0–9).
Example: 5, 512, 1024
A hexadecimal constant is defined by a dollar character ($) followed by
a sequence of hexadecimal digits (0–9, a–f, A–F).
Example: $5, $200, $400
An octal constant is defined by the at character (@) followed by a
sequence of octal digits (0–7).
Example: @5, @1000, @2000
A binary constant is defined by a percent character followed by a
sequence of binary digits (0–1).
Example: %101, %1000000000, %10000000000
The default base for integer constants is decimal, but it can be changed using
the BASE directive. When the default base is not decimal, decimal values
cannot be represented because they do not have a prefix character.
7.6.2  String Constants
A string constant is a series of printable characters enclosed in single quote (
)
or double quotes (
). Double quotes are only allowed within strings delimited
by single quotes. Single quotes are only allowed within strings delimited by
double quotes.
Example:
'ABCD’,"ABCD",'A',"'B","A'B",'A"B'
7.6.3  Floating-Point Constants
The macro assembler does not support floating-point constants.