pTAL Conversion Guide

Introduction
pTAL Conversion Guide527302-002
1-2
TAL FeaturesThat pTAL Does Not Support
Optional clauses to optimize program performance by specifying how data is
stored in memory:
°
FIELDALIGN for structure alignment
°
REFALIGNED for pointer alignment
Compiler directives:
°
CHECKSHIFTCOUNT
°
FIELDALIGN
°
OVERFLOW_TRAPS
°
REFALIGNED
Built-in routines that provide the functionality of some TNS machine instructions
The TAL compiler accepts most of the preceding pTAL features (which means the TAL
and native compilers can usually compile the same source code); however, some of
the new pTAL features do not affect the object code that the TAL compiler generates).
TAL FeaturesThat pTAL Does Not Support
pTAL does not support TAL constructs that are not portable (those that depend on TNS
architecture).
In pTAL program you cannot: In pTAL program you must: (page 1 of 2)
Reference the base-address symbols 'G', 'L',
and 'S'
Change algorithms that depend on
accessing data relative to the G, L, or S
registers
Access the stack marker to obtain
information about the procedure that called
the current procedure
UsepTAL built-in routines that provide
equivalent functionality
Build a parameter mask when you call a
variable or extensible procedure
Use the built-in routine $OPTIONAL for each
optional parameter
Use the TNS instruction CODE(DPCL) to
dynamically select a procedure to call
Use a pTAL procedure pointer (PROCPTR)
instead
Declare equivalenced variables that
reference memory outside of the memory
allocated to the variables they reference
Change algorithms that depend on declaring
equivalenced variables that reference
memory outside of the memory allocated to
the variables they reference.
Assume that separately declared data items
are allocated in contiguous memory
Change algorithms that assume that
separately declared data items are allocated
in contiguous memory.
Depend on how pTAL passes actual
parameters to procedures
Treat each procedure parameter as a unique
data item, unrelated to other parameters or
to the procedure’s local data.