User Tools

Site Tools


cdc:nos2.source:nam5871:ipumclr

IPUMCLR

Table Of Contents

  • [00002] PROC IPUMCLR (ADDRESS, NUMWORD)
  • [00004] IPUMCLR CLEARS WORDS IN MEMORY

Source Code

IPUMCLR.txt
  1. *DECK IPUMCLR
  2. PROC IPUMCLR (ADDRESS, NUMWORD);
  3. *CALL COPYRITE CDCNET - COPYRIGHT CONTROL DATA. 1992.
  4. # TITLE IPUMCLR CLEARS WORDS IN MEMORY #
  5.  
  6. BEGIN # IPUMCLR #
  7. #
  8. **** IPUMCLR - CLEARS WORDS IN MEMORY
  9. *
  10. * THIS PROCEDURE IS A UTILITY THAT CLEARS *NUMWORD* WORDS STARTING
  11. * AT MEMORY LOCATION *ADDRESS*.
  12. *
  13. * PROC IPUMCLR (ADDRESS, NUMWORD)
  14. *
  15. * ENTRY ADDRESS = MEMORY LOCATION TO INITIALIZE
  16. * NUMWORD = NUMBER OF WORDS TO CLEAR
  17. *
  18. * EXIT ADDRESS = *NUMWORD* WORDS CLEARED
  19. *
  20. #
  21.  
  22. ITEM ADDRESS U; # STARTING ADDRESS #
  23. ITEM NUMWORD I; # NUMBER OF WORDS TO CLEAR #
  24.  
  25. #
  26. **
  27. #
  28.  
  29. BASED ARRAY MEMLOC [0:0] S(1); # ARRAY OF WORDS #
  30. BEGIN
  31. ITEM MEM$WRD U(00,00,60); # WORD REFERENCE #
  32. END
  33.  
  34. ITEM INDEX I; # ARRAY COUNTER #
  35. CONTROL EJECT;
  36. #
  37. **** START MAIN PROCEDURE
  38. #
  39.  
  40. P<MEMLOC> = ADDRESS; # BASE MEMORY POINTER #
  41.  
  42. FOR INDEX = 0 STEP 1 UNTIL (NUMWORD - 1) DO
  43. BEGIN # LOOP THROUGH REQUESTED INTEGER#
  44. MEM$WRD [INDEX] = 0;
  45. END
  46.  
  47. RETURN; # RETURN TO CALLER #
  48.  
  49. END # IPUMCLR #
  50.  
  51. TERM
cdc/nos2.source/nam5871/ipumclr.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator