> One way around this is to define symbols at the front of your code > identifying the page that each routine is going to be in: > > P_Routine1 = 0 > P_Routine2 = 1 > > ... > > Note that none of this magic is likely to work when using the linker. No, it would work better. You define the P_xxx constants in an include file, then use them to guarantee each routine is placed onto the chosen page. Your ENTPT macro then doesn't need to verify that it is on the right page, it puts it on the right page. Here is what some of the code would look like assuming linker sections called .PAGEn where N is the page number: p_suba equ 0 ;set page for SUBA .page#v(p_suba) code suba I actually use a very similar scheme for placing variable in specific banks, but otherwise let the linker allocate memory within the bank. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads