Writing a cooperative multitasking system.