On 7/3/2011 1:36 PM, David Bley wrote: > We have inherited a project running on a PIC16F505 at 4MHz. The bulk of = the software is written in Hitech C with some inline assembler. The origin= al code works (we have the original source and the original .hex and .cof f= iles. We are unable to compile it with the latest version of Hitech C (no = optimization, free version) caused by passing a variable from a C routine t= hat calculates a number for a delay that is passed to an inline assembler r= outine that performs the delay (approx 40 - 75us). If I comment out the in= line assembly routine and replace it with a fixed delay routine using the b= uilt in delay_us function, it compiles OK. Any suggestions? Sorry that I = am being so sketchy, but this is a proprietary product. Did you check the release notes for the latest version of Hitech vs the=20 version originally compiled with? Do you know what version that was,=20 and have access to a copy? Can the new, free version not pass variables=20 to an assy routine? What if you insert assembler into the C which=20 sticks the var where the assy expects it and perform the call without=20 the parameter? --=20 Joe Wronski Stillwater Embedded Engineering www.stillwatereng.net --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .