•  Back 
  •  LTL protocol 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - The Operating System
Author      : 
Version     : tos.hyp (December 19, 2008)
Subject     : Programmieren/Atari
Nodes       : 3010
Index Size  : 93790
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Title
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File13.7.5  Example: Chatwin and STJ-Oberon-2                          TOS

As an example one should show here briefly how Chatwin (shell) and 
STJ-Oberon-2 (loader) implement the LTL protocol:

   . The Oberon loader installs the OBNL cookie and then launches 
     Chatwin.

   . Chatwin recognizes by the presence of the cookie that LTL is 
     desired and declares itself to the loader with the CL_INIT call. 
     During this Chatwin passes a pointer to a function via which the 
     loader in turn can trigger actions in Chatwin.

   . Whenever Chatwin is directed now to launch a file with the 
     extension '*.OBJ', it passes this file and any parameters that 
     may be required via the message CL_COMMAND to the loader.

     The loader now has to launch the program. If it is dealing with a 
     TOS program, then it can direct the outputs of this program via 
     the LC_WRCHAR and LC_WRSTR messages to Chatwin's console window. 
     If it is dealing with a GEM program, then the loader can direct 
     Chatwin under Single-TOS to close all its windows (LC_CLOSEWIN 
     message) before the program is launched.

     Note: Chatwin recognizes by the extension whether a load-time 
     linking is to be performed for a given file. In older versions 
     the extension '*.OBJ' is fixed, as of Chatwin 3.04 the extension 
     can be specified in the environmental variable $LTLEXT. Due to 
     this Chatwin is prepared also for other languages that do not use 
     '*.OBJ' as extensions for the object files.

   . If there has been no user input for some time and also there are 
     no other tasks pending, Chatwin cedes CPU time to the loader by 
     sending a CL_TIME message. Due to this the loader can perform 
     certain tasks in the background.

   . A special protocol exists for program termination: When Chatwin 
     is terminated, the loader terminates as well.