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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
2,230件の閲覧回数
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 解決策
898件の閲覧回数
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 返答(返信)
898件の閲覧回数
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
899件の閲覧回数
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 件の賞賛
返信
898件の閲覧回数
zdriver
Contributor I
That fixed the warning, thanks.
0 件の賞賛
返信