I'm trying to optimize some code, and fighting for every byte as usual. I've got 1070 bytes of code that's got to fit in 1024 bytes of memory - you know the drill. No, I can't buy more memory - it costs money. Gotta squeeze my code. I'm replacing more and more C with assembler. This is going the wrong way. I've noticed that C always makes a less efficient loop than can be done with hand coded assembler. I need a loop that executes 256 times (handy number, eh?) I'm comparing the assembly instructions: int x; #ASM // CLRF X is implied - I make sure X is always zero at this point label: { code code code code} decfsz x, f goto label #ENDASM which generates a nice tight loop which executes 256 (or is it 255? ) times and uses 2 bytes of overhead for the loop. Racing them against ANY of the looping instructions in C - such as for (X = 0; x < 256; x++) { code code code} for(x = 255; x > 0; x--) {code code code code} while (x > 0) { code code code code x-- } which can generate a loop in AT BEST 5 and usually 6 0r 7 bytes. Is there a C instruction that can make a nice tight loop that takes up 2 bytes of ROM and executes 256 times? Why didn't I buy a real C compiler...