You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

145 lines
4.5 KiB

<h1>Using Multiple Interactive Programs on TWENEX</h1>
<p>December 28, 2011</p>
<p>TOPS-20 allows you to use multiple interactive programs simultaneously
from a single login session. For example, in the middle of editing a
document you can run other programs or commands, lookup help files,
refer to e-mail messages, etc., and then return to your editing
session in the same state you left it.</p>
<p>(Multiple non-interactive programs can be run using the TOPS-20 batch
facility. See the TOPS-20 User's Guide<a href="#n1">[1]</a> chapter 10 "Using Batch".)</p>
<p>The functions described in this tutorial are equivalent to those on
Unix systems invoked with the Ctrl-Z key and commands like fg, jobs,
<p>There are two ways to run multiple interactive programs<a href="#n2">[2]</a> in TOPS-20:
<li>Push/Pop: From an interactive session you run another program, then
return to the first program when the called program is complete.</li>
<li>Multiforking: You run two or more interactive programs in parallel
and switch among them as needed, preserving the program session state from the
last time you visited the program.</li>
<p>This method involves starting a new EXEC command level subordinate to
your login EXEC. The state of your original program is preserved in
your login EXEC while you run one or more programs in the child EXEC
level. When done, you terminate the child EXEC and return to your
original program.</p>
*^C ! Return from program session to EXEC
^C ! (only single ^C will echo).
@PUSH ! Start child EXEC instance.
TOPS-20 Command processor 7(4168)-1
@MM ! Start a program in the child EXEC.
... ! Use program then exit.
@POP ! Terminate child EXEC and return to
! parent EXEC.
@CONTINUE<a href="#n3">[3]</a> ! Return to original program session.
* ! Depending on the program you may
! continue entering commands or
! refresh the display.
<p>With multiforking, you run multiple programs in the same EXEC by
forking a separate address space to maintain each program's state. You
can then move between the forks and their corresponding programs at
will. You do not need to end a program before returning to a
previously used program session, and may revisit any of the forked
programs multiple times preserving each program's session status.</p>
*^C ! Return from program session to EXEC
^C ! (only single ^C will echo).
@KEEP ! Create separate address space for
! new program.
@MM ! Start new program.
... ! Use program.
MM>^C ! Return from second program to EXEC.
@INFORMATION FORK-STATUS<a href="#n3">[3]</a>
! List forks in current EXEC.
! (Current fork marked with "=>".)
TECO (1): Kept, ^C from IO wait at TYI+3, 0:00:00.0
=> MM (2): ^C from IO wait at $COMND+3, 0:00:00.0
@FORK TECO ! Switch to original program's fork
! ("TECO").
@CONTINUE ! Return to original program session.
... ! Use original program.
*^C ! Return to EXEC.
=> TECO (1): Kept, ^C from IO wait at TYI+3, 0:00:00.0
MM (2): ^C from IO wait at $COMND+3, 0:00:00.0
@FORK MM ! Switch to second program fork ("MM").
@CONTINUE ! Resume second program session.
<h2>More Information</h2>
<p>More information can be found in TOPS-20 User's Guide<a href="#n1">[1]</a> sections 8.6
"Running Programs Without Destroying Memory" and 8.7 "Running Multiple
<dt><a name="n1">[1]</dt><dd>TOPS-20 User's Guide. Available on in file
DOC:USERS.MEM or on the WWW at <a href=""></a>.</dd>
<dt><a name="n2">[2]</dt><dd>It is only necessary to use these methods when you wish to use two
or more user programs at the same time. Running a user program
from EXEC without first running PUSH or KEEP will overwrite the
user program address space and destroy the session state of the
previously running program. However, EXEC commands generally do
not disturb user program address space. You can halt an active
program (with ^C^C), run several EXEC commands (e.g. DIRECTORY,
HELP, TYPE), and return to your original program (with CONTINUE) in
the state you left it.</dd>
<dt><a name="n3">[3]</dt><dd>EXEC commands and options may be abbreviated to the minimum unique
prefix, for example:
$Id: twenex-multiprg.html,v 1.2 2011/12/28 09:43:56 papa Exp $