pTAL Reference Manual (H06.08+)

Built-In Routines
HP pTAL Reference Manual523746-006
15-31
$CHECKSUM
$CHECKSUM
$CHECKSUM returns the checksum of data.
checksum input,output
uINT:variable
the initial value (seed value) of the checksum. When $CHECKSUM
completes, checksum holds the final checksum. checksum must be an INT
variable. It cannot be a STRING, UNSIGNED, or USE variable or a bit field.
bufferaddr input
EXTADDR:value
the address of the first 16-bit word to include in the checksum.
wordcount input
uINT:value
the number of 16-bit words to include in the checksum.
$CHECKSUM accumulates the checksum by performing an exclusive-or operation on
the accumulated checksum and wordcount successive 16-bit words, starting at
bufferaddr. When $CHECKSUM completes, checksum holds the accumulated
checksum and bufferaddr is unchanged.
pTAL privileged procedure No
Can be executed only by privileged procedures No
Sets condition code No
Sets $CARRY No
Sets $OVERFLOW No
(
checksum
,
bufferaddr
,
) ;
VST613.vsd
wordcount
$CHECKSUM