AnsweredAssumed Answered

Problems with JP and CALL instructions

Question asked by Romanato.Marco on Sep 7, 2011
Latest reply on Mar 1, 2012 by Romanato.Marco
When the JP instructions jump less than 92H I haven't any problem, but if it jumps more than 92H the JP and Call command do not work properly. I am sure to be in the same section because I use STM8S105C6.
Example1:
0x80E8 jp Base
if the label Base is an address 0x8110 the compiler translates in JP 0x8110 >>Correct
if the label Base is an address 0x8181 the compiler translates in JP 0x8081 >>Wrong
if the label Base is an address 0x8259 the compiler translates in JP 0x8159 >>Wrong
if the label Base is an address 0x8349 the compiler translates in JP 0x8149 >>Wrong
if the label Base is an address 0x83B5 the compiler translates in JP 0x80B5 >>Wrong
Example2:
0x83DD jp Base2
the label Base2 is an address 0x8685 the compiler translates in JP 0x8085 >>Wrong

After 0x817B every label must have the ".w" suffix for ex: Base.w

The call instruction is the same.
Why? Did I forget a few assembler directives?
Thanks

Outcomes