/* Push ACC first, as when restoring the context it must be restored
* last (it is used to set the IE register). */
push ACC
/* Push ACC first, as when restoring the context it must be restored
* last (it is used to set the IE register). */
push ACC
ao_cur_task->stack_count = stack_len;
stack_ptr = (uint8_t __data *) AO_STACK_START;
save_ptr = (uint8_t __xdata *) ao_cur_task->stack;
ao_cur_task->stack_count = stack_len;
stack_ptr = (uint8_t __data *) AO_STACK_START;
save_ptr = (uint8_t __xdata *) ao_cur_task->stack;
/* Find a task to run. If there isn't any runnable task,
* this loop will run forever, which is just fine
/* Find a task to run. If there isn't any runnable task,
* this loop will run forever, which is just fine
stack_ptr = (uint8_t __data *) AO_STACK_START;
save_ptr = (uint8_t __xdata *) ao_cur_task->stack;
while (stack_len--)
*stack_ptr++ = *save_ptr++;
stack_ptr = (uint8_t __data *) AO_STACK_START;
save_ptr = (uint8_t __xdata *) ao_cur_task->stack;
while (stack_len--)
*stack_ptr++ = *save_ptr++;