\ Some hooks for multitasking \ Main task points to the initial task. This usage is currently not ROM-able \ since the user area address has to be later stored in the parameter field \ of main-task. It could be made ROM-able by allocating the user area \ at a fixed location and storing that address in main-task at compile time. defer pause \ for multitasking ' noop is pause : single (s -- ) \ Turn off multitasking ['] noop ['] pause (is ; : (cold-hook (s -- ) \ interactive? won't work because the fd hasn't been initialized yet (interactive? if title then [compile] forth definitions decimal \ process-command-line ; defer cold-hook ' (cold-hook is cold-hook : cold (s -- ) init-io 100 alloc-mem '"temp ! init-user up@ link ! \ Initialize the task queue clear-context here fence token! cold-hook quit ; : warm (s -- ) single warm-hook quit ; : (warm-hook (s ?? -- ) sp0 @ sp! ; defer warm-hook ' (warm-hook is warm-hook