I am looking at using multitasking on a 14M2.
I will have a main chunk of code in Main: which is within a Do-Loop line of code,
main:
Do
Code progressivly working down to Loop to start again
Loop
I want an instant as possible instruction to drop where the code is to go back to main: and restart again. Obviously I will reset any variable values.
As it trundles through the code, do I put my instruction to return to start if a port goes high in multiple places down the code or can I tell it from another loop running in start1: to do that.
ie:
Start1:
Do
If pinC.0 = 1 then
say something in here to make the other code go back to main?
end if
Loop
Sorry if I am not so clear what I mean, I am just trying to find how I can reset my main code asap against an event.
Code not written yet, just pre thinking
I will have a main chunk of code in Main: which is within a Do-Loop line of code,
main:
Do
Code progressivly working down to Loop to start again
Loop
I want an instant as possible instruction to drop where the code is to go back to main: and restart again. Obviously I will reset any variable values.
As it trundles through the code, do I put my instruction to return to start if a port goes high in multiple places down the code or can I tell it from another loop running in start1: to do that.
ie:
Start1:
Do
If pinC.0 = 1 then
say something in here to make the other code go back to main?
end if
Loop
Sorry if I am not so clear what I mean, I am just trying to find how I can reset my main code asap against an event.
Code not written yet, just pre thinking