WH Tan wrote: > 1) Is PCL post increased by PIC after execution of instruction, or is > it increased before execution of instruction? During the execution of an instruction, the PC contains the address of that instruction + 1. > 2) Is the following set of codes have the same effect on program flow? > > A1 MOVLW 0x00 > ADDWF PCL,f > > A2 GOTO A2 > > > B1 MOVLW 0xFF > .... > ADDWF PCL,f > > B2 GOTO $-1 I'm not sure what you are asking, but GOTO $-1 will go to the previous instruction whereas A2 GOTO A2 will go to itself. The assembler "$" symbol refers to the address of the current instruction. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads