TAL Reference Manual

Standard Functions
TAL Reference Manual526371-001
14-45
Built-in Functions
Some built-ins are functions that return values, as in the following:
a := $ATOMIC_GET(b);
t := $READTIME;
TAL directly implements pTAL built-ins. However, the only parameter data type to some
pTAL built-ins that must be correct is the parameter size. For example, the parameter
for type-transfer functions is checked for size, but not for type. TAL is used only to
generate TNS code on behalf of the pTAL compiler. The TAL compiler does not check
the syntax of pTAL address types and type-transfer functions to the extent that the
pTAL compiler does.
Table 14-3
on page 14-45 describes the eight address type-transfer functions that TAL
implements.
TAL does not ensure that the data type of the type-transfer function parameter is the
data type specified in the type-transfer function name. TAL ensures only that the
lengths of all parameters are one word (16 bits) and that the number of words in the
result is the same as the number of words in the item into which the result is stored.
For more information, refer to the
pTAL Conversion Guide or pTAL Reference Manual.
Table 14-4
describes the list of pTAL built-ins that TAL supports.
Table 14-3. Address type-transfer functions
Function Description
$WADDR_TO_BADDR Converts a WADDR address to a BADDR address
$BADDR_TO_WADDR Converts a BADDR address to a WADDR address
$SGWADDR_TO_SGBADDR Converts a SGWADDR address to a SGBADDR
address
$SGBADDR_TO_SGWADDR Converts a SGBADDR address to a SGWADDR
address
$BADDR_TO_EXTADDR Converts a BADDR address to an EXTADDR address
$WADDR_TO_EXTADDR Converts a WADDR address to an EXTADDR address
$SGBADDR_TO_EXTADDR Converts a SGBADDR address to a EXTADDR
address
$SGWADDR_TO_EXTADDR Converts a SGWADDR address to a EXTADDR
address
Table 14-4. pTAL built-ins (page 1 of 3)
Built - in Description
$EXTADDR_TO_WADDR Converts an EXTADDR address to a WADDR address
$EXTADDR_TO_BADDR Converts an EXTADDR address to a BADDR address
$WADDR_TO_BADDR Converts a WADDR address to a BADDR address
$BADDR_TO_WADDR Converts a BADDR address to an WADDR address