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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
2,821 次查看
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 
 
 
 
 
 
 
 
 
 
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,489 次查看
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 项奖励
回复
3 回复数
1,489 次查看
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
1,490 次查看
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 项奖励
回复
1,489 次查看
zdriver
Contributor I
That fixed the warning, thanks.
0 项奖励
回复