Neither bug nor necessarily a mistake. Just a little incomplete. What the book means is that the full 13 bits of the return address is included in the stack, so your subroutine need not know from whence it was called. However, once the subroutine has returned PCLATH is still set the way it was to access the subroutine so if you do further work which is PCLATH dependent you must set it to the current page after the subroutine is called. The verbage in the data book which addresses this is: 'PCLATH is not affected by a PUSH or POP operation.' (section 4.3.2 in my 1996 DS30390D document, p. 41) Brian -----Original Message----- From: Bob Smith x31105 To: PICLIST@MITVMA.MIT.EDU Date: Sunday, March 08, 1998 10:37 PM Subject: PCLATH and P16C74A ?? >Hello All, > >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? > >Thanks! > >Bob