David Thompson wrote: > > Hi guys, > > My program is rapidly approaching the 1k mark and there is still a lot of > code to write. The development system uses a 16F877, but the final design > will probably use a smaller PIC - maybe a 16C73. > > The question is, are there any things to look out for when crossing page > boundaries (2k with these chips, I think), or more particularly, are there > any tricks to lessen the hassle of doing so? > > I've seen macros to do "long calls" and that kind of thing, which is why I > am asking. > > Thanks, > > Dave. The GOTO and CALL instructions can be used in any 2K bank of ROM space. PCLATH bits 4 and 3 are always concatenated onto these instructions. That gives four 2K banks to select from. PCLATH 4 3 0 0 0h - 7FFh 2K 0 1 800h - FFFh 4K 1 0 1000h - 17FFh 6K 1 1 1800h - 1FFFh 8K Just check to resulting *.lst file if you suspect one of these instructions jumped a page boundary. -- Best regards Tony http://www.picnpoke.com mailto:sales@picnpoke.com