•  Back 
  •  Main 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TosWin2
Author      : Christian Felsch
Version     : 2.7
Subject     : Documentation/miscellaneous
Nodes       : 31
Index Size  : 838
HCP-Version : 3
Compiled on : Atari
@charset    : atarist
@lang       : en
@default    : 
@help       : 
@options    : -s -t4 +z
@width      : 75
View Ref-FileThe tw-call.app program

The tw-call.app program should be used by N.AES to start TOS programs
(-> Installation).
tw-call's purpose is to forward the TOS program so that it is started
by TosWin2. This way only one TosWin2 instance handles all TOS-Programs.
tw-call not only replaces the old RunTos, it passes the program name and
arguments, but also the current environment and the standard directory to
TosWin2.
In addition to transfering the program data, tw-call has another task:
When a GEM program starts a TOS program (e.g. a TeX shell, like tex.ttp),
the shell usually expects a message when the TOS program has ended. The
TOS program return value may also be important.
Previously RunTos ended immediately after transmiting the program data,
so the TeX shell was not notified when tex.ttp was ended.
The new tw-call behaves differently: after it has sent the data to
TosWin2, it waits until TosWin2 informs it that the TOS program has ended.
TosWin2 sends the TOS program return value to tw-call. After getting this
value, tw-call ends. The calling program is fooled into believing the
incoming CH_EXIT message comes from the TOS program itself and processes
the correct return value.

tw-Call is currently the only way to implement shel_write() extended
modes (that allow to pass the start directory and environment) and to send
a correct CH_EXIT signal to TOS programs under N.AES.

tw-call appears in N.AES program menu under the name of the TOS program.
If the entry is clicked, tw-call sends a message to TosWin2 and the
corresponding window is topped.

If tw-call is started with the "-l" parameter, e.g. directly from the
desktop, it sends a message to TosWin2, which opens a new shell. This
means that the "Start Shell" functionality can be set as a desktop icon
or by assigning a function key.

If tw-call is started without any parameters, it only checks if TosWin2 is
already running and restarts it if necessary.