pTAL Conversion Guide

pTAL Built-In Routines
pTAL Conversion Guide527302-002
18-8
Built-In Routines and Hardware Indicators
Built-In Routines and Hardware Indicators
If the built-in routine does not specify the value of a hardware indicator, the value of the
hardware indicator is undefined after the built-in routine completes. If you reference a
hardware indicator when it is undefined, the native compiler reports a syntax error.
If the value of $OVERFLOW would be nonzero after executing a built-in routine, an
overflow trap occurs if overflow traps are enabled. If overflow traps are disabled, you
must test $OVERFLOW explicitly in your program.
$ASCIITOFIXED
$ASCIITOFIXED converts an ASCII-coded value to a binary-coded FIXED value. The
syntax of $ASCIITOFIXED is:
bufferaddr input,output
BADDR:variable
is the byte address in the user data segment from which $ASCIITOFIXED reads
ASCII digits. When $ASCIITOFIXED completes, bufferaddr contains the address
following the last byte read.
maxdigits input
uINT:value
is the maximum number of ASCII digits to read from bufferaddr.
remainingdigits output
uINT :variable
is the number of bytes that $ASCIITOFIXED did not convert because it
encountered a nonnumeric ASCII byte. remainingdigits must be an INT
variable; it cannot be a STRING, UNSIGNED, or USE variable or a bit field.
$ASCIITOFIXED (
bufferaddr
, ,
maxdigits
) ;qvalueout
qvaluein
,
VST606.vsd
remainingdigits