Hi all. I've just come across a problem that I've never had happen before. Likely that was due to luck. Now I'm not sure what the best way to solve it is. At the start of my ISR, I save WREG, STATUS, and BSR (this is a PIC18F) to temporary registers. I then restore them on exit. I've been tracking a bug that seems to be manifesting itself due to incorrect bank selection. Here's why I think this is happening, look at the addresses of the following registers: W_Temp 0x080 PORTA 0xF80 The other registers have similar overlapping low byte addresses. So...going into my ISR I might not be in the correct bank. But if I change the bank, I've upset the current state and things won't get restored correctly. I'm not really sure what to do on this one. I suppose I could use a lot of banksel commands (and that's likely what I'm going to try while waiting to see what everyone else thinks), but is there a better way? I'm currently using code Microchip put in the data sheet for context saving, which means it might not be the best. I'd like to keep using my own registers rather than the fast return stack as I'd like the capability of moving to two priority interrupts later on. Thanks! Josh -- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist