User’s Manual MCUez HC12 Assembler
304 Assembler Messages MOTOROLA
Assembler Messages
12.3.65 A12402: Value Out of Range –32,768...32,767
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 word (smaller
than –32,768 or bigger than 32,767).
A 16-bit signed PC relative offset is expected in these
instructions:
Long-branch instructions:
LBCC, LBCS, LBEQ, LBGE, LBGT, LBHI, LBHS, LBLE,
LBLO, LBLS, LBLT, LBMI, LBNE, LBPL, LBRA, LBRN,
LBVC, LBVS.
Example: DataSec: SECTION
var1: DS.W 1
var2: DS.W 2
CodeSec: SECTION
LDD var1
LBNE label
dummyBl: DCB.B 20000, $A7
DCB.B 20000, $A7
label STD var2
Tip: Replace the long-branch instruction with this code sequence:
<Inverse branch instruction> label1
JMP label
label1:
Example:
DataSec: SECTION
var1: DS.W 1
var2: DS.W 2
CodeSec: SECTION
LDD var1
BEQ label1
JMP label
label1:
dummyBl: DCB.B 20000, $A7
DCB.B 20000, $A7
label STD var2