Autor Wiadomość
mateusz19955
PostWysłany: Wto 15:35, 25 Maj 2010    Temat postu: RC-5

mam taki program:

$regfile = "m16def.dat"
$crystal = 16000000
Config Portb = Output
Config Portc = Output
Config Portd = Output
Config Porta = Input
Reset Porta.0
Reset Portc.0
Reset Portd.0
Reset Portb.0
Do
Dim Adres As Byte
Dim Klawisz As Byte
Config Rc5 = Pina.2
Enable Interrupts
Do
Getrc5(adres , Klawisz)
Klawisz = Klawisz And &B1011111
If Klawisz = 0 Then
Set Portb.0
Else
If Klawisz = 1 Then
Set Portb.1
Else
If Klawisz = 2 Then
Set Portb.2
Else
If Klawisz = 3 Then
Set Portb.3
Else
If Klawisz = 4 Then
Set Portb.4
Else
If Klawisz = 5 Then
Set Portb.5
Else
If Klawisz = 6 Then
Set Portb.6
Else
If Klawisz = 7 Then
Set Portb.7
Else
If Klawisz = 8 Then
Set Portc.0
Else
If Klawisz = 9 Then
Set Portc.1
Else
If Klawisz = 10 Then
Set Portc.2
Else
If Klawisz = 11 Then
Set Portc.3
Else
If Klawisz = 12 Then
Set Portc.3
Else
If Klawisz = 13 Then
Set Portc.4
Else
If Klawisz = 14 Then
Set Portc.5
Else
If Klawisz = 15 Then
Set Portc.6
Else
If Klawisz = 16 Then
Set Portc.7
Else
If Klawisz = 17 Then
Set Portd.0
Else
If Klawisz = 18 Then
Set Portd.1
Else
If Klawisz = 19 Then
Set Portd.2
Else
If Klawisz = 20 Then
Set Portd.3
Else
If Klawisz = 21 Then
Set Portd.4
Else
If Klawisz = 22 Then
Set Portd.5
Else
If Klawisz = 23 Then
Set Portd.6
Else
If Klawisz = 24 Then
Reset Portb.0
Reset Portb.1
Reset Portb.2
Reset Portb.3
Reset Portb.4
Reset Portb.5
Reset Portb.6
Reset Portb.7
Reset Portc.0
Reset Portc.1
Reset Portc.2
Reset Portc.3
Reset Portc.4
Reset Portc.5
Reset Portc.6
Reset Portc.7
Reset Portd.0
Reset Portd.1
Reset Portd.2
Reset Portd.3
Reset Portd.4
Reset Portd.5
Reset Portd.6
Reset Portd.7
Set Portd.7
End If
Loop
End

program sam napisałem (jestm dopiero początkujący w pisaniu programów do procków) i gdy chcem go skompilować to wyskakuje mi taki błąd:
ERROR : 7 Line : 0 IF THEN expected [120] , in File:
ERROR : 123 Line : 0 END IF expected , in File:
gdzie tu jest błąd?
proszę o pomoc

Powered by phpBB © 2001,2005 phpBB Group