Thanks Bob, I was hoping that was how it worked, but was starting to wonder. It's funny, I feel like I have a reasonable understanding of how a Pic works ... but when I go to do something specific (that I haven't done before) ... all these other doubts pop up. No substitute for experience I guess. Anyway, at least my program should have some hope of running now that you guys have sorted me out on my main concerns. Thanks, Roger ----- Original Message ----- From: "Bob Ammerman" > From: "Roger Weichert" >> Does adding '0' to the program counter cause any problems? >> >> Regards, Roger > > No. The program counter is always pointing at the _next_ instruction. > Thus, > adding zero to it is effectively a NOP. Program execution just continues > with the very next instruction. > > ADDWF PCL,F ; add to program counter > GOTO A ; we come here if W was zero > GOTO B ; and here if W was one > ...etc. > > NOTE: You must be careful not to span a page boundary ( a multiple of > 0x100 > instructions ) with the above construct because only the least significant > byte of the program counter is affected by the ADDWF instruction. > > -- Bob Ammerman -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist