$regfile = "m8def.dat" $crystal = 3686400 $baud = 9600 Dim A As Byte Config Portb = Output Config Portc = Output Config Pind.4 = Output Dim Tmin As Byte Dim Th As Byte Dim Tzae As Byte Tzae = 0 Tmin = 9 Th = 0 Enable Interrupts ' you need to turn on interrupts yourself since an INT is used Config Atemu = Int1 , Data = Pind.3 , Clock = Pind.7 Open "COMD.6:9600,8,N,1,inverted" For Input As #1 Do Portb = 255 Portc.0 = 1 Inputbin #1 , A Waitms 200 Portd.4 = 0 If A = 16 Then Sendscankbd Laut If A = 17 Then Sendscankbd Leise If A = 32 Then Sendscankbd Up If A = 33 Then Sendscankbd Down If A = 13 Then Sendscankbd Mute If A = 1 Then Sendscankbd Eins If A = 2 Then Sendscankbd Zwei If A = 3 Then Sendscankbd Drei If A = 4 Then Sendscankbd Vier If A = 5 Then Sendscankbd Fuenf If A = 6 Then Sendscankbd Sechs If A = 7 Then Sendscankbd Sieben If A = 8 Then Sendscankbd Acht If A = 9 Then Sendscankbd Neun If A = 0 Then Sendscankbd Null If A = 12 Then Sendscankbd Power_aus If A = 14 Then Sendscankbd Power_wake If A = 10 Then Sendscankbd Enter If A = 21 Then Tmin = Tmin -1 If A = 20 Then Tmin = Tmin + 1 Print A Loop Tzae = Tzae + 1 If Tzae = 127 Then Tzae = 0 'Toggle Portd.4 Portb = Tzae Return Laut: Data 5 , &HE0 , &H32 , &HE0 , &HF0 , &H32 Leise: Data 5 , &HE0 , &H21 , &HE0 , &HF0 , &H21 Mute: Data 5 , &HE0 , &H23 , &HE0 , &HF0 , &H23 Up: Data 5 , &HE0 , &H75 , &HE0 , &HF0 , &H75 Down: Data 5 , &HE0 , &H72 , &HE0 , &HF0 , &H72 Eins: Data 3 , &H16 , &HF0 , &H16 Zwei: Data 3 , &H1E , &HF0 , &H1E Drei: Data 3 , &H26 , &HF0 , &H26 Vier: Data 3 , &H25 , &HF0 , &H25 Fuenf: Data 3 , &H2E , &HF0 , &H2E Sechs: Data 3 , &H36 , &HF0 , &H36 Sieben: Data 3 , &H3D , &HF0 , &H3D Acht: Data 3 , &H3E , &HF0 , &H3E Neun: Data 3 , &H46 , &HF0 , &H46 Null: Data 3 , &H45 , &HF0 , &H45 Power_aus: Data 5 , &HE0 , &H37 , &HE0 , &HF0 , &H37 Power_wake: Data 5 , &HE0 , &H5E , &HE0 , &HF0 , &H5E Mycomputer: Data 5 , &HE0 , &H2F , &HE0 , &HF0 , &H2F Enter: Data 3 , &H5A , &HF0 , &H5A