At 10:13 AM 2/13/03 -0700, Micro Eng wrote: >Its been a while since I've had to code into page 1. If you have an ISR >being triggered by TMR0, such that it is always going into it, what happens >when you enter it from page1, make calls from the ISR into page0 then return >back to page1. You have mess with PCLATH if you have *any* goto or call statements in your ISR code. If your ISR is very simple with no goto statements, you are OK. The problem occurs if you have even just one single goto or call statement: the statement needs PCLATH set correctly so that you wind up in the correct page. The cure is simple: save PCLATH as part of your context save, then set PCLATH to the correct value for the ISR. Make sure you restore PCLATH to what it was when you restore context. >Does the stack contain the fact that you started in page1, so will it return >ok back there or do I (should I) disable interupts when I am running stuff >in page1 The stack contains the full return address. dwayne -- Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax Celebrating 19 years of Engineering Innovation (1984 - 2003) .-. .-. .-. .-. .-. .-. .-. .-. .-. .- `-' `-' `-' `-' `-' `-' `-' `-' `-' Do NOT send unsolicited commercial email to this email address. This message neither grants consent to receive unsolicited commercial email nor is intended to solicit commercial email. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.