Scott Thomas
New Member
Hi Folks,
I'm new to this and this is my first post. My program was progressing well then I found a loop in it. I skinnied it down so I could post it and it looks nothing like it did, but the loop is still there. I must be doing something silly. Please point me in the right direction. I'm using an 18x.
symbol Speaker = 3
symbol i = b2
main:
for i = 1 to 60
SerTxD ("Pausing", 13, 10)
pause 5000 'There should be a 5 sec pause between sounds
SerTxD ("Calling Cycle_Relay", 13, 10)
gosub Sub_1
SerTxD ("Returned from Cycle_Relay", 13, 10)
next
end
Sub_1: 'This is where it get's stuck looping and does not return. When working properly they'll be a pause
' between the beeps.
SerTxD ("Sub_1", 13, 10)
gosub Sub_2
gosub A_sound ' short sound
SerTxD ("Returning from Sub_1", 13, 10)
return
Sub_2:
SerTxD ("Entered Sub_2", 13, 10)
gosub Sub_3
Return
Sub_3:
SerTxD ("Entered Sub_3", 13, 10)
gosub Sub_4
return
Sub_4:
SerTxD ("Entered Sub_4", 13, 10)
gosub a_sound
return
A_sound:
sound Speaker,(70, 100)
return
I'm new to this and this is my first post. My program was progressing well then I found a loop in it. I skinnied it down so I could post it and it looks nothing like it did, but the loop is still there. I must be doing something silly. Please point me in the right direction. I'm using an 18x.
symbol Speaker = 3
symbol i = b2
main:
for i = 1 to 60
SerTxD ("Pausing", 13, 10)
pause 5000 'There should be a 5 sec pause between sounds
SerTxD ("Calling Cycle_Relay", 13, 10)
gosub Sub_1
SerTxD ("Returned from Cycle_Relay", 13, 10)
next
end
Sub_1: 'This is where it get's stuck looping and does not return. When working properly they'll be a pause
' between the beeps.
SerTxD ("Sub_1", 13, 10)
gosub Sub_2
gosub A_sound ' short sound
SerTxD ("Returning from Sub_1", 13, 10)
return
Sub_2:
SerTxD ("Entered Sub_2", 13, 10)
gosub Sub_3
Return
Sub_3:
SerTxD ("Entered Sub_3", 13, 10)
gosub Sub_4
return
Sub_4:
SerTxD ("Entered Sub_4", 13, 10)
gosub a_sound
return
A_sound:
sound Speaker,(70, 100)
return