>Has anyone come up with a decent workaround for using inline >assembly in HiTech C when the optimizer screws it up? Compiling the >assembler part to a separate module without optimizing is not really a >good option(that's the recommended thing to do, and it's stupid). >then the optimizer gets it's hands on it and does: >aa1 decfsz _count > btfsc 7,4 ;note btfss is now btfsc > goto aa1 > more stuff here... YOu need to use NOPs to keep the optimizer away. Either that or, like they say, you NEED to link them after separate compilation. >Needless to say it no longer has the timeout working. There is no "keep >hands off" directive. I've asked for it! A nice "#pragma NOOPT" like other compilers have. >What I've been doing is adding a nop to make space and then loading the >hex code into MPLAB and patching the code back to my original. Hack! HACK is right! Andy ================================================================== Montana Design Tech Support - http://www.montanadesign.com ==================================================================