Hi Olin, Thank you for your quick response! The code you wrote can be compiled under MPLAB IDE, right? (I will try it tonight) Let say I cut and paste your code into my project, will the code section that I don't use get compiled into the program as well? Do you have the code for the 16-Family only? Thanks! Thomas >From: Olin Lathrop >Reply-To: pic microcontroller discussion list >To: PICLIST@MITVMA.MIT.EDU >Subject: Re: [PIC]: Please help! Global Calls and Global Gotos >Date: Thu, 5 Jul 2001 16:17:04 -0400 > > > I am coding the PIC16F877 and my code has grown more than 2K. Now I >have > > some problems with CALLs and GOTOs instructions when the code is not on >Page > > 0. I read the "Paging and PCLATH " section on the PlCList archive, but >I >am > > still not sure how to write the code for long call or long goto. The > > "sample code" there is in psedocode form. :( > >Basically, you need to set PCLATH before a global call and restore it after >the call. > > > Is there any codes out there that can do Global Call? Global Goto? > >Yes, see my GCALL (Global CALL) and GJUMP (Global JUMP) macros and related >in STD.INS.ASPIC at http://www.embedinc.com/pic. > > >******************************************************************** >Olin Lathrop, embedded systems consultant in Littleton Massachusetts >(978) 742-9014, olin@embedinc.com, http://www.embedinc.com > >-- >http://www.piclist.com hint: To leave the PICList >mailto:piclist-unsubscribe-request@mitvma.mit.edu > > _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu