Hi, sorry, I'm not sure it is true S, Garcia wrote. Imagine, you are on the 2nd page already in programming. You think all is fine as you want to make a GOTO with target on the 2nd page. But, IMHO, you will land on the 1st page as neither PIC nor the assembler updates PCLATH automagically when crossing page boundary (i. e. it contains still zero) and the PIC use its content when executing GOTO or CALL always (!) AFAIK. Regards, Imre On Sat, 15 Apr 2000, Sebastian Garcia wrote: > Kieran, > > -----Original Message----- > From: Kieran Miller > To: PICLIST@MITVMA.MIT.EDU > > > |Hi, > | > |I'm merrily writing code for my PIC 16F874 - and the program size is > |increasing fast. What happens when I reach a page boundary? Do I need to do > |something with PCLATH, or will the assembler flag a warning or do whatever > |is necessary for me? > > > No problem if You cross the boundary with sequential instructions. > > Only if You do a *call* or *goto* to an address in other that the current > page, You must ensure that the page select bits (PCLATH<4,3>)are programmed > according to the page desired. > (In your case, 'F874, You can ignore PCLATH<4>) > > Don't worry in the return from a *call*, the entire 13 bit PC is pop'ed from > the stack. > > Regards, > > S.- > >