>> >> How do you select the bank? > > > You first make sure you know which bank the variable is in, then save the > current bank bits, then change them to those that the variable is in, then > access it, then restore the bank bits to their original values, to avoid > the > C compiler getting confused. I believe there are #pragma commands to > ensure > that your variable will be in the correct location. Another approach is to define the variable in the asm and put it in the access bank. Both C and asm can then find it without messing with the bank select register. I do this a lot for small variables. Another approach that I use for arrays that would take too much space in the access bank is to use an FSR to access the variable. You have to save away the FSR and restore it for the C code later. Harold -- FCC Rules Updated Daily at http://www.hallikainen.com - Advertise on hallikainen.com - $100/year! -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist