Hi Guys,

based on what I found in http://www.picbasic.co.uk/forum/showthread.php?t=4498 I set about modifying the PBPPIC14.LIB to move the library functions out of the low memory so we don't overwrite them when we upload a new programme. I was getting compilation errors about not being able to move the librarys off page 0, but commented out the warning section to see what happened.

Well the answer was - nothing. The programme appeared to not start (I have some LEDs to give me status). I set the library to start at 800 using a custom Make_Loader define that I had in my BL program and it works again.

Custom Define definition from PBPPIC14.LIB
<code>
ifdef MAKE_LOADER ; Added by Bill Coghill 08.01.08
LIST
ORG 800 ; Keep the library code out the way
NOLIST ; was 3584, but would then not work
endif
</code>

So it looks like we can't move the PBP libary files out of page 0 which means that we either need to see if we can jump over them with an ORG 128 (or similar - remember we can only erase blocks of 64 words).

What I need to do is see how big the PBP libraries are when I use an ORG to move the actual program code to high memory.

I wonder if only the Librarys that are used are compiled in ? That would mean if I was to use the bootloader with a skip over the libraries to upload a file that didn't use a library that the Bootloader needed that the next time you tried to go to bootloader mode it would hang the chip.

Just did a quick test and it seems that 153 words are needed for the library functions. But more testing reveals that PBP compiles in the Libs it needs, meaning that the value for the libs may change according to the commands used.

Oh dear and it was all going so well. I need to think about where we can go now.

We might end up loosing a lot of space as a skip at the beginning for the Libraries and 400 words for the BL at the end !!

bill.