undesirable 'optimization'

the source (shown from the list):

 312   3            /* shift out the column data */
 313   3            for (index = 0; index < 8; index++)
 314   3            { // column clock to 0, clear column data pin
 315   4              SB_P1_FDDA_N = 1;
 316   4              if (CPBCsdat & 0x80) SB_P1_FDDA_N = 0;
 317   4              CPBCsdat <<= 1;
 318   4              delay();
 319   4              SB_P1_FDCK_N = 1;
 320   4              delay();
 321   4              SB_P1_FDCK_N = 0;
 322   4            } /* end for index */
generates the assembly:
                                           ; ; SOURCE LINE # 313
;---- Variable 'index' assigned to Register 'R3' ----
000C E4                CLR     A
000D FB                MOV     R3,A
000E         ?C0025:
                                           ; SOURCE LINE # 314
                                           ; SOURCE LINE # 315
000E D290              SETB    SB_P1_FDDA_N
                                           ; SOURCE LINE # 316
0010 EC                MOV     A,R4
0011 30E702            JNB     ACC.7,?C0028
0014 C290              CLR     SB_P1_FDDA_N
0016         ?C0028:
                                           ; SOURCE LINE # 317
                                           ; SOURCE LINE # 318
                                           ; SOURCE LINE # 319
                                           ; SOURCE LINE # 320
0016 120000      R     LCALL   ?C0086
                                           ; SOURCE LINE # 321
0019 C291              CLR     SB_P1_FDCK_N
                                           ; SOURCE LINE # 322
001B 0B                INC     R3
001C BB08EF            CJNE    R3,#08H,?C0025
what happened to lines 318 and 319?

Erik

More questions in this forum