a 315m discode program based on fsm