pTAL Conversion Guide

pTAL Built-In Routines
pTAL Conversion Guide527302-002
18-6
Parameters to Built-In Routines
Parameters to Built-In Routines
Parameters to built-in routines are always passed by value—they do not have
reference parameters. If a parameter to a built-in routine is a memory address, the
address must be the correct address type. For example, if the address type of a
parameter is BADDR, you must pass either the name of a BADDR variable, or the
address of a TAL STRING pointer (for example, @s).
For example, a built-in routine called $BUILT_IN that takes one parameter whose data
type is BADDR must pass one of:
A BADDR variable:
BADDR b;
$BUILT_IN(b); ! OK: data type of b is BADDR
The address field of a STRING pointer:
STRING .s;
$BUILT_IN(@s); ! OK: address type of @s is BADDR
$BUILT_IN(s); ! ERROR: data type of s is STRING
You must apply an @ operator to the STRING pointer, whether the parameter to the
built-in routine is an input parameter, an output parameter, or both.
$UDIVREM32
5
Y Divides an INT(32) dividend by
an INT divisor to produce an
INT(32) quotient and INT
remainder
$UNLOCKPAGE
5
Y Y Unlocks one physical page of
extended memory
$WRITEPTE
5
Y Y Writes a segment-page table
entry
Table 18-2. pTAL Built-In Routines That TAL Does Not Support (page 3 of 3)
Routine Name P
1
CC
2
OF
3
C
4
Description
1. Y specifies that a process must be privileged to execute this built-in routine.
2. Y specifies that the built-in routine alters the condition code.
3. Y specifies that the built-in routine alters the overflow indicator.
4. Y specifies that the built-in routine alters the carry indicator.
5. The EpTAL compiler does not support this routine.
6. The EpTAL compiler allows the name of this routine as a DEFINE name. $TRIGGER replaces this routine.
7. The pTAL compiler does not support this routine.