Paul Reilly wrote: > in page 0... > > BCF PCLATH, 4 ; PCLATH = 01xxx PCL => page1 > BSF PCLATH, 3 ; > CALL page_1 ; call sub in page1 > > and in page 1... > > page_1 RETURN > > .... > > I've tested it, by getting my code to print a ">" on the LCD > before calling the subroutine, and a "<" if it makes it back to page1 > okay. However it never does! It just hangs after printing the ">"! Can > anyone explain why this might be happening? Paul: After the RETURN, the PCLATH is still pointing at page 1, so any subsequent CALLs will go there. To fix it, you need to do something like this: in page 0... BCF PCLATH, 4 ; PCLATH = 01xxx PCL => page1 BSF PCLATH, 3 ; CALL page_1 ; call sub in page1 BCF PCLATH, 3 ; restore PCLATH. -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - San Diego, California === http://www.geocities.com/SiliconValley/2499 -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics