>This is a known bug in MPLAB. They told us about it at the last seminar. See? >The seminars are good for something. The simulator doesn't add one to the PC >(for the pre-fetch) in operations which modify the PC. > >The work around is to add 1 yourself in code which you will run on the simulator >and take it out again when you go to silicon. > >- Mark Sullivan - > > Thanks to all who helped with the MPLAB bug, my sanity is restored and my headache sank into the depths of my pillow. Mark, I thought of the above too but my application was a delay and the offset was used as part of the delay like this: movlw 03 andwf baudrate xorlw ?? xorlw ?? xorlw ?? movwf dlycnt decfsz $-1 This obsure method is because I'm using a 16C57 with only 2 levels of stack and limited literal instructions. Pretty clever huh? Given 4 such tables for the RS232 TX and RX routines, it sort of gets confusing, well for me anyway! I think I'll grab the new MPLAB version. My thanks once again... Regards, Jim