User Tools

Site Tools


cdc:nos2.source:nam5871:ns_idn

NS$IDN

Table Of Contents

  • [00005] PROC NS$IDN
  • [00007] NS$IDN - INITIATE NPU DUMP FILE INDEX.
  • [00011] INITIATE NPU DUMP FILE INDEX.
  • [00036] PROC NS$CAT
  • [00037] PROC NS$MSG

Source Code

NS$IDN.txt
  1. *DECK NS$IDN
  2. USETEXT COM$NS
  3. USETEXT DEF$NS
  4. USETEXT LTSB$NS
  5. PROC NS$IDN; # INITIATE NPU DUMP FILE INDEX #
  6.  
  7. # TITLE NS$IDN - INITIATE NPU DUMP FILE INDEX. #
  8.  
  9. BEGIN # NS$IDN #
  10. #
  11. ** NS$IDN - INITIATE NPU DUMP FILE INDEX.
  12. *
  13. * J.C. LEE 1981
  14. *
  15. * THIS ROUTINE INITIATES NPU DUMP FILE INDEX.
  16. *
  17. * PROC NS$IDN
  18. *
  19. * ENTRY:
  20. * NONE.
  21. *
  22. * EXIT:
  23. * NONE.
  24. *
  25. * METHOD:
  26. * DETERMINE IF A CATLIST ENTRY IS AN NPU DUMP FILE, I.E.
  27. * NP(NIN)XX. IF AN NPU DUMP FILE IS FOUND, FLAG THE DUMP
  28. * FILE INDEX IN THE NPU DUMP FILE INDEX BIT-MAP TO
  29. * INDICATE THE INDEX IS IN USE. CATLIST THE DUMP FILE.
  30. * IF DUMP INDEX FULL, DAYFILE MESSAGE AND ABORT NS.
  31. *
  32. #
  33.  
  34. XREF
  35. BEGIN
  36. PROC NS$CAT; # ISSUE CATLIST MACRO CALL #
  37. PROC NS$MSG; # DISPATCH MESSAGE #
  38. END
  39.  
  40. DEF CATESIZE # 16 #; # CATLIST ENTRY SIZE #
  41. DEF CHAR$F # 06 #; # DISPLAY-CODED ALPHA F #
  42.  
  43. ITEM DONE B = FALSE; # DUMP FILE INDEX FOUND FLAG #
  44. ITEM HEXCHAR1 U; # HEX CHARACTER 1 #
  45. ITEM HEXCHAR2 U; # HEX CHARACTER 2 #
  46. ITEM I I; # TEMPORARY #
  47. ITEM J I; # TEMPORARY #
  48. ITEM K I; # TEMPORARY #
  49.  
  50. DEF L$DNERR # 2 #;
  51. DEF DM$DNERR # DM$ABORT+DM$SYSLOC #;
  52. ARRAY MSG$DNERR [0:0] S(L$DNERR);
  53. BEGIN
  54. ITEM DNERR$TEXT C(00,00,17) = # MESSAGE TEXT #
  55. ["DUMP INDEX FULL."];
  56. ITEM DNERR$END U(01,42,18) = [0]; # END OF TEXT #
  57. END
  58.  
  59. ARRAY FBUFFER [0:PRUSIZE] S(1) ;
  60. BEGIN # CIO BUFFER FOR USER CATALOG DATA #
  61. ITEM PFNAME C(0,0,7) ; # PERM. FILE NAME #
  62. ITEM PFNAME1 C(0,0,2) ; # FIRST 2 CHARS #
  63. ITEM PFNIN C(0,12,3) ; # NEXT 3 CHARS ( NIN) #
  64. ITEM DUMPID U(0,30,12); # DUMP INDEX #
  65. ITEM ID1 U(0,30,6) ; # FIRST HEX CHARACTER #
  66. ITEM ID2 U(0,36,6) ; # SECOND HEX CHARACTER #
  67. ITEM FILETYPE B(0,48,1) ;
  68. END
  69.  
  70. ARRAY FET [1:L$LFET] S(1) ;
  71. BEGIN # FET FOR CATLIST MACRO CALL #
  72. ITEM WORD1 U(0,0,60) = [L$LFET(0)] ;
  73. END
  74.  
  75. ARRAY BITDUMP [0:4] S(1) ;
  76. BEGIN # BIT MAP FOR ACTIVE NPU DUMP FILE INDEX #
  77. ITEM WORDX U(0,0,60) = [5(0)] ;
  78. END
  79.  
  80. CONTROL EJECT;
  81. #
  82.   SET UP FET FOR CATLIST CALL
  83. #
  84. P<LTSB$FET> = LOC(FET); # FET ADDRESS #
  85. LFET$LFN[0] = "ZZZZZZZ" ;
  86. LFET$FM[0] = TRUE ;
  87. LFET$COMP[0] = TRUE ;
  88. LFET$LEN[0] = L$LFET - 5 ;
  89. LFET$FIRST[0] = LOC(FBUFFER) ;
  90. LFET$LIMIT[0] = LOC(FBUFFER) + PRUSIZE + 1 ;
  91. #
  92.   DETERMINE IF A CATLIST ENTRY IS AN NPU DUMP FILE IE. NP(NIN)XX
  93.   WHERE XX ARE DISPLAY-CODED HEXADECIMAL CHARACTERS.
  94.   IF AN NPU DUMP FILE IS FOUND, FLAG THE DUMP FILE INDEX IN THE
  95.   NPU DUMP FILE INDEX BIT MAP TO INDICATE THE INDEX IS IN USE.
  96. #
  97. FOR J = J WHILE LFET$CODE[0] NQ O"1033"
  98. DO # PROCESS USER CATALOG UNTIL EOI REACHED #
  99. BEGIN
  100. NS$CAT(FET) ; # DO THE CATLIST #
  101.  
  102. FOR I = 0 STEP CATESIZE WHILE I LS (LFET$IN[0] - LFET$OUT[0])
  103. DO
  104. BEGIN
  105. IF FILETYPE[I+1] # DIRECT ACCRESS FILE #
  106. AND PFNAME1[I] EQ "NP" # IT IS NPU DUMP FILE #
  107. AND PFNIN[I] EQ NIN # SAME NIN #
  108. THEN
  109. BEGIN # AN ACTIVE NPU DUMP FILE FOUND #
  110. HEXCHAR1 = ID1[I]; # FIRST HEX CHARACTER OF DUMP INDEX #
  111. HEXCHAR2 = ID2[I]; # NEXT HEX CHARACTER OF DUMP INDEX #
  112. IF HEXCHAR1 LQ CHAR$F
  113. THEN # ITS A HEX CHARACTER A THROUGH F #
  114. HEXCHAR1 = HEXCHAR1 + 9;
  115. ELSE # ITS A HEX CHARACTER 0 THROUGH 9 #
  116. HEXCHAR1 = HEXCHAR1 - O"33";
  117. IF HEXCHAR2 LQ CHAR$F
  118. THEN
  119. HEXCHAR2 = HEXCHAR2 + 9;
  120. ELSE
  121. HEXCHAR2 = HEXCHAR2 - O"33";
  122. K = HEXCHAR1*16 + HEXCHAR2; # DUMP INDEX VALUE #
  123. J = K / 60 ;
  124. K = K - ( J * 60 ) ;
  125. B<K,1>WORDX[J] = 1 ;
  126. END
  127. END
  128. END
  129.  
  130. #
  131.   FIND THE FIRST FREE DUMP FILE INDEX FROM THE BIT MAP
  132. #
  133. FOR I=0 STEP 1 WHILE NOT DONE
  134. AND I LQ MAX$NDFDN
  135. DO # SCAN THROUGH THE BIT MAP #
  136. BEGIN # TO LOCATE THE FIRST FREE DUMP INDEX #
  137. J = I/60; # BIT MAP WORD INDEX #
  138. K = I - (J*60); # BIT POSITION IN WORD #
  139.  
  140. IF B<K,1>WORDX[J] EQ 0
  141. THEN # FOUND FREE DUMP INDEX #
  142. BEGIN # SET DUMP NUMBER FOR NEXT NPU DUMP #
  143. DN = I;
  144. DONE = TRUE;
  145. END
  146. END # END FOR LOOP #
  147.  
  148. IF NOT DONE
  149. THEN # DUMP INDEX FULL, ABORT NS #
  150. NS$MSG(MSG$DNERR,L$DNERR,DM$DNERR); # DAYFILE AND ABORT #
  151.  
  152. RETURN;
  153. END # NS$IND #
  154. TERM
cdc/nos2.source/nam5871/ns_idn.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator