Hi All, Sorry to hassle with a seemingly simple problem. I'm trying to move onto using MPLINK instead of absolute mode. I am using 16F870. This chip has only shared GP ram. Only the SFR's are bank fixed. Some of the general purpose ram is available in bank 0 and 2, and some is available in bank 1 and 3. There is also a block that is available in bank 0,1,2 and 3. Here is the relevant part of 16f870.lkr:- // GP-RAM available from banks 0 and 2 SHAREBANK NAME=gprnobnk0 START=0x20 END=0x6F SHAREBANK NAME=gprnobnk0 START=0x120 END=0x16F // GP-RAM available in banks 1 and 3 SHAREBANK NAME=gprnobnk1 START=0xA0 END=0xBF SHAREBANK NAME=gprnobnk1 START=0x1A0 END=0x1BF //GP-RAM available in all banks SHAREBANK NAME=gprnobnk2 START=0x70 END=0x7F SHAREBANK NAME=gprnobnk2 START=0xF0 END=0xFF SHAREBANK NAME=gprnobnk2 START=0x170 END=0x17F SHAREBANK NAME=gprnobnk2 START=0x1F0 END=0x1FF So, when I want to reserve space for variables in my program, I have to use UDATA_SHR. What is confusing me though, is if I have the linker allocate a variable, I do not know where it has put it, hence I don't know which bank to select to access it. I know I can select the correct bank with "banksel", but surely this means I have to do it every single time I access a variable? Hard to explain what I mean. I'll make up some code now: absolute mode: cblock 0x20 ; 0x20 is bank 0 temptime_l temptime_h endc ... org 0x04 inthanler: banksel INTCON ; INTCON is bank 0 btfss INTCON,RBIF retfie ; my made up code stores TMR1 value in temptime_l and temptime_h upon RB0 interupt movw TMR1H,W movwf temptime_h movw TMR1L,W movwf temptime_l retfie Ok, in that (made up) code, I only needed to banksel one time. Because I knew that everything else was bank 0- all the SFR's and also my two temp vars. Now, if I use the linker and have it allocate a variable, I don't know which bank it sits in. It might be in the block named gprnobnk2, in which case bank selection isn't necessary. But if could put it in gprnobnk1 - which is not accessible from bank 0. so, in absolute mode my code equivalent to the above would need to be:- UDATA_SHR temptime_l RES 1 temptime_h RES 2 CODE inthandler: banksel INTCON ; INTCON is bank 0 btfss INTCON,RBIF retfie ; my made up code stores TMR1 value in temptime_l and temptime_h upon RB0 interupt movw TMR1H,W banksel temptime_h ; don't know where this is... movwf temptime_h banksel TMR1L movw TMR1L,W banksel temptime_l movwf temptime_l retfie So here I have gone from one to four banksel's in the same block of code. I am being an idiot? Surely object/linker mode is not this fiddly and time wasting? Any tips appreciated, thanks jon -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.