Skip to main content
Visitor II
January 6, 2005
Question

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

  • January 6, 2005
  • 3 replies
  • 884 views
Posted on January 06, 2005 at 07:24

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

    This topic has been closed for replies.

    3 replies

    ciccio2Author
    Visitor II
    January 3, 2005
    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

    Visitor II
    January 5, 2005
    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

    Visitor II
    January 6, 2005
    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