The problem is that you have interrupts enabled, but you don't have an interrupt handler routine.
PBP issues a CALL to a routine called hserinloop. The return address is pushed onto the stack. In this loop, it will continuously check the RCIF USART interrupt flag bit, and loop until it's set.
While in this loop, if your interrupt happens, the address within this loop (wherever it happens to be) is pushed onto the return stack.
Note that now you have a return address on the stack that is still inside this loop. Not to where PBP issued the CALL hserinloop.
Once RCIF is set, the received value is loaded into the W reg, and PBP exits hserinloop with GOTO DONE. Inside DONE you land on a RETURN, and you're right back in the hserinloop until the 2nd character arrives.
It works OK for the 2nd character because global interrupts are still disabled.
The original return address is now OK, and on RETURN it shows the 2nd character.
If you disable interrupts this problem goes away since the RETURN will always be to the proper location after PBP issues the CALL to hserinloop.
It has the same problem after a reset because your code is enabling interrupts again.
Bookmarks