User Tools

Site Tools


cdc:nos2.source:nam5871:cstsct

CSTSCT

Table Of Contents

  • [00007] PROC CSTSCT
  • [00008] CSTSCT - SELECT CORRECT TERMINAL.
  • [00012] SELECT CORRECT TERMINAL.
  • [00046] PROC CSTSCD
  • [00047] PROC MOVE
  • [00048] PROC SSTAQE
  • [00049] PROC SSTRTS

Source Code

CSTSCT.txt
  1. *DECK CSTSCT
  2. USETEXT TEXTCS
  3. USETEXT TXTCTCS
  4. USETEXT TXTSMCS
  5. USETEXT TXTAPSS
  6. USETEXT TXTSUSS
  7. PROC CSTSCT;
  8. # TITLE CSTSCT - SELECT CORRECT TERMINAL. #
  9.  
  10. BEGIN # CSTSCT #
  11. #
  12. ** CSTSCT - SELECT CORRECT TERMINAL.
  13. *
  14. * D. G. DEPEW. 81/10/12.
  15. *
  16. * CSTSCT SELECTS APPROPRIATE TERMINAL ENTRIES FROM THE LINE RECORDS
  17. * CONTAINED IN THE NCF DATA QUEUE, AND FOR EACH SUCH TERMINAL CALLS
  18. * PROC CSTSCD TO CONFIGURE ALL DEVICES WHICH ARE APPROPRIATE FOR
  19. * THAT TERMINAL.
  20. *
  21. * PROC CSTSCT
  22. *
  23. * ENTRY THE NCF DATA QUEUE CONTAINS ONE OR MORE COMPLETE ENTRIES,
  24. * WHICH MAY BE FOLLOWED BY AN INCOMPLETE ENTRY.
  25. *
  26. * EXIT ALL NCF DATA QUEUE ENTRIES WHICH WERE COMPLETE HAVE BEEN
  27. * DELETED (AN INCOMPLETE ENTRY, IF THERE WAS ONE, REMAINS
  28. * UNALTERED AND UNPROCESSED).
  29. * ALL CONFIGURE TERMINAL RESPONSE SM'S (NORMAL OR ABNORMAL),
  30. * CORRESPONDING TO THE NCF DATA QUEUE ENTRIES THAT WERE
  31. * PROCESSED, HAVE BEEN PLACED IN THE OUTGOING TRAFFIC
  32. * QUEUE.
  33. *
  34. * NOTES THIS ROUTINE ALONG WITH PROC CSTSCD PERFORMS THE MATCHING
  35. * LOGIC FOR AUTORECOGNITION.
  36. * THE LOGIC OF THE INNER LOOPS OF THIS ROUTINE (INDUCTION
  37. * VARIABLE J) ARE BASED ON THE FACT THAT NDL GUARANTEES AT
  38. * LEAST ONE TERMINAL DEFINITION FOR A LINE.
  39. #
  40.  
  41. #
  42. **** PROC CSTSCT - XREF LIST.
  43. #
  44. XREF
  45. BEGIN
  46. PROC CSTSCD; #SELECT AND CONFIGURE CORRECT DEVICES #
  47. PROC MOVE; #MOVE STORAGE DIRECT ADDRESSING (MACREL) #
  48. PROC SSTAQE; #ACCEPT QUEUE ENTRY #
  49. PROC SSTRTS; #REMOVE STORAGE ANYWHERE IN TABLE #
  50. END
  51. #
  52. ****
  53. #
  54.  
  55.  
  56. ITEM I, J; #LOOP INDUCTION VARIABLES #
  57. ITEM LASTERM B; #LAST TERMINAL FLAG #
  58. ITEM LTES; #LEN OF ALL TRM NTRYS IN A LINREC (CM WDS)#
  59.  
  60.  
  61.  
  62.  
  63.  
  64. BEGIN
  65.  
  66. # WE BEGIN THE PROCESSING OF A SINGLE NCF DATA QUEUE ENTRY BY #
  67. # INITIALIZING A WHOLE BUNCH OF STUFF. #
  68. # THE MEMORY MANAGEMENT ROUTINES GUARANTEE ONE ADDITIONAL WORD AT #
  69. # THE END OF EACH MANAGED TABLE (ABOVE AND BEYOND THE LENGTH OF THE#
  70. # TABLE). SETTING THIS WORD NON-ZERO FOR THE NCF DATA QUEUE #
  71. # INSURES THAT THE INNER LOOPS OF THIS ROUTINE AND PROC CSTSCD DO #
  72. # NOT ACT UPON STORAGE BEYOND THE END OF THE NCF DATA QUEUE. #
  73.  
  74. NDQ$WORD[NDQL] = 1; # INSURE CORRECT LOOP TERMINATION #
  75. NRDEV = 0; # INITIALIZE NUMBER OF DEVICES CONFIGURED #
  76. LASTERM = FALSE;
  77. LTES = NDQ$LRSIZE[0] - LRHDRL$; # WORD COUNT OF TRM NTRYS #
  78. P<LINEREC> = P<NDQ> + NDQ$TCSIZE[0]; # BEGINNING OF LINE REC #
  79. ABHWORD[0] = NDQ$WORD[1]; # BREAK OUT CNF/TE/R SM ABH #
  80. MOVE (NDQ$TCSIZE[0]-2, NDQ[2], CSSM[0]); # AND SM BODY #
  81.  
  82. # SET UP FIXED FIELDS OF CONFIGURE TERMINAL RESPONSE SM. #
  83.  
  84. ABHWORD[1] = NDQ$WORD[1];
  85. ABHSN[1] = ABHDN[0]; # REVERSE DN AND SN FOR RESPONSE SM #
  86. ABHDN[1] = ABHSN[0];
  87. SPMSG0[1] = 0; # START CNF/TE RESPONSE SM BODY #
  88. PFCSFC[1] = CNFTEN; # DEFINED IN TXTSUSS #
  89. CNFP[1] = CNFP[0]; # PORT NUMBER. THAT'S IT FOR NOW #
  90.  
  91. IF CNFTTA[0] EQ LR$AUTO[0]
  92. THEN # LINE REC AND CNF/TE/R AGREE ON AUTOREC #
  93. BEGIN
  94. P<TRMINFO> = P<LINEREC> + LRHDRL$; # 1ST TERM NTRY IN LINREC#
  95. IF CNFTTA[0] NQ 0
  96.  
  97.  
  98. THEN # AUTORECOGNITION LINE #
  99. FOR J=TE$WC[0] STEP TE$WC[0]
  100. WHILE J LQ LTES AND NOT LASTERM
  101. DO # LOOP TIL END OF LINREC OR TERMINAL MATCH#
  102. IF (TE$TIP[0] EQ CNFTTT[0] OR TE$TIP[0] EQ 0)
  103. AND (TE$STIP[0] EQ CNFSTIP[0] OR TE$STIP[0] EQ 0)
  104. AND (TE$TSPD[0] EQ CNFLCLS[0] OR TE$TSPD[0] EQ 0)
  105. AND (TE$CSET[0] EQ CNFLCCD[0] OR TE$CSET[0] EQ 0)
  106. AND (TE$A1[0] EQ CNFA1[0] OR TE$A1[0] EQ 0)
  107. THEN # THIS IS IT (THE CORRECT TERMINAL) #
  108. BEGIN # GO FOR DEVICES #
  109. LASTERM = TRUE; # ONLY ONE TERM ALLOWED FOR AUTOREC #
  110.  
  111. # INSURE VALUES REQUIRED FOR CNF/TE/N ARE IN LINE RECORD FIELDS. #
  112.  
  113. TE$STIP[0] = CNFSTIP[0];
  114. TE$CSET[0] = CNFLCCD[0];
  115. TE$A1[0] = CNFA1[0];
  116. CSTSCD (LASTERM); # SELECT AND CONFIGURE DEVICES #
  117. END
  118. ELSE # THIS IS NOT IT #
  119. P<TRMINFO> = P<TRMINFO> + TE$WC[0]; # NXT TERM NTRY #
  120.  
  121.  
  122. ELSE # FIXED CONFIGURATION LINE #
  123. FOR J=TE$WC[0] STEP TE$WC[0]
  124. WHILE NOT LASTERM
  125. DO # LOOP UNTIL END OF LINE RECORD #
  126. BEGIN
  127. IF J GQ LTES # NOTE - *J* SHOULD NEVER EXCEED *LTES* #
  128. THEN # THIS IS LAST TERM ENTRY IN LINE RECORD #
  129. LASTERM = TRUE;
  130. CSTSCD (LASTERM); # CONFIGURE ALL DEVICES #
  131. P<TRMINFO> = P<TRMINFO> + TE$WC[0]; # NXT TERM NTRY #
  132. END
  133. END
  134.  
  135. IF NRDEV EQ 0
  136. THEN # NOTHING GOT CONFIGURED #
  137. BEGIN # ISSUE CNF/TE/A #
  138. ABHTLC[1] = NCNFA; # DEFINED IN TXTSMCS. ABH COMPLETE #
  139. PFCSFC[1] = CNFTEA; # DEFINED IN TXTSUSS. SM COMPLETE #
  140. SSTAQE (P<OTQ>, CTEAQL$, ABH[1], CSSM[1]); # QUEUE CNF/TE/A#
  141. END
  142. SSTRTS (P<NDQ>, 0, NDQ$ESIZE[0]); # DEL 1ST NTRY IN NCF DATA Q#
  143. END
  144.  
  145. END # CSTSCT #
  146.  
  147. TERM
cdc/nos2.source/nam5871/cstsct.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator