Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2204 inner for loop never end

open
nobody
None
PIC14
5
2014-09-25
2013-08-16
No

The annexed code don't work anymore in version 3.3.0.

The generated asm of function freeze in condintion of line 119/120 and never go out o for loop.

106 00109_DS
107 NOP
108 NOP
109 NOP
110 NOP
111 NOP
112
113;;99 MOVF r0x1004,W
114 BANKSEL r0x1005
115 DECF r0x1005,W
116 MOVWF r0x1004
117; .line 33; "atraso.c" for (j =0 ; j < 200; j++)
118 MOVF r0x1004,W
119 BTFSS STATUS,2
120 GOTO 00109_DS

sdcc -mpic14 -p16f628a -c atraso.c

SDCC : mcs51/gbz80/z80/z180/r2k/r3ka/ds390/pic16/pic14/TININative/ds400/hc08/s08 3.3.0 #8604 (Aug 15 2013) (Linux)

1 Attachments

Discussion

  • Change the type of variable j of unsigned char to unsigned int solve the problem of this code. But the bug in sdcc remains!