Happy Thanksgiving US folks, Trying to figure out why code isn't working, I've whittled it down to =20 this oddity: This works, toggling LED's repeatedly as expected... while (1) { TRISC =3D 0b10101010; // '0's will turn LED's on. for (x=3D0; x<200; x++) { Delay10TCYx(255); res++; // Dummy task } TRISC =3D 0b01010101; // '0's will turn LED's on. res++; // Dummy task for (x=3D0; x<200; x++) { Delay10TCYx(255); res++; // Dummy task } } However, when I switch delay functions and adjust the time units =20 accordingly, the code stalls at the delay... while (1) { TRISC =3D 0b10101010; // '0's will turn LED's on. for (x=3D0; x<200; x++) { Delay100TCYx(26); res++; // Dummy task } TRISC =3D 0b01010101; // '0's will turn LED's on. res++; // Dummy task for (x=3D0; x<200; x++) { Delay100TCYx(25); res++; // Dummy task } } This is a fresh install of MPLAB 8.66 with C18 v3.46. I've disabled =20 all optimizations in the project's build options. What else should I =20 be checking, or is this a legitimate bug with the compiler/libraries? =20 FWIW, I also noticed that I could previously use "while (1)" for =20 infinite loops, but now the compiler hangs for several minutes, memory =20 usage climbs significantly, then just fails to compile. Cheers, -Neil. --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .