Hi Denny,
You have a couple of options.
1. The easiest option is to just place the branch routine & the sub it branches to in the beginning section of your code. Then insert a goto Main to jump over both to your main routine.
2. Examine the .lst file generated after compiling your code to see where your routines are being placed in program memory. They might be within the first 2k depending on how large your program is, and how many library routines your code is using. PBP has to stuff all library routines in the first code page.
3. Force PBP to compile the routine in a certain code page using the @ org statement. I.E. @ org 0x800 would force PBP to place code below the org statement starting in page 1 at 800h.
With option 3 you're going to waste code space between pages, but it does guarantee where the routines are physically placed at compile time. Normally you're better off just using branchl than option 3.
Bookmarks