I simulated this yesterday, pumping a number of values into PCL and w just to see if I could trick it into failing. If you enter with 0 in w, the loop executes 256 times. That makes sense if you think about it, but I think it is dangerous. Perhaps a robust algorithm would test for zero and kick out before entering the delay loop. Now how could somebody convince a C compiler to use this algorithm for RAM-free software delays? It seems to me that passing an argument in C would most likely eat up precious RAM, even if the algorithm itself was dropped into assembler, no? --Lawrence ----- Original Message ----- From: "K|bek Tony" To: Sent: Friday, November 02, 2001 2:43 AM Subject: Re: [PIC]: Delay loops that don't need any RAM Hi, Scott, Olin and Dwayne kindly corrected my blunder :) as I said to long without pic's. Isn't the first time that subwf have bitten me backwards. Excellent. /Tony Tony K|bek, Flintab AB 222222222222222222222222222222222222222222222222222222222222 "No! Try not. Do, or do not. There is no try.", Yoda E-mail: tony.kubek@flintab.com 222222222222222222222222222222222222222222222222222222222222 -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu