#339 PIC backend: unsigned char counters

closed-fixed
None
5
2013-05-25
2002-05-08
No

Unsigned chars used in counters appear completely broken:

main()
{
unsigned char i;

i=0;
while (i<144) i++;
}

generates the egregiously incorrect

0000 00127 _main ;Function start
0000 01A0 00135 CLRF r0x20 ;key=000,flow seq=001
0001 00153 _00105_DS_
0001 1803 00154 BTFSC STATUS,0 ;key=001,flow
0002 2805 00157 GOTO _00108_DS_ ;key=000,flow
0003 0AA0 00171 INCF r0x20,F ;key=000,flow seq=003
0004 2801 00175 GOTO _00105_DS_ ;key=001,flow
0005 00188 _00108_DS_
0005 0008 00189 RETURN ;key=000,flow seq=004

Discussion

  • Scott Dattalo

    Scott Dattalo - 2002-05-17
    • milestone: --> fixed
    • assigned_to: nobody --> sdattalo
    • status: open --> closed-fixed
     
  • Scott Dattalo

    Scott Dattalo - 2002-05-17

    Logged In: YES
    user_id=11911

    fixed in gen.c

     

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

Sign up for the SourceForge newsletter:





No, thanks