the stepper interrupt is only halted when necessary and for the shortest time possible (8% cycle time)
code very messy but tested