NEIL GANDLER wrote: > 1. When entering an interrupt routine, the pic data book instructs > to store the current values of the W and STATUS registers. They > say that the register W_TEMP must be defined in both banks. So > I assume I can do just that by putting the following in my code > > W_TEMP EQU 25 > W_TEMP EQU 0xA5 > > But I get errors, stating that symbol can not be redefined. To which Clyde Smith-Stubbs replied: "What the book really means is "allocated in both banks", i.e. you must reserve one byte at offset 25 in both banks. But you only need to define the symbol once, as e.g. 25, since when you reference this it will be relative to the currently selected bank anyway." Beware though the offset between the two addresses must be 0x80. Make sure that you use 0x25 rather than 25t (decimal) else this method of storing W and STATUS does not work. (The start of the interrupt routine will have a line which stores to the reserved location 'movwf W_TEMP' but at the moment of storage it is not known whether bank zero or bank one is being addressed. Therefore it is imperative that the offset is 0x80)