[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3.1.9 Exec and Return to Cogsys (%E)

This command suspends Cogsys execution completely and runs an entirely different program.

The most common program to run is `command.com', which is the MS-DOS command interpreter. This lets the user access all DOS commands and then return to Cogsys and continue the experiment. If the command interpreter is invoked, Cogsys will display a message reminding the user that the shell was spawned by Cogsys and that the exit command can be used to return.

It is important to note that all extended memory is released before the new program is started; this means all pictures are unloaded. Cogsys will return to the same video mode it left in.

Tech note: Technically, exec means the current process is replaced with a new one, and the calling process never completes. The correct term for this command is wait, but since that already has an important meaning for Cogsys, "Exec and Return" is used instead.

Name:
Exec and Return
Class:
Control
Code:
%E
Syntax:
%E[program,args]
program is the name of the program to execute
args are any argument that the program requires
System:
Completely suspends Cogsys, and runs program with arguments args.
Requires:
No "useful" (ie, undisplayed) picture should be loaded; they will need to be reloaded to be displayed after the %E command returns.

Test Files:
`EXEC_T01.IN'
tests basic operation

Example:

input
%E[c:\dos\command.com]
cogsys
Flushes pictures and displays a DOS prompt.
subject
Can enter any MS-DOS command (like copy, dir, etc.). Types exit to return to Cogsys.



This document was generated by Usman Muzaffar on June, 28 2000 using texi2html