Charles,
It's late, so I have only taken the briefest look, but a couple of things jumped out.
1) You never actually saved wsave, ssave, psave and fsave at the beginning of your ISR.
2) You defined wsave, ssave, psave and fsave(and all the rest) as if you are using a PIC16. Change $20 and bank0 to banka for all of the context variables.
3) You should use the movff command for all the context saving. It does not effect the STATUS reg. (see the datasheet example under interrupts)
4) If you need to save a FSR, you should be saving FSRXH and FSRXL. (It doesn't at first glance look like you need to since I didn't see any commands/reference that use that register) Read the datasheet in the Memory Organization section about Data Addressing Modes (particularly Indirect Addressing)
Start with these items. If I have some time tomorrow I'll take a closer look.
Good night,
Steve
Bookmarks