#1045 shift (>>) fails

closed-rejected
None
5
2013-05-25
2005-12-28
Anonymous
No

may be C-preprocessor error!

The shift function fails with my code sample.

Line 20 gives the correct value of the High Byte of
the constant to TH0 -- see assembler code of line 21:
is 0x3C

Line 22 gives the low byte of the constant to TH0 --
see assembler code of line 23: is 0xB0 but should be
0x3C!

1. See attachment
2. sdcc def-err.c --debug
3. (see attachment): SDCC :
mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08
2.4.0 (Mar 9 2004) (UNIX)
4. no error message for this error
5. hartje (at) etech.hs-bremen.de

any help?

Discussion

  • Nobody/Anonymous

    def-err in shift const

     
  • Bernhard Held

    Bernhard Held - 2005-12-28
    • assigned_to: nobody --> bernhardheld
     
  • Bernhard Held

    Bernhard Held - 2005-12-29

    Logged In: YES
    user_id=203539

    Quick response: there are still some bugs in sdcc, which
    are touched by your source. But the biggest bug is in your
    source:

    #define TIMER0MODE1RELOADVAL
    (-((CPUCLKHZ/TIMER0INTSPERSECOND)/12)) & 0xFFFF

    Much better:

    #define TIMER0MODE1RELOADVAL
    ((-((CPUCLKHZ/TIMER0INTSPERSECOND)/12)) & 0xFFFF)

    or:
    #define TIMER0MODE1RELOADVAL
    ((-CPUCLKHZ/TIMER0INTSPERSECOND/12) & 0xFFFF)

     
  • Bernhard Held

    Bernhard Held - 2005-12-31
    • labels: 101552 -->
    • milestone: --> non_bugs
    • status: open --> closed-rejected
     
  • Bernhard Held

    Bernhard Held - 2005-12-31

    Logged In: YES
    user_id=203539

    The only relevant bug was in the bug report -> rejected.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks