252 of 323
ZBasic System Library 242 ZX Microcontroller Family ResumeTask Type Subroutine Invocation ResumeTask(taskStack) ResumeTask() Parameter Method Type Description taskStack ByRef array of Byte The stack for a task of interest. Discussion This routine attempts to change the status of a task to a ready-to-run state. If no task stack is explicitly given, the task stack for the Main() routine is assumed. The table below shows the effect for various task states (as returned by StatusTask()). Effect of Resuming a Task in Various States Status State Effect 0 Ready to run. None, the task is already ready to run. 1 Sleeping. The task is awakened. 2 Awaiting InputCapture(). The task resumes as if the InputCapture() had completed. 3 Awaiting interrupt 0. The task resumes as if the interrupt had occurred. 4 Awaiting interrupt 1. The task resumes as if the interrupt had occurred. 5 Awaiting interrupt 2. The task resumes as if the interrupt had occurred. 6 Awaiting interval expiration. The task resumes as if the interval had expired. 7 Awaiting analog compare. The task resumes as if the comparison interrupt had occurred. 8 Awaiting pin change event 0. The task resumes as if the pin change had occurred. 9 Awaiting pin change event 1. The task resumes as if the pin change had occurred. 10 Awaiting pin change event 2. The task resumes as if the pin change had occurred. 11 Awaiting pin change event 3. The task resumes as if the pin change had occurred. 12 Awaiting OutputCapture(). The task resumes as if the OutputCapture() had completed. 13 Awaiting interrupt 3. The task resumes as if the interrupt had occurred. 14 Awaiting interrupt 4. The task resumes as if the interrupt had occurred. 15 Awaiting interrupt 5. The task resumes as if the interrupt had occurred. 16 Awaiting interrupt 6. The task resumes as if the interrupt had occurred. 18 Awaiting interrupt 7. The task resumes as if the interrupt had occurred. 254 Task exiting. None, exiting tasks can’t be resumed. 255 Terminated. None, halted tasks can’t be resumed. If this routine is invoked using an array other than one that is or was being used for a task stack the result is undefined. See the section on Task Management in the ZBasic Reference Manual for additional information regarding task management. Compatibility This routine is not available in BasicX compatibility mode. See Also ExitTask, RunTask, StatusTask