Each PIC datasheet explain black on white how to save the context variable.

PIC16F877a section 14.12