> My first (unsuccessful) attempt to locate some routines on Page 1 and to > call them from Page 0 has sent me scrambling for the datasheets and whatever > other online resources I could find. There seems be a variety of approaches > to the PCLATH issue, most of which have confused the daylights out of me. > Perhaps someday I'll be up to the more sophisticated techniques (macros, > etc.), but for now, could I not just make every single CALL in my program an > LCALL and call it good? LCALL isn't documented in the MPASM manual I have (DS33014G), although it may be old. I strongly recommend that you don't just try to cheap out and make this project work "somehow" quickly instead of sitting down and learning this right. You're going to have to do that sooner or later, and the sooner you do it the more you will benefit from it and the less messy code you will have around. Macros ARE a good way of dealing with this issue, and the macro language is trivial to learn. You will find them a powerful tool with many uses. The convention I use is that PCLATH is always set for the page the current module is located in, and modules don't cross page boundaries. That means I can use GOTOs and CALLs inside a module without having to worry about PCLATH. For calling outside a module, I use my GCALL (Global Call) macro. It sets PCLATH to the target page, and then does a CALL. Just as important, on return it restores PCLATH to the local page. You also need to think about RAM banks. Take this first project as a learning exercise and either write out all the paging and banking instructions or create yourself some dumb macros to help a little. After you've attained a good understanding of paging and banking, then you'll be ready to look at a bunch of more sophisticated macros I have. You'll find a whole PIC development environment at http://www.embedinc.com/pic. It handles paging, banking, abstraction of I/O pins, portability between processors, and a few other things in a nice integrated way. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu