TAL Programmer's Guide
CRE Guidelines for TAL
Mixed-Language Programming
17–44 096254 Tandem Computers Incorporated
The following example shows SEARCH directives for TALLIB and CLULIB, followed
by SOURCE directives for TALDECS, CREDECS, and CLUDECS:
?ENV COMMON
NAME cre_example;
?SEARCH $SYSTEM.SYSTEM.TALLIB
?SEARCH $SYSTEM.SYSTEM.CLULIB
?SOURCE $SYSTEM.SYSTEM.TALDECS (TAL_CRE_INITIALIZER_)
?SOURCE $SYSTEM.SYSTEM.CREDECS (CRE_TERMINATOR_)
?SOURCE $SYSTEM.SYSTEM.CLUDECS (SMU_ASSIGN_DELETE_)
You can specify the SEARCH directive in the command to start the compiler, instead
of in the source file. Here is an example:
TAL /IN mysrc, OUT $s.#mylst, NOWAIT/ myprog;
SEARCH $SYSTEM.SYSTEM.TALLIB
If you do not use the SEARCH directive for TALLIB and CLULIB, you can bind the
files into the object file by issuing Binder commands. Here is an example:
ADD * FROM myprog
SELECT SEARCH $SYSTEM.SYSTEM.TALLIB
SELECT SEARCH $SYSTEM.SYSTEM.CLULIB
BUILD myprog
Initializing the CRE To initialize the CRE and optionally save system messages, call
TAL_CRE_INITIALIZER_ in the first statement of your MAIN routine.
TAL_CRE_INITIALIZER_ does the following actions:
It calls the ARMTRAP procedure and establishes a trap handler.
It optionally saves startup, ASSIGN and PARAM messages.
It determines the name of your program’s standard log.
The TALLIB file contains TAL_CRE_INITIALIZER_. The TALDECS file contains the
external declaration for TAL_CRE_INITIALIZER_, as follows:
PROC TAL_CRE_INITIALIZER_ (options) EXTENSIBLE;
INT options; !Input, optional
EXTERNAL;
The OPTION parameter lets you save the startup, ASSIGN, and PARAM messages for
manipulation by your routine. OPTION flags you can specify for the actual parameter
are provided in the CREDECS file in the INITIALIZATION section, as follows:
CRE^Save^all^messages
CRE^Save^startup^message
CRE^Save^assign^message
CRE^Save^param^message