>I have found the following piece of code which is >included in a delay routine (delay X cycles (11-256) >by Regulus Berdin ) : > >addlw -(.10+1) >addlw -4 > >can i replace it with > >sublw .11 >sublw .4 I would say no, since the original code was "-11" and "-4", which is equivalent to 256-11= .239 and 256-4= .252. If you take, for example, W=20, then it would be 20+239+252 = 255 (assuming you're only keeping track of the low byte). The result in your code would be 4-(11-20) = 0x04-0xF7 = 0x0D = 13 (again, assuming you're not keeping track of rollovers). Note that "sublw" means "subtract W from literal". --Andrew _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body