anchor.diff:  
   \ Internal stucture of task memory:
   \  0: Pointer to next task
  -\  4: Task currently active ? (-1 ACTIVE, 0 SLEEPING, 1 WAITING-FOR-INTERRUPT)
  +\  4: Task state (-1 ACTIVE, 0 SLEEPING, 1 WAITING-FOR-INTERRUPT)
   \  8: Saved stack pointer
   \ 12: Handler for Catch/Throw
   \  Parameter stack space
  
positive.code:   r> insert
  ;
  
  : activate ( task --   R: continue -- )
    true over 1 cells + ! \ Currently running
    r> preparetask
  ;
  
  : background ( task --   R: continue -- )
    false over 1 cells + ! \ Currently idling
    r> preparetask
  
negative.code: ;
  
  \ --------------------------------------------------
  \  Convenience functions
  \ --------------------------------------------------
  
  : ms ( ms_delay -- ) \ `ms` which allows other tasks to run - do not use in IRQ!
    millis swap   ( start ms_delay )
    begin
      wfi pause running \ switch to `wfi` to let lowpower-task go to sleep
  