mano machine simulator in c