> > org 0x00 ;PAGE 0, lower half
> >
> > org 0x0100 ;PAGE 0, upper half
>
> Pages are 2K in size, which takes 11 address bits. 100h is only 256 words
> into page 0. Half way thru page 0 would be 400h.
>
> > Page_1
> > Bank_1
> > call subr_1
> >
> > And have the termination of subr_1 looking like :-
> >
> > org 0x0200 ;Subroutines must go in lower half of PAGE 0
> >
> > subr_1 <.. Do an LCD display ..>
> > Page_0 ;And return to where we were in Page_0
> > Bank_0
> > retlw 0x00
>
> I don't know what page_0 or bank_0 do, but you don't need to set PCLATH
> before a RETURN. The full 13 bit address is stored on the stack. PCLATH is
> not used in performing a RETURN.
>
> >
> > org 0x0300 ;Upper half of PAGE_0
> > ;We can set up a goto instruc to call subroutines
> > from here
> > ;******************************************************
> >
> > 'Cause it loses track of where it is. Err .. so how would you call a
> > Page_1 (lower half) routine from a Page_0 (upper half) main programme?
>
> You seem rather confused about program memory paging. Re-read the data
> sheet carefully and check the PIClist archives. This issue seems to come up
> every week or so.
>
> In my opinion the short answer is to never manually set pages or try to
> allocate particular routines to pages. Let the linker stick the routines
> where it pleases and use PAGESEL. Take a look at my GCALL macro in
> STD.INS.ASPIC at
http://www.embedinc.com/pic.
>
> ********************************************************************
> Olin Lathrop, embedded systems consultant in Littleton Massachusetts
> (978) 742-9014,
.....olinKILLspam
@spam@embedinc.com, http://www.embedinc.com
>
> --
>
http://www.piclist.com hint: The PICList is archived three different
> ways. See
http://www.piclist.com/#archives for details.