$regfile = "m16def.dat" $crystal = 8000000 Config Pina.0 = Input Config Pina.1 = Input Config Pina.2 = Input Config Pinc.0 = Output Config Pinc.1 = Output Config Pinc.2 = Output Do Debounce Pina.0 , 1 , Show1 , Sub Debounce Pina.1 , 1 , Show2 , Sub Debounce Pina.2 , 1 , Show3 , Sub Debounce Pina.0 , 1 , Show1 , Sub Debounce Pina.1 , 1 , Show2 , Sub Debounce Pina.2 , 1 , Show3 , Sub Loop Show1: Pinc.0 = 1 Reset Pina.1 Reset Pina.2 Return A0: Reset Portc.0 Return Show2: If Porta.0 = 1 Then Goto Show1 Set Pinc.1 Reset Pinc.2 Return B0: Reset Portc.1 Return Show3: If Porta.0 = 1 Then Goto Show1 If Porta.1 = 1 Then Goto Show2 Pinc.2 = 1 Return C0: Reset Portc.2 End