Bob Smith x31105 wrote: > Writing my first code for a PC16C74A - the data book indicates that > I need to take care of PCLATH<3> when using CALL or GOTO beyond the > 2k boundary, and further states that I don't need to worry about it > on RETURN... I've found that to be incorrect, at least when running > MPSIM... is this an MPSIM bug? or a mistake in the data book? The note about RETURN simply means that the RETURN instruction is neither affected by nor has any effect on the PCLATH register. The RETURN instruction will always return to the instruction following the call, regardless of the PCLATH register contents. If you change PCLATH before the call to the subroutine, or during the subroutine, the RETURN instruction will not change it back. Ain't bank switching wonderful? Cheers, Eric