User Tools

Site Tools


cdc:nos2.source:nam5871:ns_flr

NS$FLR

Table Of Contents

  • [00007] PROC NS$FLR((RNAME),RI,RL,ERRCODE)
  • [00009] NS$FLR - FIND LOAD RECORD.
  • [00013] FIND LOAD RECORD.
  • [00050] PROC NS$DBG
  • [00056] FUNC NS$FEC U
  • [00057] PROC MOVEOK
  • [00058] PROC TSBINFO

Source Code

NS$FLR.txt
  1. *DECK NS$FLR
  2. USETEXT COM$NS
  3. USETEXT DIR$NS
  4. USETEXT ERR$NS
  5. USETEXT NPT$NS
  6.  
  7. PROC NS$FLR((RNAME),RI,RL,ERRCODE); # FIND LOAD RECORD #
  8.  
  9. # TITLE NS$FLR - FIND LOAD RECORD. #
  10.  
  11. BEGIN # NS$FLR #
  12. #
  13. ** NS$FLR - FIND LOAD RECORD.
  14. *
  15. * J.C. LEE 1981
  16. *
  17. * THIS ROUTINE FINDS A LOAD RECORD.
  18. *
  19. * PROC NS$FLR((RNAME),RI,RL,ERRCODE)
  20. *
  21. * ENTRY:
  22. * RNAME - NAME OF LOAD MODULE RECORD.
  23. *
  24. * EXIT:
  25. * ERRCODE.
  26. * RI - RANDOM INDEX OF LOAD MODULE RECORD.
  27. * RL - LOAD MODULE RECORD LENGTH.
  28. *
  29. * METHOD:
  30. * DETERMINE IF DEFAULT OR ALTERNATE CCP LOAD FILE
  31. * (NLF) IN EFFECT.
  32. * LOCATE NLF-INDEX-RECORD TSB.
  33. * SEARCH NLF-INDEX-RECORD FOR MATCH "RNAME".
  34. * IF FOUND, RETURN "RI" AND "RL".
  35. * ELSE, SET ERRCODE TO "NLF ERROR-LOAD MODULE MISSING".
  36. *
  37. #
  38.  
  39. ITEM RNAME C(6); # NAME OF LOAD MODULE RECORD #
  40. ITEM RI U; # RANDOM INDEX OF LOAD MODULE RECORD #
  41. ITEM RL U; # RECORD LENGTH #
  42. ITEM ERRCODE U; # ERROR CODE #
  43. ITEM TSBFWA U; # TSB FWA #
  44. ITEM TSBN U; # TSB NUMBER #
  45. ITEM TSBSIZE U; # TSB SIZE #
  46.  
  47. $BEGIN
  48. XREF
  49. BEGIN
  50. PROC NS$DBG; # TRACE PROCEDURE CALL #
  51. END
  52. $END
  53.  
  54. XREF
  55. BEGIN
  56. FUNC NS$FEC U; # FORMAT ERROR CODE #
  57. PROC MOVEOK; # ALLOW TSB TO MOVE #
  58. PROC TSBINFO; # LOCATE TSB #
  59. END
  60.  
  61. ITEM FOUND B; # RECORD FOUND FLAG #
  62. ITEM I I; # LOOP VARIABLE #
  63. ITEM TEMP U; # TEMPORARY VARIABLE #
  64.  
  65. CONTROL EJECT;
  66.  
  67. $BEGIN
  68. NS$DBG("FLR");
  69. $END
  70.  
  71. ERRCODE = 0;
  72. FOUND = FALSE;
  73.  
  74. IF NPT$ALFWD[NTORD] NQ 0
  75. THEN # ALTERNATE CCP LOAD FILE IN EFFECT #
  76. BEGIN
  77. TSBN = NPT$DIRTSB[NTORD]; # DIRECTORY TSB #
  78. TSBINFO(TSBSIZE,TSBFWA,TSBN); # LOCATE TSB #
  79. P<DIR> = TSBFWA; # FWA OF ALTERNATE NLF DIRECTORY #
  80. MOVEOK(TSBN); # ALLOW DIRECTORY TSB TO MOVE #
  81. END
  82.  
  83. ELSE # DEFAULT CCP LOAD FILE #
  84. P<DIR> = NLFDIRFWA; # FWA OF DEFAULT NLF DIRECTORY #
  85.  
  86. TEMP = (DIR$WC[0] - 1) / DIR$ENTRYL; # ENTRIES IN INDEX RECORD #
  87.  
  88. FOR I = 1 STEP 1 WHILE I LQ TEMP
  89. AND NOT FOUND
  90. DO # SEARCH INDEX RECORD FOR LOAD MODULE #
  91. BEGIN
  92. IF DIR$RNAME[I] EQ RNAME
  93. THEN # FOUND ENTRY FOR LOAD PARTITION #
  94. BEGIN
  95. RI = DIR$RSA[I]; # RANDOM INDEX #
  96. RL = DIR$RL[I]; # RECORD LENGTH #
  97. FOUND = TRUE;
  98. END
  99. END
  100.  
  101. IF NOT FOUND
  102. THEN # NLF ERROR-LOAD MODULE MISSING #
  103. BEGIN
  104. ERRCODE = NS$FEC(EC"ERR$FILE",FEC"ERR$LMNF");
  105. END
  106.  
  107. RETURN;
  108. END # NS$FLR #
  109. TERM
cdc/nos2.source/nam5871/ns_flr.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator