The GENESIS shell provides a framework in which a simulation programmer can define and manipulate GENESIS elements. But the shell also includes a number of generally useful routines. The table below lists some of these routines. (For more detailed descriptions on any GENESIS routine, refer to the reference section on the specific routine.)
Routine | Description |
exit | Exits from GENESIS, terminating any simulation in progress. |
quit | Alias for exit routine. |
help | Displays help on GENESIS topics. |
h | Displays the contents of the command-history buffer. |
setprompt | Sets string to use as prompt for GENESIS shell. |
addescape | Adds an escape-key macro binding. |
listescape | Lists available escape-key/command-sequence bindings. |
addalias | Associates alternative name with existing GENESIS routine. |
echo | Prints out its arguments to the console. |
listglobals | Lists currently defined global variables and functions. |
version | Returns the version of GENESIS being used. |
The GENESIS routines used for interacting with the operating system include the following:
Routine | Description |
sh | Issues operating system command from GENESIS shell. |
cd | Changes current working operating system directory. |
getdate | Returns operating system date-time. |
setenv | Set value of operating system environmental variable. |
getenv | Returns value of operating-system environmental variable. |
printenv | Displays value of operating-system environmental variable. |
tset | A normal UNIX tset. |
cpu | Displays current cumulative cpu usage for user and system time. |
The GENESIS routines used for adding new routines to the environment include the following:
Routine | Description |
listcommands | Displays list of routines currently recognized by GENESIS. |
showcommand | Displays name of C function invoked by a GENESIS command. |
callfunc | Calls a function whose name is stored in a string variable. |
Routine | Description |
argc | Returns argument count (number of arguments passed to the |
procedure). | |
argv | Returns procedure arguments as an array of strings. |
arglist | Converts list of items into an argument list. |
getarg | Returns specified item from an argument list. |
printargs | Displays its arguments with argument numbers. |
error | Print error message. |
warning | Print warning message. |
maxerrors | Sets (or displays) number of errors currently allowed before |
a simulation is automatically stopped. | |
maxwarnings | Sets (or displays) number of warning messages currently |
allowed before a simulation is automatically stopped. | |
clearerrors | Resets error count to 0. |
debug | Sets (or displays) the debug level used by some routines. |
debugfunc | Sets (or displays) the debug level for a specific routine. |
silent | Sets/clears flag which supresses certain information |
displays to console. | |