So müste es gehen
Code:
$regfile = "m8def.dat" 
$crystal = 4000000 
$baud = 19200 

Config Pinb.1 = Output 
Config Pinb.2 = Output 
Config Pind.6 = Input 
Config Pind.5 = Input 
Config Pinc.0 = Output 
Config Pinc.1 = Output 
Config Pinc.2 = Output 

declare sub vor
declare sub zuruck
Config Timer1 = Pwm , Pwm = 8 , Compare A Pwm = Clear Up , Compare B Pwm = Clear Up , Prescale = 1024 


Do 
    Sound Portc.2 , 400 , 450       'anfangs ein sound 

    If Pind.6 = 1 Then Vor 

    End If 

    Sound Portc.2 , 400 , 250             ' eine sound 

    If Pind.5 = 1 Then Zuruck 

    End If 

Loop               ' Und von vorne 
sub vor 
Compare1a = 100     'motor leuft vor 
Portc.0 = 1 
Waitms 50 
Portc.1 = 0 
Waitms 50 
end sub

sub Zuruck                       'motor leuft zuruek 
Compare1a = 100 
Portc.0 = 0 
Waitms 50 
Portc.1 = 1 
Waitms 50 
end sub







End


Das goto Do kenn ich nur von "C" aber in Bascom was ich weis funkt es nicht