Hi everybody!

I want to put my '877 in SLEEP mode until i press a pushbutton which is connected to PORTB.0 and GND. I have looked at the the following example:
http://www.melabs.com/resources/samples/x2/pbp/

but when the switch is pressed the program restarts. I try to modify the code so that it can jump to a routine which i want the PIC to excute instead.
How do i wake up the PIC when ONLY i press the button. Watchdog timer is OFF.
Regards,
Tom