GDSX Manual
User Exit Descriptions
Extended General Device Support (GDSX) Manual–134303
9-13
USER^COMMANDS
•
If required, a DEVICE^HANDLER or LINE^HANDLER can be coded to handle
user-defined SPI tokens and notify other user tasks.
Example
This example sends a broadcast message to a GDSX process by means of the SPI
interface. After GDSX receives the message, it is passed to the USER^COMMANDS
exit, where user-supplied code can handle the message.
The example uses a TACL routine in a file called TELLGDS. (The three files necessary
for running this example—TELLGDS, UTACLIB, and USERDDL—are not included in
the installed subvolume; they are listed following these instructions.) Before running
TELLGDS, UTACLIB, which contains macros and routines invoked by TELLGDS,
must be loaded, the make^segment macro must be executed at a TACL prompt, and a
named GDSX process must be running. Directions for running the example follow.
The make^segment macro loads in ZSPITACL, ZCOMTACL and a file named
ZGDSTACL for Basic GDS (if you use Extended GDS, change the file name to
ZGDXTACL ). Make sure that these files are correctly qualified in the macro definition
in the UTACLIB file.
Then at the first terminal, called $TERM1 in this example, enter:
> LOAD /KEEP 1/ UTACLIB
> MAKE^SEGMENT
At a second terminal, called $TERM2 in this example, start a GDSX process using
RUND and set a breakpoint at #USER^COMMANDS to view incoming TACL SPI
messages.
> RUND GDSE /NAME $UGDS, NOWAIT/
INSPECT - Symbolic Debugger - T9673C20 - (10JUL89)
Copyright Tandem Computers Incorporated 1983, 1985-1989
INSPECT 077,06,124 $UGDS #GDS.#1366(SMAIN)
- $UGDS-B #USER^COMMANDS
- $UGDS-SOURCEON
- $UGDS-RESUME
> PAUSE
At $TERM1, run the TACL routine TELLGDS. Enclose the text you want to send to
GDSX in quotation marks as shown in this example:
> RUN TELLGDS $UGDS "anything you want to send to GDSX"
Terminal $TERM2 will show a breakpoint at USER^COMMANDS. You must code
your own message-handling logic in the USER^COMMANDS procedure.
Figure 9-1 shows the listing of the TELLGDS file used in this example.