User Tools

Site Tools


cdc:nos2.source:nam5871:ns_nai

NS$NAI

Table Of Contents

  • [00010] PROC NS$NAI
  • [00012] NS$NAI - PERFORM NPU ACTIVITY INITIALIZATION.
  • [00016] PERFORM NPU ACTIVITY INITIALIZATION.
  • [00043] PROC NS$DBG
  • [00049] PROC MOVEOK
  • [00050] PROC REQTSB
  • [00051] PROC TSBINFO

Source Code

NS$NAI.txt
  1. *DECK NS$NAI
  2. USETEXT COM$NS
  3. USETEXT DEF$NS
  4. USETEXT LTSB$NS
  5. USETEXT NAT$NS
  6. USETEXT NPT$NS
  7. USETEXT NST$NS
  8. USETEXT SMB$NS
  9.  
  10. PROC NS$NAI; # PERFORM NPU ACTIVITY INITIALIZATION #
  11.  
  12. # TITLE NS$NAI - PERFORM NPU ACTIVITY INITIALIZATION. #
  13.  
  14. BEGIN # NS$NSI #
  15. #
  16. ** NS$NAI - PERFORM NPU ACTIVITY INITIALIZATION.
  17. *
  18. * J.C. LEE 1981
  19. *
  20. * THIS ROUTINE PERFORMS NPU ACTIVITY INITIALIZATION.
  21. *
  22. * PROC NS$NAI
  23. *
  24. * ENTRY:
  25. * NONE.
  26. *
  27. * EXIT:
  28. * NONE.
  29. *
  30. * METHOD:
  31. * REQUEST A TSB FOR NAT.
  32. * FORMAT NAT FOR LOAD ACTIVITY
  33. * QUEUE NAT TO NAT LIST.
  34. * FORMAT NPU STATUS TABLE.
  35. * UPDATE LOAD TSB.
  36. * INCREMENT LOAD ACTIVITY COUNT.
  37. *
  38. #
  39.  
  40. $BEGIN
  41. XREF
  42. BEGIN
  43. PROC NS$DBG; # TRACE PROCEDURE CALL #
  44. END
  45. $END
  46.  
  47. XREF
  48. BEGIN
  49. PROC MOVEOK; # ALLOW TSB TO MOVE #
  50. PROC REQTSB; # REQUEST TSB #
  51. PROC TSBINFO; # LOCATE TSB #
  52. END
  53.  
  54. ITEM NATFWA U; # FWA OF NAT TSB #
  55. ITEM TSBFWA U; # FWA OF A TSB #
  56. ITEM TSBN U; # TSB NUMBER OF TSB #
  57. ITEM TSBSIZE U; # SIZE OF TSB #
  58.  
  59. CONTROL EJECT;
  60.  
  61. $BEGIN
  62. NS$DBG("NAI"); # TRACE CALL #
  63. $END
  64.  
  65. #
  66.   FORMAT NAT FOR LOAD ACTIVITY
  67. #
  68. REQTSB(NAT$SIZE,NATFWA,NATTSBN); # REQUEST A TSB FOR NAT #
  69.  
  70. NPT$NATTSB[NTORD] = NATTSBN; # SAVE NAT TSB NUMBER IN NPT #
  71. P<NAT> = NATFWA; # FWA OF NPU ACTIVITY TABLE #
  72. NAT$ID[0] = NAT$IDENT; # IDENTIFIER #
  73. NAT$BS[0] = NAT$SIZE; # BLOCK SIZE #
  74. NAT$NCTORD[0] = NPT$NCTORD[NTORD]; # NCT ORDINAL OF LOAD PATH #
  75. NAT$SN[0] = ABHSN[0]; # TERMINAL NODE NUMBER OF LOAD PATH #
  76. NAT$HN[0] = ABHDN[0]; # TERMINAL NODE NUMBER OF LOAD PATH #
  77. NAT$NTORD[0] = NTORD; # NPU TABLE ORDINAL #
  78. NPT$F$LF[NTORD] = FALSE; # CLEAR LOAD FAILURE FLAG #
  79. #
  80.   QUEUE NAT TO NAT LIST
  81. #
  82. TSBN = NPT$NLTAIL[0];
  83.  
  84. IF TSBN EQ 0
  85. THEN # NO ENTRY IN NAT LIST #
  86. NPT$NLHEAD[0] = NATTSBN; # SET HEAD PTR OF NAT LIST #
  87.  
  88. ELSE
  89. BEGIN # QUEUE NAT TO LIST #
  90. TSBINFO(TSBSIZE,TSBFWA,TSBN); # LOCATE LAST NAT IN LIST #
  91. P<NAT> = TSBFWA;
  92. NAT$NLFP[0] = NATTSBN;
  93. MOVEOK(TSBN); # ALLOW LAST NAT IN LIST TO MOVE#
  94. P<NAT> = NATFWA; # RESET BASED PTR TO CURRENT NAT#
  95. NAT$NLBP[0] = TSBN;
  96. END
  97.  
  98. NPT$NLTAIL[0] = NATTSBN; # UPDATE TAIL PTR OF NAT LIST #
  99. #
  100.   FORMAT NPU STATUS TABLE
  101. #
  102. IF NPT$NSTTSB[NTORD] EQ 0
  103. THEN # NST NOT YET EXISTS #
  104. BEGIN
  105. REQTSB(NST$ISIZE,TSBFWA,TSBN); # REQUEST A TSB FOR NST #
  106. P<NST> = TSBFWA; # FWA OF NPU STATUS TABLE #
  107. NPT$NSTTSB[NTORD] = TSBN; # STORE NST TSB NO IN NPT ENTRY #
  108. NST$ID[0] = NST$IDENT; # IDENTIFIER #
  109. NST$BS[0] = NST$ISIZE; # NST INITIAL SIZE #
  110. NST$NTORD[0] = NTORD; # NPU TABLE ORDINAL #
  111. MOVEOK(TSBN); # ALLOW NST TO MOVE #
  112. END
  113. #
  114.   UPDATE LOAD TSB
  115. #
  116. IF LTW$LTSBN[0] EQ 0
  117. THEN # LOAD TSB NOT YET EXISTS #
  118. BEGIN
  119. REQTSB(L$LTSB,TSBFWA,TSBN); # REQUEST A TSB FOR LOAD TSB #
  120.  
  121. LTW$LTSBN[0] = TSBN; # STORE TSB NO OF LOAD TSB #
  122. P<LTSB$HDR> = TSBFWA; # FWA OF LOAD TSB #
  123. LTSB$ID[0] = LTSB$IDENT; # LOAD TSB IDENTIFIER #
  124. LTSB$BS[0] = L$LTSB; # LOAD TSB SIZE #
  125. P<LTSB$FET> = TSBFWA + L$LTSBHDR; # FWA OF LOAD FET #
  126. LFET$FM[0] = TRUE; # SET BINARY FILE MODE #
  127. LFET$COMP[0] = TRUE; # INITIALIZE FET COMPLETION BIT #
  128. LFET$RAN[0] = TRUE; # SET RANDOM ACCESS BIT #
  129. LFET$LEN[0] = L$LFET - 5; # SET ADDITIONAL FET LENGTH #
  130. MOVEOK(TSBN); # ALLOW LOAD TSB TO MOVE #
  131. END
  132.  
  133. LTW$ACOUNT[0] = LTW$ACOUNT[0] + 1; # INCREMENT ACTIVITY COUNT #
  134.  
  135. RETURN;
  136. END # NS$NAI #
  137. TERM
cdc/nos2.source/nam5871/ns_nai.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator