Motorola HC12 User Manual

Page of 328
Assembler Messages
Message Codes
MCUez HC12 Assembler
User’s Manual
MOTOROLA
Assembler Messages
305
12.3.66  A12403: Value Out of Range –256...255
Type:
Error
Description:
The offset between the current PC and label specified as the PC
relative address is not in the range of a signed 9-bit value
(smaller than –256 or bigger than 255). A 9-bit signed PC
relative offset is expected in these instructions:
• Decrement-and-branch instructions: DBEQ, DBNE
• Increment-and-branch instructions: IBEQ, INE
• Test-and-branch instructions: TBEQ, TBNE
Example:
DataSec: SECTION
var1:    DS.W 1
var2:    DS.W 10
CodeSec: SECTION
         …
         LDX  #var2
label:   LDD  var1
         CLR  1, X+
dummyBl: DCB.B 260, $A7
         DBNE D, label
Tips:
Replace the instruction with the following portion of code.
• For decrement and branch:
IFCC
Condition
DBNE  D, label
SUBD  #1
LBNE  label
DBNE  A, label
DECA
LBNE  label
DBNE  B, label
DECB
LBNE  label
DBNE  X, label
DEX
LBNE  label
DBNE  Y, label
DEY
LBNE  label
DBNE  S, label
DES
LBNE  label