Hi Dave,
in fact the MOB switch is a 2 positions ON/OFF toggle switch, there is also a pull down resistor on portB.5.

when MOB occures, the switch is set to ON then the program goes to the mob label, return to GPS label, test if switch is on if wel, loops to mob solong the switch is not set to off.

The writing instructions are after the switch test routine, so there are no updates of de EEPROM during the MOB action, I think it's the simplest way to do it ;o)

regards,
Leinske