Cutting Constant warning Codewarrior IDE 5.7, programming 9S12XDP512 in assembly

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cutting Constant warning Codewarrior IDE 5.7, programming 9S12XDP512 in assembly

Jump to solution
1,931 Views
zdriver
Contributor I
Hello,
 
The assembler returns this warning, although it assembles the code properly and the code works fine.  Is there a different syntax to use on my assembler line or other solution to eliminate this warning ? I am new to Codewarrior, so any suggestion is welcome. The warning looks like this;
 
Warning : A1415:  Cutting constant:  Value  -47424 is not in range [-32768...65535]
 
The tip in help is to use a larger field? How do I do this?
 
 
 
The line of code that causes this warning, this is from the list file;
 
     a00CC10 05FB 46C0    JMP           [CHANNEL_PATH,PCR] 
 
 
From the list file, I have defined CHANNEL_PATH in ram, it is 16 bit, located at $12D4
 
0000 12D4   CHANNEL_PATH EQU 724 + RAMSTART 
 
 
 
 
 
 
 
 
 
Labels (1)
Tags (1)
0 Kudos
1 Solution
599 Views
CompilerGuru
NXP Employee
NXP Employee
That warning only occurs in the absolute assemble mode.
The code is correct, so I would think in this case the assembler should be adapted. Anyway
you can use a PC relative JMP instead and do the cutting explicitly, like this:

                JMP           [$FFFF & (CHANNEL_PATH - Next),PC]
Next:


That generates the same code but it avoids the warning.

Daniel

View solution in original post

0 Kudos
3 Replies
599 Views
CrasyCat
Specialist III
Hello
 
I am unable to reproduce the issue here on CodeWarrior for HCS12 V4.6.
 
You need to either submit a service request for that or send me some source file reproducing the issue.

Click here to submit a service request.
 
CrasyCat
600 Views
CompilerGuru
NXP Employee
NXP Employee
That warning only occurs in the absolute assemble mode.
The code is correct, so I would think in this case the assembler should be adapted. Anyway
you can use a PC relative JMP instead and do the cutting explicitly, like this:

                JMP           [$FFFF & (CHANNEL_PATH - Next),PC]
Next:


That generates the same code but it avoids the warning.

Daniel
0 Kudos
599 Views
zdriver
Contributor I
That fixed the warning, thanks.
0 Kudos