PJH wrote: > What's not obvious - at least to me - is how best to specify the > general purpose registers in Bank 1, Bank 2 etc. Firstly, use TRIS and OPTION wherever possible. Use ERRORLEVEL to disable the obnoxious warning which suggests you shouldn't. It's some sort of ego-trip within Microchip, no-one has yet revealed the truth AFAIK. > Obviously, I've got to set bits 5,6 in the FSR but can I do that > within CBLOCK? No. > Or do I need to call a MACRO every time I access one of these > registers? Yes, the macro needs to keep track of RB0 (and maybe RB1) in a suitable assembler variable, adjusting RBx as necessary, and any other alteration of these bits must also be performed by a macro which updates this variable. You must be careful about subroutines and code looping; you may want overrides and a macro to set the assembler variable "undefined" at the start of subroutines. > If I do that, how do I stop MPLAB thinking it's found a bank > assignment problem for each of the higher page registers? You XOR the assigned value with the assembler variable representing the current bank, i.e., $80 for bank 1, so the actual value the register sees is in bank 0 and it is happy. > Page structured memories - I just love'em!!! Ptui! -- Cheers, Paul B.