The code these produce is not bad, just takes one more cycle and two more words than the assembler example did. They do about the same sort of thing as my original: while((--count) && RC4); which worked fine, I just wanted as tight a loop as possible for accuracy. The extra cycle was what I chopped off with assembly, it used decfsz whereas the C version generated a decf followed by a btfsX. What has continually bothered me is the frustration I have each time I try to use inline assembly and it hoses my code. Then I end up having to settle for what the C equivalent generates or patching the hex code in MPLAB. I was hoping someone here had figured out a better workaround. If I have to put the assembler in a separate module with no optimization, I can do that, but unless it's in a function, I have no idea how to do it in a way that plants it in the middle of the program the way the inline assembly would (and should) be. Hey, Tjaart, does MPC keep hands off inline assembler? Cheers, Bob > { > unsigned char uc_count = 0; > > while (count--) > { > if (PA4) > break; > } > more stuff here... > } > produce? > > > you could also look at > > { > while (PA4) > { > unsigend char uc_count = 0; > if (!--count) > break; > } > more stuff here... > } > > or > > { > for (;;) > { > unsigned char uc_count = 0; > > if (!PA4 || !--count) > break; > } > more stuff here... > } http://www.bobblick.com/