$regfile = "attiny13.dat" $crystal = 1200000 Dim D As Integer Dim M1 As Byte Dim M2 As Byte Config Adc = Single , Prescaler = Auto Start Adc Pcmsk = 8 Gimsk = 32 On Pcint0 Int_isr Enable Interrupts Do Loop Int_isr: '0,2,3,1 If Pinb.3 = 0 Then If Pinb.4 = 0 Then D = D + 1 If Pinb.4 = 1 Then D = D - 1 End If If Pinb.3 = 1 Then If Pinb.4 = 1 Then D = D + 1 If Pinb.4 = 0 Then D = D - 1 End If 'print D M2 = M1 Return End