Hi Michel,

> I fell on a problem on which I just spent a day and a half, plus a whole
> night, with no clue :-(
>
> At this step, as every poor programmer would, I think "this is probably a
> compiler issue, otherwise my brain is dead", so it's quite ashamed that I
> submit this here...

Do not be ashamed -- it *is* a compiler issue ... that is ... it *was* a
compiler issue, which I believe to be fixed in 2.9.4, r5567.
Please update your SDCC installation (using a snapshot including revision
r5567 or directly the svn head) and try again. Positive and/or negative
feedback is always welcome.

> ...and input[0] is processed properly (and it works for any arbitray  
> value of "i").

For fixed indices, the compiler addresses input[i].curRead via
   BTFSC (_input + 7*i), 1
while it uses indirect access via FSR and INDF for variable i:
   BTFSC INDF, 1
Unfortunately the code generator omitted to setup FSR  with the
address to be accessed via INDF, so we read and branched depending on
random memory locations.

Good luck,

Raphael

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to