The command DIF=MAINCNT should reset it, so if you you put it right before @LOOP it should reset each time you run the program.