>How would I replace this group of code with C18? This >is a critical timing delay. > > REPT (INST_CYCLES_NEEDED - 3) > NOP > ENDM > >The program allows to specify the clock speed, which then >adjusts the number of clock periods to get the desired delays. The REPT operator looks like it is possibly a macro, which is probably defined in one of the include files. As a start, I would try trawling any likely looking include files (compiler.h?, any processor specific .h files?) and searching them with a text editor for 'rept' to see if a macro is #defined. You could then probably use the macro as is in your files. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist