Motorola HC12 User Manual

Page of 328
Assembler Syntax
Operators
MCUez HC12 Assembler
User’s Manual
MOTOROLA
Assembler Syntax
153
7.7.9  Memory PAGE Operator (Unary)
Syntax:
Get allocation page: PAGE(<operand>)
Description:
The
PAGE
operator returns the page number where the operand
is allocated. For a value coded on four bytes, the
PAGE
operator
returns the content of bits 23 to 16 of the value.
The operand can be any expression evaluating to an absolute or
relocatable expression.
When the
PAGE
 operator is used with an absolute expression,
the assembler evaluates the page directly and the value is
written to the output file. In this case,
PAGE(<operand>)
 is
equivalent to
<operand> & $FF0000
.
Example:
#PAGE($D)
; = 0
#PAGE($15A352)
; = $15
#PAGE(label)
; = Page number where label is
; allocated
7.7.10  Force Operator (Unary)
Syntax:
8-bit address:<<operand>
<operand>.B
16-bit address:><operand>
<operand>.W
Description:
The
<
 (less than) or
.B
 operators force the operand to be an
8-bit operand, whereas the > or
.W
operators force the operand
to be a 16-bit operand.
The
<
 (less than) operator may be useful to force the 8-bit
immediate, indexed, or direct addressing mode for an
instruction.