> Andrew Warren wrote: > > By the way, don't bother using the "LCALL" pseudo-op... Since it > > doesn't restore the code-page bits after the CALL, it's sorta > > useless. Graham Daniel added: > Regarding the below, stack is taken from actual location at a CALL or > LCALL. > stack is wider than PCL, includes non R/W PCH bits. When you set > program page select bits, these do not take effect until the actual jump > or call at which time a special internal operation transfers them to the > the otherwise non R/W PCH register. > > Easy english: LCALL does not spoil return address on stack. You are correct, it doesn't spoil the return address. BUT... after the return, PCLATH will still contain the code page bits as set by the LCALL, so any subsequent CALL/GOTO/operation-using-PCL-as-destinatio n will use them, which is what Andy meant. LCALL would be more useful if it restored PCLATH upon return. If you have to manipulate PCLATH manuall y when you DO use LCALL, you may as well not use LCALL and control PCLATH yourself. - Andy. ---------------------------------------------------------- Andrew David, Software Manager, Ultronics Ltd, Cheltenham. akdavid@Ultronics.co.uk http:\\www.ultronics.com ----------------------------------------------------------