317 of 318
ZBasic System Library 307 ZX Microcontroller Family Yield Type Subroutine Invocation Yield() Discussion This routine is can be called whenever it is desirable to allow another task to run that is ready to run. One particular situation in which it is useful is at the end of a long process during which UpdateRTC() has been called one or more times. Normally, when an RTC interrupt occurs a task switch is performed immediately if the current task’s time slice has expired or if a task is awaiting the expiration of an interval and the interval period has elapsed. However, if interrupts are disabled this automatic task switch cannot be performed. A call to UpdateRTC() will prepare the system for an eventual task switch which is then triggered by a call to Yield(). Example See the example at UpdateRTC. See Also UpdateRTC