Wozu mit Goto zum Return springen? Einfach gleich ein Return rein.
Code:
$regfile = "m88Adef.dat"
$baud = 19200
$crystal = 8000000
Config Watchdog = 512
$hwstack = 160
$swstack = 100
$framesize = 100
Ddrb = &B00011100
Led1 Alias Portb.2
Led2 Alias Portb.3
Led3 Alias Portb.3
Config Int0 = Falling
On Int0 Isr_int0
Dim Bstop As Bit
Dim L As Long
Enable Int0
Enable Interrupts
Do
Gosub Prg1
Waitms 100 'entprellen
Gosub Prg2
Waitms 100 'entprellen
Gosub Prg3
Waitms 100 'entprellen
Loop
End
Prg1:
Reset Bstop
Do
Toggle Led1
For L = 1 To 1000
Waitms 1
If Bstop = 1 Then
Return
End If
Next L
Loop
Return
Prg2:
Reset Bstop
Do
Toggle Led2
For L = 1 To 1000
Waitms 1
If Bstop = 1 Then
Return
End If
Next L
Loop
Return
Prg3:
Reset Bstop
Do
Toggle Led3
For L = 1 To 1000
Waitms 1
If Bstop = 1 Then
Return
End If
Next L
Loop
Return
Isr_int0:
Set Bstop
Return
Lesezeichen