Motorola HC12 Manuale Utente

Pagina di 328
User’s Manual
MCUez HC12 Assembler
286
Assembler Messages
MOTOROLA
Assembler Messages
12.3.46  A12002: Complex Relocatable Expression not Supported
Type:
Error
Description:
A complex relocatable expression has been detected. The
expression is detected when it contains:
• An operation between labels located in two different sections
• A multiplication, division, or modulo operation between two
labels
• The addition of two labels located in the same section
Example:
DataSec1: SECTION
DataLbl1: DS.B 10
DataSec2: SECTION
DataLbl2: DS.W 15
offset: EQU DataLbl2 – DataLbl1
Tip:
The macro assembler does not support complex relocatable
expressions. The corresponding expression must be evaluated
at execution time.
Example:
DataSec1: SECTION
DataLbl1: DS.B 10
DataSec2: SECTION
DataLbl2: DS.W 15
Offset:   DS.W 1
CodeSec: SECTION
  …
evalOffset:
  LDD  #DataLbl2
  SUBD #DataLbl1
  STD  Offset