cdc:nos2.source:nam5871:ipumclr
Table of Contents
IPUMCLR
Table Of Contents
- [00002] PROC IPUMCLR (ADDRESS, NUMWORD)
- [00004] IPUMCLR CLEARS WORDS IN MEMORY
Source Code
- IPUMCLR.txt
- *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
cdc/nos2.source/nam5871/ipumclr.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator