A real-time operating system (RTOS) for use with minimal-memory controllers
has a kernel for managing task execution, including context switching, a
plurality of defined tasks, individual ones of the tasks having
subroutines callable in nested levels for accomplishing tasks. In the RTOS
context switching is constrained to occur only at task level, and cannot
occur at any lower sub-routine level. This system can operate with a
single call . . . return stack, saving memory requirement. The single
stack can be implemented as either a general-purpose stack or as a
hardware call . . . return stack. In other embodiments novel methods are
taught for generating return addresses, and for using timing functions in
a RTOS.