4 * [Generated from coRoutine, 25 September 1996]
7 #if !defined(__CC_NORCROFT) || !defined(__arm)
8 #error You must use the Norcroft ARM Compiler for Sapphire programs
11 #pragma include_only_once
12 #pragma force_top_level
21 /*----- Overview ----------------------------------------------------------*
31 /* --- coRout_create --- *
33 * On entry: R0 == pointer to coroutine
34 * R1 == R10 value to pass to coroutine
35 * R2 == R12 value to pass to coroutine
36 * R3 == size of stack to pass (0 for default)
38 * On exit: R0 == coroutine handle
41 * Use: Creates a new coroutine. It may be given control using
42 * coRout_switch. Its registers are on entry:
44 * R0 == its coroutine handle
45 * R10 == value passed to coRout_create in R1
46 * R12 == value passed to coRout_create in R2
47 * R13 == pointer to the stack created for it
50 extern routine coRout_create;
52 /* --- coRout_switch --- *
54 * On entry: R0 == coroutine to switch to, or 0 for main
58 * Use: Switches context to another coroutine.
61 extern routine coRout_switch;
63 /* --- coRout_destroy --- *
65 * On entry: R0 == coroutine handle to destroy
69 * Use: Destroys a coroutine.
72 extern routine coRout_destroy;
74 /* --- coRout_end --- *
80 * Use: Terminates the current coroutine.
83 extern routine coRout_end;
85 /*----- That's all, folks -------------------------------------------------*/