This involves the following changes and extensions:
stm-xxx [-q QUANTUM] [-d DEBUGGING-LEVEL] [-m MAX] prog1.stm prog2.stm ...where
Context switching involves the following:
E.g.,
% jobs [-q QUANTUM] [-d DEBUGGING-LEVEL] [-m MAX] prog1.stm prog2.stm ...where "%" is the OS prompt, and "jobs" is a key word. You would need to do some simple synchronization since the screen is also used for I/O from your programs.
You should be able to see the current jobs running by typing
% status
Finally, to exit the OS, you type another key word,
% exit