pTAL Conversion Guide

Introduction
pTAL Conversion Guide527302-002
1-3
Converting TAL Source Code to pTAL Object Code
The native compilers read source code only from a disk-resident, edit-format file. You
cannot enter source code interactively from your terminal.
Converting TAL Source Code to pTAL Object
Code
Object Code That Runs as a TNS Process on page 1-3
Object Code That Runs as a TNS/R Native Process on page 1-4
Object Code That Runs as a TNS/E Native Process on page 1-4
Object Code That Runs as a TNS Process
1. Using a native compiler, compile your TAL source code with the SYNTAX directive.
2. If the compiler reports syntax errors, correct your TAL source file and repeat
Step 1. If not, go to Step 3.
3. Without the SYNTAX directive, compile your source code using the TAL compiler.
The resulting object file runs as a TNS process.
Reference hardware indicators—the
condition codes (CCL, CCE, CCG),
$CARRY, and $OVERFLOW—at arbitrary
places in your program
Reference a hardware indicators only in an
IF statement that immediately follows the
statement that sets the hardware indicator.
(The native architecture does not support
condition codes—the native compilers
generate object code that enables native
processes to test condition codes as TNS
processes test them.)
Use CODE statements Change algorithms that use CODE
statements.
Use a definition structure as a formal
parameter
Declare the formal parameter as a structure
pointer that references a previously declared
structure layout.
Use these TAL standard routines:
$BOUNDS
$LADR
$RP
$SWITCHES
$USERCODE
Change algorithms that use these standard
routines.
Use certain TAL compiler directives
(primarily those that the TAL compiler
passes to the TNS Binder)
Change algorithms that use these directives.
In pTAL program you cannot: In pTAL program you must: (page 2 of 2)