added reset handler to c interrupt routine