Thanks both.
So the Brain (at least as far as inputs are concerned) is not only polling every 100 milliseconds but is acting as a positive going edge triggered interrupt. Sort of:-) That would certainly explain the action of input#2 resetting the dro.
As I see it now, the moment input#1 is pressed, a flag is set in Mach. Within the next 100 ms the Brain is started, which, seeing the flag, carries out the logic of incrementing the DRO. The timer part is acting outside of the Brain, holding the input high for another 100 ms. The Brain, of course, clears the flag. On the next running of the Brain, although the input#1 is still high (held by the timer), it is ignored because the flag is still clear. When the timer times out input#1 is forced low, and if the finger is still on the button the flag will be set again, leading to another increment on the next running of the Brain.
Or, instead of using a flag, the positive action on the input switch could start the Brain immediately.
Am I getting closer?
Regards
Dave Hookings