Hi Bob, >> 2) Is the following set of codes have the same effect on program flow? >> >> A1 MOVLW 0x00 >> ADDWF PCL,f >> >> A2 GOTO A2 > > Because W is zero, the ADDWF PCL,F is effectively a NOP, so this will > execute the MOVLW, the ADDWF and then repeat the GOTO indefiniitely. >> B1 MOVLW 0xFF >> .... >> ADDWF PCL,f >> B2 GOTO $-1 > > Because W is 0xFF, adding it to PCL will keep resetting PCL to point to the > ADDWF instruction. So, in this case the MOVLW will execute, and then the > ADDWF will be repeated indefinitely. The GOTO will never be reached. I have to apology here for not stated clearly my question. Actually I was giving 4 pieces of codes and I was comparing A1 to A2, B1 to B2. But I thinks I get the answers from your post anyway. Thanks a lot. WH Tan -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads