cancel
Showing results for 
Search instead for 
Did you mean: 

Why I cannot shift >> 12 an integer???

ciccio2
Associate II
Posted on January 06, 2005 at 07:24

Why I cannot shift >> 12 an integer???

3 REPLIES 3
ciccio2
Associate II
Posted on January 03, 2005 at 12:52

When I do:

Tempvalue = (Value>>12);

the link generate:

ERROR M5108: Called application detected an error

project.prm

with:

#pragma DATA_SEG DEFAULT

extern unsigned int Tempvalue;

extern unsigned int Value;

Same error if i do:

Value = TEmpvalue / 1000;

Thanks a lot

alain2399
Associate II
Posted on January 05, 2005 at 10:09

hi marchino,

I got no pb at all, here is the code generated:

48 int_value1 = int_value2 >> 12;

0xfaf1 LD Y,#0x0c

0xfaf4 LD A,int_value2+1

0xfaf7 LD X,int_value2

0xfafa CALL _ILSR

0xfafd LD int_value1+1,A

0xfb00 LD int_value1,X

The Hiware compiler is using a function of thelibrary _ILSR to prform the shift. I just used the default setting for compiler and linker provided by STVD7 R3.1.1

Best regards

wolfgang2399
Associate II
Posted on January 06, 2005 at 07:24

Hi marchino,

the error message seams to come from the maker of your Metrowerks environment.

More details you'l find in the maker manual, that you can download from metrowerks under

http://ftp://ftp.metrowerks.com/pub/docs/Targets/HC08_CW08_3.0/Maker.pdf

Proably there is no access to the ansi library Rtsst7.c or it is corrupted.

Regards

WoRo