On Sat, 21 Dec 2002, Bob Ammerman wrote: > ----- Original Message ----- > From: "Olin Lathrop" > > I'm probably going to get the usual flak for this, but this is exactly the > > kind of low level routine that should be done in assembler > > No flak from me, you are exactly on. But perhaps what the OP really needs to > know is how to take the assembly code and embed it in a C function using > inline assembly, or how to set it up to be linked in with and callable by > the C code. (None of which I can help with - I know nearly nothing about > CCS). No flak here either. I just use the compiler for arithmetic operations, but if the OP needs something truly optimized as well as the ASM code, all he's got to do is #ASM #ENDASM You can declare variables and use their names in the asm code and do whatever else needs doing. That would seem to be the easiest way to "port" asm code to C... 8-) Anyway, it's all there in the help file, look under #ASM in the pre-processor command summary. Dale -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu