> Where in the data sheet do you find any claim that doing a return modifies > PCLATH? > > On the parts that I've worked with, return has no effect on PCLATH. > I usually wind up with something like: Thanks for the fast answer but i've found the problem. (You also descriped above). I don't read the datasheet careful enought. (might be a problem of my bad english, too) I've fixed it with a small macro which checks the program location (page) where it inserted and "restores" (set it with the right values) the PCLATH. If anyone cares about, there it is: ---- snip ----------------------------------------------- poppclath macro if $ >= 0x0000 & $ <= 0x07ff bcf PCLATH,3 ; Set PCLATH to Page 0 bcf PCLATH,4 endif if $ >=0x0800 & $ <= 0x0fff bsf PCLATH,3 ; Set PCLATH to Page 1 bcf PCLATH,4 endif if $ >=0x1000 & $ <= 0x17ff bcf PCLATH,3 ; Set PCLATH to Page 2 bsf PCLATH,4 endif if $ >=0x1800 & $ <= 0x1fff bsf PCLATH,3 ; Set PCLATH to Page 3 bsf PCLATH,4 endif endm ---- snip ----------------------------------------------- After a CALL i insert this "POPPCLATH" to fix the PCLATH. cu, Christian -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body