User Tools

Site Tools


cdc:nos2.source:nam5871:ns_fln

NS$FLN

Table Of Contents

  • [00012] PROC NS$FLN(F$RELOAD)
  • [00014] NS$FLN - SEND NPU/DT/R (LOAD NDCB).
  • [00018] SEND NPU/DT/R (LOAD NDCB).
  • [00048] PROC NS$DBG
  • [00054] FUNC EDATE
  • [00055] FUNC ETIME
  • [00056] PROC LFGCKSM
  • [00057] PROC MOVEOK
  • [00058] PROC NETPUT
  • [00059] FUNC NS$CDA U
  • [00060] PROC NS$FBH
  • [00061] PROC NS$GNW
  • [00062] PROC PDATE
  • [00063] PROC TSBINFO

Source Code

NS$FLN.txt
  1. *DECK NS$FLN
  2. USETEXT CYB$NS
  3. USETEXT DEF$NS
  4. USETEXT NAT$NS
  5. USETEXT NDCB$NS
  6. USETEXT NPT$NS
  7. USETEXT NST$NS
  8. USETEXT PFC$NS
  9. USETEXT SMB$NS
  10. USETEXT SMD$NS
  11.  
  12. PROC NS$FLN(F$RELOAD); # SEND NPU/DT/R (LOAD NDCB) #
  13.  
  14. # TITLE NS$FLN - SEND NPU/DT/R (LOAD NDCB). #
  15.  
  16. BEGIN # NS$FLN #
  17. #
  18. ** NS$FLN - SEND NPU/DT/R (LOAD NDCB).
  19. *
  20. * J.C. LEE 1981
  21. *
  22. * THIS ROUTINE SENDS AN NPU/DT/R (LOAD NDCB).
  23. *
  24. * PROC NS$FLN(F$RELOAD)
  25. *
  26. * ENTRY:
  27. * F$RELOAD - NDCB RELOAD INDICATOR.
  28. *
  29. * EXIT:
  30. * NONE.
  31. *
  32. * METHOD:
  33. * FORMAT ABH.
  34. * FORMAT NDCB IN NPU/DT/R (LOAD NDCB).
  35. * IF F$RELOAD NOT SET, SWITCH TO FORMAT NDCB CASES.
  36. * ELSE, LOCATE NDCB FIRST AND GOTO PACKSM.
  37. * PACKSM: PACKS NPU WORD INTO SM BUFFER.
  38. * COMPUTE CHECKSUM OF NDCB DATA.
  39. * FORMAT NPU/DT/R AND NETPUT IT.
  40. *
  41. #
  42.  
  43. ITEM F$RELOAD B; # RELOAD NDCB INDICATOR #
  44.  
  45. $BEGIN
  46. XREF
  47. BEGIN
  48. PROC NS$DBG; # TRACE PROCEDURE CALLS #
  49. END
  50. $END
  51.  
  52. XREF
  53. BEGIN
  54. FUNC EDATE; # CONVERT PACKED DATE TO DISPLAY CODE #
  55. FUNC ETIME; # CONVERT PACKED TIME TO DISPLAY CODE #
  56. PROC LFGCKSM; # COMPUTE CHECKSUM OF NPU DATA #
  57. PROC MOVEOK; # ALLOW TSB TO MOVE #
  58. PROC NETPUT; # NETPUT #
  59. FUNC NS$CDA U; # DISPLAY-CODE TO ASCII CONVERSION #
  60. PROC NS$FBH; # FORMAT ABH FOR NETWORK SM #
  61. PROC NS$GNW; # GET NPU WORDS #
  62. PROC PDATE; # GET DATE/TIME IN PACKED BINARY FORMAT #
  63. PROC TSBINFO; # LOCATE TSB #
  64. END
  65.  
  66. ITEM ASCCHAR U; # ASCII CHARACTER #
  67. ITEM BITCOUNT I; # BIT COUNT #
  68. ITEM DISCHAR U; # DISPLAY CODE CHARACTER #
  69. ITEM I I; # LOOP VARIABLE #
  70. ITEM J I; # TEMPORARY #
  71. ITEM K I; # TEMPORARY #
  72. ITEM L I; # TEMPORARY #
  73. ITEM NDCBFWA U; # NDCB FWA #
  74. ITEM NPUWORD U; # NPU WORD WITH 16-BIT DATA #
  75. ITEM TEMP U; # TEMPORARY #
  76. ITEM TSBFWA U; # TSB FWA #
  77. ITEM TSBN U; # TSB NUMBER #
  78. ITEM TSBSIZE U; # TSB SIZE #
  79.  
  80. SWITCH NDCBCASE:NDCBINDEX # STATUS SWITCH FOR FORMATTING NDCB #
  81. RDF:NDCB$RDF, # RELOAD DUMP FLAG #
  82. LTDF:NDCB$LTDF, # LONG TERM DUMP FLAG #
  83. LPATH:NDCB$LPATH, # MOST RECENT LOAD PATH #
  84. LDATE1:NDCB$DATE1, # MOST RECENT LOAD DATE #
  85. LDATE2:NDCB$DATE2,
  86. LDATE3:NDCB$DATE3,
  87. LTIME1:NDCB$TIME1, # MOST RECENT LOAD TIME #
  88. LTIME2:NDCB$TIME2,
  89. LTIME3:NDCB$TIME3,
  90. NHC:NDCB$HALTC, # NPU HALT CODE #
  91. NPR:NDCB$PREG; # NPU P-REGISTER DATA #
  92.  
  93. CONTROL EJECT;
  94.  
  95. $BEGIN
  96. NS$DBG("FLN");
  97. $END
  98.  
  99. NS$FBH(LNPUDTLR+NDCB$SIZE*2,TRUE); # FORMAT ABH #
  100.  
  101. P<SMB> = LOC(SMB$BUFFER); # FWA OF SM BUFFER #
  102.  
  103. FOR I = NDCBINDEX"NDCB$RDF" STEP 1 UNTIL NDCBINDEX"NDCB$PREG"
  104. DO # FORMAT NDCB IN NPU/DT/R (LOAD NDCB) #
  105. BEGIN
  106. NPUWORD = 0;
  107.  
  108. IF NOT F$RELOAD
  109. THEN # FORMAT AND LOAD NDCB #
  110. GOTO NDCBCASE[I]; # SWITCH TO FORMAT NDCB CASES #
  111.  
  112. ELSE # RELOAD NDCB RECEIVED FROM NPU #
  113. BEGIN
  114. IF I EQ NDCBINDEX"NDCB$RDF"
  115. THEN # LOCATE NDCB FIRST #
  116. BEGIN
  117. TSBN = NAT$SMTSBN[0]; # NDCB DUMP RESPONSE TSB #
  118. TSBINFO(TSBSIZE,TSBFWA,TSBN);
  119. P<NDCB> = TSBFWA; # FWA OF NDCB DUMP RESPONSE #
  120. END
  121.  
  122. NS$GNW(NDCB,LNPUDTDN,I,NPUWORD);
  123. GOTO PACKSM;
  124. END
  125.  
  126. RDF: # CLEAR RELOAD DUMP FLAG #
  127. NHC: # CLEAR NPU HALT CODE #
  128. NPR: # CLEAR NPU P-REGISTER #
  129. TEST I;
  130.  
  131. LTDF: # SET LONG TERM DUMP FLAG #
  132. IF NPT$F$LTDF[NTORD]
  133. THEN # LONG TERM DUMP FLAG = DUMP #
  134. NPUWORD = ASC$YY; # SET TO ASCII YY #
  135.  
  136. ELSE # LONG TERM DUMP FLAG = NO DUMP #
  137. NPUWORD = ASC$NN; # SET TO ASCII NN #
  138.  
  139. GOTO PACKSM;
  140.  
  141. LPATH: # SET LOAD PATH #
  142. NPUWORD = NAT$LPATH[0];
  143. GOTO PACKSM;
  144.  
  145. LDATE1: # SET LOAD DATE YY #
  146. PDATE(TEMP); # GET PACKED BINARY DATE/TIME #
  147. NAT$LPDATE[0] = TEMP; # SAVE IN NAT #
  148. TEMP = EDATE(NAT$LDATE[0]); # DISPLAY-CODED DATE YY/MM/DD #
  149. GOTO DATETIME;
  150.  
  151. LTIME1: # SET LOAD TIME HH #
  152. TEMP = ETIME(NAT$LTIME[0]); # DISPLAY-CODED TIME HH.MM.SS #
  153.  
  154. DATETIME:
  155. LDATE2: # SET LOAD DATE MM #
  156. LDATE3: # SET LOAD DATE DD #
  157. LTIME2: # SET LOAD TIME MM #
  158. LTIME3: # SET LOAD TIME SS #
  159. TEMP = TEMP * LSHIFT6; # LEFT-SHIFT 6 SPACES #
  160.  
  161. FOR J = 0 STEP 1 UNTIL 1
  162. DO # CONVERT NEXT TWO DISPLAY-CODED CHARACTERS TO ASCII #
  163. BEGIN
  164. DISCHAR = B<J*DCSIZE,DCSIZE>TEMP; # DISPLAY-CODED CHARACTER #
  165. ASCCHAR = NS$CDA(DISCHAR); # CONVERT TO ASCII #
  166. B<WL-NPWSIZE+J*ASCSIZE,ASCSIZE>NPUWORD = ASCCHAR;
  167. END
  168.  
  169. TEMP = TEMP * LSHIFT12; # LEFT-SHIFT 12 SPACES #
  170.  
  171. PACKSM: # PACK NPU WORD INTO SM BUFFER #
  172. BITCOUNT = LNPUDTLR*ASCSIZE + I*NPWSIZE; # BIT COUNT #
  173. K = BITCOUNT / WL; # WORD INDEX #
  174. L = BITCOUNT - K*WL; # BIT INDEX #
  175. J = L + NPWSIZE - WL; # BITS IN NEXT CM WORD #
  176.  
  177. IF J GR 0
  178. THEN # NPU WORD CROSSES CM WORD #
  179. BEGIN
  180. B<L,WL-L>SMBWORD[K] = B<WL-NPWSIZE,NPWSIZE-J>NPUWORD;
  181. B<0,J>SMBWORD[K+1] = B<WL-J,J>NPUWORD;
  182. END
  183.  
  184. ELSE # NPU WORD FITS IN CM WORD #
  185. B<L,NPWSIZE>SMBWORD[K] = NPUWORD;
  186.  
  187. END # END FOR LOOP #
  188.  
  189. #
  190.   COMPUTE CHECKSUM OF NDCB DATA
  191. #
  192. BITCOUNT = LNPUDTLR * ASCSIZE; # BIT COUNT TO NDCB DATA #
  193. K = BITCOUNT / WL; # WORD INDEX #
  194. NDCBFWA = P<SMB> + K; # FWA OF NDCB DATA #
  195. L = BITCOUNT - K*WL; # SYMPL FIRST BIT POSITION #
  196. J = WL - 1 - L; # COMPASS FIRST BIT POSITION #
  197. LFGCKSM(NDCBFWA,J,NDCB$SIZE,TEMP); # GET CKECKSUM OF NDCB DATA #
  198. #
  199.   FORMAT NPU/DT/R (LOAD NDCB)
  200. #
  201. TSBN = NPT$NSTTSB[NTORD]; # NST TSB NUMBER #
  202. TSBINFO(TSBSIZE,TSBFWA,TSBN); # LOCATE NST #
  203. P<NST> = TSBFWA; # FWA OF NST #
  204.  
  205. PFCSFC[0] = NPUDT; # PFC/SFC CODE #
  206. NPUPO[0] = NAT$PN[0]; # PORT NUMBER #
  207. NPUSP[0] = NAT$SPN[0]; # SUBPORT NUMBER #
  208. NPUCC[0] = CMDCODE"CC$LOAD"; # COMMAND CODE #
  209. NPULS[0] = NAT$LSN[0]; # LOAD SEQUENCE NUMBER #
  210. NPUBA1[0] = NAT$NDCBA1[0]; # SET NDCB FWA #
  211. NPUBA2[0] = NAT$NDCBA2[0];
  212. NPUBC[0] = 1; # SET BATCH COUNT #
  213. NPUCK[0] = TEMP; # SET LOAD DATA CHECKSUM #
  214.  
  215. MOVEOK(TSBN); # ALLOW NST TO MOVE #
  216.  
  217.  
  218. NETPUT(ABH$WORD,SMB$BUFFER); # SEND NPU/DT/R (LOAD NDCB) #
  219.  
  220. RETURN;
  221. END # NS$FLN #
  222. TERM
cdc/nos2.source/nam5871/ns_fln.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator