User Tools

Site Tools


cdc:nos2.source:nam5871:np_zwds

NP$ZWDS

Table Of Contents

  • [00003] PROC NP$ZWDS (FWA, LENGTH)
  • [00004] NP$ZWDS - ZERO WORDS. USE FOR FILE TRANSFER APPLICATIONS ONLY

Source Code

NP$ZWDS.txt
  1. *DECK NP$ZWDS
  2. *IF DEF,XFR
  3. PROC NP$ZWDS (FWA, LENGTH);
  4. # TITLE NP$ZWDS - ZERO WORDS. USE FOR FILE TRANSFER APPLICATIONS ONLY #
  5.  
  6. BEGIN # NP$ZWDS #
  7.  
  8. #
  9. ** PROC NAME AUTHOR DATE
  10. * NP$ZWDS L.T.NGUYEN 83/03/22
  11. *
  12. * NP$ZWDS ZEROS OUT A GIVEN NUMBER OF WORDS STARTING AT A GIVEN
  13. * ADDRESS.
  14. *
  15. * PROC NP$ZWDS (FWA, LENGTH)
  16. *
  17. * ENTRY FWA - THE STARTING ADDRESS OF THE WORDS TO ZERO.
  18. * LENGTH - THE TOTAL NUMBER OF WORDS TO ZERO.
  19. *
  20. * EXIT NONE.
  21. *
  22. * PROCESS SET BASED ARRAY WRDSTOZERO TO FWA.
  23. * ZERO OUT THE WORDS FROM FWA TO FWA + LENGTH - 1.
  24. #
  25.  
  26. ITEM FWA I; # FWA OF AREA TO ZERO #
  27. ITEM LENGTH I; # LENGTH OF THE AREA TO ZERO #
  28.  
  29. ITEM I I; # LOOP VARIABLE #
  30.  
  31. BASED ARRAY WRDSTOZERO [0:20] S (1);
  32. BEGIN # ARRAY WRDSTOZERO #
  33. ITEM WRD$WORD I(00,00,60); # WORD N OF THE ARRAY #
  34. END
  35. CONTROL EJECT;
  36. P<WRDSTOZERO> = FWA;
  37. FOR I = 0 STEP 1 UNTIL LENGTH-1
  38. DO
  39. BEGIN
  40. WRD$WORD[I] = 0;
  41. END
  42.  
  43. RETURN ;
  44. END # NP$ZWDS #
  45.  
  46. TERM
  47. *ENDIF
cdc/nos2.source/nam5871/np_zwds.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator