User Tools

Site Tools


cdc:nos2.source:nam5871:cstrct

CSTRCT

Table Of Contents

  • [00007] PROC CSTRCT
  • [00008] CSTRCT - RESET CHARACTERISTIC OF TERMINAL.
  • [00012] RESET CHARACTERISTICS OF TERMINAL.
  • [00037] PROC CSTSCD
  • [00038] PROC CSTITR
  • [00039] PROC MOVE
  • [00040] PROC SSTAQE
  • [00041] PROC SSTRTS
  • [00042] FUNC SSDCAD U

Source Code

CSTRCT.txt
  1. *DECK CSTRCT
  2. USETEXT TEXTCS
  3. USETEXT TXTCTCS
  4. USETEXT TXTSMCS
  5. USETEXT TXTAPSS
  6. USETEXT TXTSUSS
  7. PROC CSTRCT;
  8. # TITLE CSTRCT - RESET CHARACTERISTIC OF TERMINAL. #
  9.  
  10. BEGIN # CSTRCT #
  11. #
  12. ** CSTRCT - RESET CHARACTERISTICS OF TERMINAL.
  13. *
  14. * LIEM THANH NGUYEN 84/12/06.
  15. *
  16. * CSTRCT RESET CHARACTERISTICS OF TERMINAL FROM THE LINE RECORDS
  17. * CONTAINED IN THE NCF DATA QUEUE.
  18. *
  19. * PROC CSTRCT
  20. *
  21. * ENTRY THE FIRST DATA ENTRY IN THE NCF DATA QUEUE.
  22. *
  23. * EXIT THE FIRST DATA QUEUE ENTRY IN THE NCF DATA QUEUE
  24. * HAS BEEN DELETED.
  25. * A RESET TERMINAL RESPONSE SM'S (NORMAL OR ABNORMAL),
  26. * CORRESPONDING TO THE NCF DATA QUEUE ENTRY THAT WAS
  27. * PROCESSED, HAS BEEN PLACED IN THE OUTGOING TRAFFIC
  28. * QUEUE.
  29. *
  30. #
  31.  
  32. #
  33. **** PROC CSTRCT - XREF LIST.
  34. #
  35. XREF
  36. BEGIN
  37. PROC CSTSCD; #SELECT AND CONFIGURE CORRECT DEVICES #
  38. PROC CSTITR ; #ISSUE TERMINAL REPONSE #
  39. PROC MOVE; #MOVE STORAGE DIRECT ADDRESSING (MACREL) #
  40. PROC SSTAQE; #ACCEPT QUEUE ENTRY #
  41. PROC SSTRTS; #REMOVE STORAGE ANYWHERE IN TABLE #
  42. FUNC SSDCAD U ; # CONVERT ASCII TO DISPLAY CODE CHARACTER #
  43. END
  44. #
  45. ****
  46. #
  47.  
  48.  
  49. ARRAY CNF$NAME S(1) ;
  50. BEGIN
  51. ITEM CNFNAMU U(0,00,42) ;
  52. ITEM CNFNAME C(0,00,07) ;
  53. ITEM CNFROOT C(0,00,05) ;
  54. ITEM CNFSUF U(0,30,12) ;
  55. END
  56.  
  57.  
  58. ITEM CURDEV; # CURRENT OFFSET FOR DEVICE ENTRY #
  59. ITEM CURTERM; # CURRENT OFFSET FOR TERMINAL ENTRY #
  60. ITEM I, J, K, NB ; #LOOP INDUCTION VARIABLES #
  61. ITEM FOUND B ;
  62. ITEM LTES U ;
  63.  
  64.  
  65.  
  66.  
  67. FOUND = FALSE ; # RESET FOUND #
  68.  
  69.  
  70. # WE BEGIN THE PROCESSING OF A SINGLE NCF DATA QUEUE ENTRY BY #
  71. # INITIALIZING A WHOLE BUNCH OF STUFF. #
  72. # THE MEMORY MANAGEMENT ROUTINES GUARANTEE ONE ADDITIONAL WORD AT #
  73. # THE END OF EACH MANAGED TABLE (ABOVE AND BEYOND THE LENGTH OF THE#
  74. # TABLE). SETTING THIS WORD NON-ZERO FOR THE NCF DATA QUEUE #
  75. # INSURES THAT THE INNER LOOPS OF THIS ROUTINE AND PROC CSTSCD DO #
  76. # NOT ACT UPON STORAGE BEYOND THE END OF THE NCF DATA QUEUE. #
  77.  
  78. NRDEV = 0; # INITIALIZE NUMBER OF DEVICES CONFIGURED #
  79. LTES = NDQ$LRSIZE[0] - LRHDRL$; # WORD COUNT OF TRM NTRYS #
  80. P<LINEREC> = P<NDQ> + NDQ$TCSIZE[0]; # BEGINNING OF LINE REC #
  81. ABHWORD[0] = NDQ$WORD[1]; # BREAK OUT CNF/RC/R SM ABH #
  82. MOVE (NDQ$TCSIZE[0]-2, NDQ[2], CSSM[0]); # AND SM BODY #
  83.  
  84. # SET UP FIXED FIELDS OF CONFIGURE TERMINAL RESPONSE SM. #
  85.  
  86. ABHWORD[1] = NDQ$WORD[1];
  87. ABHSN[1] = ABHDN[0]; # REVERSE DN AND SN FOR RESPONSE SM #
  88. ABHDN[1] = ABHSN[0];
  89. SPMSG0[1] = 0; # START CNF/RC RESPONSE SM BODY #
  90. PFCSFC[1] = CNFRCTN; # DEFINED IN TXTSUSS #
  91. CNFP[1] = CNFP[0]; # PORT NUMBER. THAT'S IT FOR NOW #
  92. #
  93.   CONVERT 8 BIT ASCII CHARACTER NAME TO DISPLAY CODE NAME
  94. #
  95. FOR I = 0 STEP 1 UNTIL 6
  96. DO
  97. BEGIN
  98. B<(I*6),6>CNFNAMU[0] = SSDCAD(B<I*8,8>CNFRCNM[0]) ;
  99. END
  100.  
  101.  
  102. P<TRMINFO> = P<LINEREC> + LRHDRL$; # 1ST TERM NTRY IN LINREC#
  103. CURTERM = 0; # INITIAL OFFSET FOR TERMINAL ENTRY #
  104. FOR J=TE$WC[0] STEP TE$WC[0]
  105. WHILE J LQ LTES
  106. AND NOT FOUND
  107. DO # LOOP TIL END OF LINREC OR TERMINAL MATCH#
  108. BEGIN
  109. P<DEVNTRY> = P<TRMINFO> + TEHDRL$ ; # DEVICE ENTRY #
  110. CURDEV = 0; # INITIAL OFFSET FOR DEVICE ENTRY #
  111. FOR I = DE$WC[0] STEP DE$WC[0] WHILE I LQ TE$WC[0] - TEHDRL$
  112. AND NOT FOUND
  113. DO
  114. BEGIN # LOOP UNTIL END OF TRM AND DEV NTRY#
  115. IF LR$GC[0] EQ 0
  116. THEN
  117. BEGIN # NO GROUP #
  118. IF CNFNAME[0] EQ DE$NAME[0]
  119. THEN
  120. FOUND = TRUE ; # FOUND THE RIGHT ENTRY #
  121. END # NO GROUP #
  122. ELSE
  123. BEGIN # THERE IS GROUP #
  124. # USE ONLY THE ROOT NAME TO COMPARE TO NAME IN NCF #
  125.  
  126. NB = 0 ; # RESET NON-BLANKS COUNT #
  127. FOR K = 0 STEP 6 UNTIL 36
  128. DO
  129. BEGIN # COUNTING NON-BLANKS #
  130. IF B<I,6>CNFNAMU[0] NQ O"55"
  131. THEN
  132. NB = NB + 1 ; # REMEMBER NUMBER OF NONBLANKS#
  133. END
  134.  
  135. IF C<0,NB-2>CNFNAMU[0] EQ DE$NAME[0]
  136. THEN
  137. BEGIN # ROOT IS MATCHING #
  138. FOUND = TRUE ; # THIS ENTRY HAS SAME ROOT AND SUFIX #
  139. END # ROOT IS MATCHING #
  140. END # THERE IS GROUP #
  141.  
  142. IF FOUND
  143. THEN
  144. BEGIN # READY TO RESPONSE #
  145. CSTITR(TRUE) ;
  146. #
  147.   RESET BASED ARRAY POINTERS IN CASE NDQ ENTRY HAS BEEN
  148.   MOVED
  149. #
  150. P<LINEREC> = P<NDQ> + NDQ$TCSIZE[0]; # LINE REC ARRAY #
  151. P<TRMINFO> = P<LINEREC> + LRHDRL$ + CURTERM;
  152. P<DEVNTRY> = P<TRMINFO> + TEHDRL$ + CURDEV;
  153. END
  154.  
  155. CURDEV = CURDEV + DE$WC[0]; # OFFSET FOR NEXT DEV ENTRY #
  156. P<DEVNTRY> = P<TRMINFO> + TEHDRL$ + CURDEV;
  157.  
  158. END # LOOP UNTIL THE END OF DEVICES #
  159.  
  160.  
  161. CURTERM = CURTERM + TE$WC[0]; # OFFSET FOR NEXT TERM ENTRY #
  162. P<TRMINFO> = P<LINEREC> + LRHDRL$ + CURTERM;
  163.  
  164. END # GO THROUGH LINE RECORD FOR DEVICE #
  165.  
  166. IF NOT FOUND
  167. THEN # NOTHING GOT CONFIGURED #
  168. BEGIN # ISSUE CNF/RC/A #
  169. ABHTLC[1] = NCNFA; # DEFINED IN TXTSMCS. ABH COMPLETE #
  170. PFCSFC[1] = CNFRCTA; # DEFINED IN TXTSUSS. SM COMPLETE #
  171. SSTAQE (P<OTQ>, CTEAQL$, ABH[1], CSSM[1]); # QUEUE CNF/TE/A#
  172. END
  173. SSTRTS (P<NDQ>, 0, NDQ$ESIZE[0]); # DEL 1ST NTRY IN NCF DATA Q#
  174.  
  175. END # CSTRCT #
  176.  
  177. TERM
cdc/nos2.source/nam5871/cstrct.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator