I am just reposting it with the correct [PIC] tag... ---------- Forwarded message ---------- From: David Bley Date: Sun, Jul 3, 2011 at 6:36 PM Subject: [PIC[Passing Variables from HItech C to inline assembly To: "piclist@mit.edu" We have inherited a project running on a PIC16F505 at 4MHz. The bulk of th= e software is written in Hitech C with some inline assembler. The original code works (we have the original source and the original .hex and .cof files. 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 that calculates a number for a delay that is passed to an inline assembler routine that performs the delay (approx 40 - 75us). If I comment out the inline assembly routine and replace it with a fixed delay routine using the built in delay_us function, it compiles OK. Any suggestions? Sorry that I am being so sketchy, but this is a proprietary product. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --=20 int main() { char *a,*s,*q; printf(s=3D"int main() { char *a,*s,*q; printf(s=3D%s%s%s, q=3D%s%s%s%s,s,q,q,a=3D%s%s%s%s,q,q,q,a,a,q); }", q=3D"\"",s,q,q,a=3D"\\",q,q,q,a,a,q); } --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .