pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

NoSets $CARRY
NoSets $OVERFLOW
int-expression
is an INT expression.
$SPECIAL inspects bits <8:15> of the int-expression and ignores bits <0:7>. $SPECIAL
(int-expression ) has the same value as:
NOT $NUMERIC(int-expression ) AND NOT $ALPHABETIC(int-expression )
If the character passes the test, $SPECIAL returns a -1 (true); otherwise, $SPECIAL returns a 0 (false).
int-expression can include STRING and UNSIGNED(1-16) operands (see Expressions as
Parameters (page 275)).
In Example 306, $SPECIAL tests for the presence of a special character in a STRING argument,
which the system places in the right byte of a word and treats as an INT value.
Example 306 $SPECIAL Routine
STRING char;
IF $SPECIAL (char) THEN ... ; ! Test for special character
$STACK_ALLOCATE
NOTE: The pTAL and EpTAL compilers behave differently.
$STACK_ALLOCATE allocates a block of memory on the stack and returns the address of the block.
NopTAL privileged procedure
NoCan be executed only by privileged procedures
NoSets condition code
NoSets $CARRY
NoSets $OVERFLOW
size
is an INT expression that specifies the number of bytes to allocate. size is an unsigned value
from 0 through 65534.
Difference between pTAL and EpTAL compilers:
EpTAL CompilerpTAL Compiler
If size is not an integral multiple of 32,
$STACK_ALLOCATE rounds size up to the next integral
multiple of 32.
If size is not an integral multiple of 8,
$STACK_ALLOCATE rounds size up to the next integral
multiple of 8.
The returned value is aligned to a 32-byte boundary.The returned value is aligned to an 8-byte boundary.
Blocks returned by multiple calls to $STACK_ALLOCATE are not necessarily contiguous.
$STACK_ALLOCATE returns a WADDR address, which is the lowest address in the allocated
memory.
344 Built-In Routines