The rept directive just tells the assembler to temporarily create an unnamed macro and repeat it a number of times. The MPASM has the while directive. It is a little different but should work. Eg.: n set (INST_CYCLES_NEEDED - 3) while n > 0 nop n set n - 1 endw Regards, Isaac Alan B. Pearce escreveu: >> 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 file= s?) = > 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. > > = > ------------------------------------------------------------------------ > > > No virus found in this incoming message. > Checked by AVG - www.avg.com = > Version: 8.5.387 / Virus Database: 270.13.16/2241 - Release Date: 07/16/0= 9 05:58:00 > > = __________________________________________________ Fa=E7a liga=E7=F5es para outros computadores com o novo Yahoo! Messenger = http://br.beta.messenger.yahoo.com/ = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist