Motorola HC12 Manual De Usuario

Descargar
Página de 328
Assembler Messages
Message Codes
MCUez HC12 Assembler
User’s Manual
MOTOROLA
Assembler Messages
287
12.3.47  A12003: Value is Truncated to One Byte
Type:
Warning
Description:
A word operand is specified in an assembly instruction
expecting a byte operand. This warning may be generated in
the following cases:
• A symbol located in a section, which is accessed using the
extended addressing mode, is specified as an operand in an
instruction expecting a direct operand.
• An external symbol imported using XREF is specified as an
operand in an instruction expecting a direct operand.
• The mask specified in BCLR, BSET, BRCLR, or BRSET is
bigger than 0xFF.
Example:
         XREF extData
dataSec: SECTION
data:    DS.B 1
data2:   DS.B 1
destination: DS.W 1
codeSec: SECTION
         MOVB    #data, destination
         MOVB    #data, destination
         MOVB    #extData, destination
         BCLR    data, #$54F
Tip:
According to the reason why the warning was generated, the
warning can be avoided as follows:
• Specify the force operator
.B
at the end of the operand or <
in front of the operand.
• Use
XREF.B
 to import the symbol.
Example:
         XREF.B extData
dataSec: SECTION
data:    DS.B 1
data2:   DS.B 1
destination: DS.W 1
codeSec: SECTION
         MOVB    #data.B, destination
         MOVB    #extData, destination
         BCLR    data, #$4F