pTAL Conversion Guide

pTAL Built-In Routines
pTAL Conversion Guide527302-002
18-49
$UDIVREM16
op
is an INT(32) value.
$UDIVREM16
$UDIVREM16 provides the functionality of the TNS LDIV instruction. $UDIVREM16
performs unsigned division and produces a quotient and a remainder.
dividend input
INT(32):value
divisor input
sINT:value
pTAL privileged procedure Yes
Can be executed only by privileged procedures Yes
Sets condition code No
Sets $CARRY No
Sets $OVERFLOW No
Example 18-35. Call to $TRIGGER Routine
INT(32) op;
$TRIGGER (op);
Note. The EpTAL compiler does not support this procedure.
pTAL privileged procedure No
Can be executed only by privileged procedures No
Sets condition code No
Sets $CARRY No
Sets $OVERFLOW Yes, if the divisor is 0 or the
quotient is too large
$UDIVREM16
(
,
,divisor
remainder ) ;
quotient
VST653.vsd
,
dividend