*DECK IPUMCLR
PROC IPUMCLR (ADDRESS, NUMWORD);
*CALL COPYRITE CDCNET - COPYRIGHT CONTROL DATA. 1992.
# TITLE IPUMCLR CLEARS WORDS IN MEMORY #
BEGIN # IPUMCLR #
#
**** IPUMCLR - CLEARS WORDS IN MEMORY
*
* THIS PROCEDURE IS A UTILITY THAT CLEARS *NUMWORD* WORDS STARTING
* AT MEMORY LOCATION *ADDRESS*.
*
* PROC IPUMCLR (ADDRESS, NUMWORD)
*
* ENTRY ADDRESS = MEMORY LOCATION TO INITIALIZE
* NUMWORD = NUMBER OF WORDS TO CLEAR
*
* EXIT ADDRESS = *NUMWORD* WORDS CLEARED
*
#
ITEM ADDRESS U; # STARTING ADDRESS #
ITEM NUMWORD I; # NUMBER OF WORDS TO CLEAR #
#
**
#
BASED ARRAY MEMLOC [0:0] S(1); # ARRAY OF WORDS #
BEGIN
ITEM MEM$WRD U(00,00,60); # WORD REFERENCE #
END
ITEM INDEX I; # ARRAY COUNTER #
CONTROL EJECT;
#
**** START MAIN PROCEDURE
#
P<MEMLOC> = ADDRESS; # BASE MEMORY POINTER #
FOR INDEX = 0 STEP 1 UNTIL (NUMWORD - 1) DO
BEGIN # LOOP THROUGH REQUESTED INTEGER#
MEM$WRD [INDEX] = 0;
END
RETURN; # RETURN TO CALLER #
END # IPUMCLR #
TERM