User Tools

Site Tools


cdc:nos2.source:nam5871:nvftite

NVFTITE

Table Of Contents

  • [00009] PROC NVFTITE
  • [00010] NVFTITE - INITIATE TERMINAL CONNECTION (CR/ITE SM)
  • [00014] INITIATE TERMINAL CONNECTION (CR/ITE SM).
  • [00052] FUNC SSDCAD U
  • [00054] PROC MESSAGE
  • [00055] PROC NVFUAFV
  • [00056] PROC NVFTDSP
  • [00057] PROC NVFTETC
  • [00058] PROC NVFTILP
  • [00059] PROC NVFUMQE
  • [00060] PROC SSBEBF
  • [00061] PROC SSBSBF
  • [00062] PROC SSTATS
  • [00063] PROC SSTETS

Source Code

NVFTITE.txt
  1. *DECK NVFTITE
  2. USETEXT TEXTNVF
  3. USETEXT TXTANVF
  4. USETEXT TEXTSS
  5. USETEXT TXSMNVF
  6. USETEXT TXTAPSS
  7. USETEXT TXTSUSS
  8.  
  9. PROC NVFTITE;
  10. # TITLE NVFTITE - INITIATE TERMINAL CONNECTION (CR/ITE SM) #
  11.  
  12. BEGIN # NVFTITE #
  13. #
  14. ** NVFTITE - INITIATE TERMINAL CONNECTION (CR/ITE SM).
  15. *
  16. * E. THAVIKULWAT 81/08/18
  17. *
  18. * THIS PROCEDURE INITIATES TERMINAL CONNECTION IN RESPONSE TO A
  19. * CR/ITE REQUEST. IT IS CALLED INTO EXECUTION BY PROCEDURE
  20. * *NVFTDQE*.
  21. *
  22. * PROC NVFTITE
  23. *
  24. * ENTRY:
  25. * ABH IN *ABHBUF*
  26. * CR/ITE SM IN *MSGBUF*
  27. *
  28. * EXIT:
  29. * CONNECTION INITIATED
  30. *
  31. * METHOD:
  32. * CALL *NVFUAFV* TO GET A VCB ORDINAL. IF NO ORDINAL AVAILABLE,
  33. * SEND CR/ITE/A RESPONSE AND EXIT. OTHERWISE, CALL *SSTATS* TO
  34. * ALLOCATE SPACE FOR A NEW PTAC ENTRY AND COPY AUTOLOGIN DATA,
  35. * IF ANY, TO THE PTAC. SEND CR/ITE/N RESPONSE AND SAVE
  36. * APPROPRIATE INFORMATION FROM THE CR/ITE REQUEST IN THE PTAC.
  37. * IF SYNCHRONOUS CONSOLE, CALL *SSTATS* TO ALLOCATE SPACE FOR A
  38. * NEW PDCT. FOR ALL INTERACTIVE DEVICES, SEND BANNER AND CALL
  39. * *NVFTILP* TO ISSUE LOGIN PROMPT. DEPENDING ON THE TERMINAL
  40. * CLASS, SEND A CTR/CHAR TO FORCE THE TERMINAL TO BE IN NON-
  41. * TRANSPARENT INPUT MODE. FOR PASSIVE DEVICES, ADD THE
  42. * DEVICE TO ITS OWNING CONSOLE'S PDCT ENTRY AND DETERMINE IF
  43. * DEVICE IS TO BE SWITCH IMMEDIATELY.
  44. #
  45.  
  46. #
  47. **** PROC NVFTITE - XREF LIST.
  48. #
  49.  
  50. XREF
  51. BEGIN
  52. FUNC SSDCAD U; # CONVERT ASCII TO DISPLAY #
  53.  
  54. PROC MESSAGE; # SEND MESSAGE TO SYSTEM AND USER DAYFILE #
  55. PROC NVFUAFV; # ACQUIRE A FREE VCB ORDINAL #
  56. PROC NVFTDSP; # DETERMINE SWITCH POSSIBILITY #
  57. PROC NVFTETC; # END TERMINAL CONNECTION #
  58. PROC NVFTILP; # ISSUE LOGIN PROMPT #
  59. PROC NVFUMQE; # TRANSFER SM OR TEXT TO QUEUE #
  60. PROC SSBEBF; # EXTRACT BIT FIELDS #
  61. PROC SSBSBF; # STORE BIT FIELDS #
  62. PROC SSTATS; # ALLOCATE TABLE SPACE #
  63. PROC SSTETS; # ENLARGE TABLE SPACE #
  64. END
  65.  
  66. #
  67. ****
  68. #
  69. DEF LNAME$ #7#; # NUMBER OF CHARACTERS IN NAME #
  70.  
  71. *CALL TMSGNVF
  72.  
  73. *CALL TERMCLS
  74.  
  75. ITEM ADDR I; # ADDRESSING INFORMATION FOR ABH #
  76. ITEM AORD I; # LOCATION OF ASCII NAME WITHIN ENTRY #
  77. ITEM ADCHAR I; # AREA FOR STORING ONE ASCII/DISPLAY CHAR #
  78. ITEM CTEMP C(7); # CHARACTER TERMPORARY #
  79. ITEM DORD I; # LOCATION OF DISPLAY NAME WITHIN ENTRY #
  80. ITEM ERRFLAG B; # ERROR FLAG #
  81. ITEM I I; # LOOP VARIABLE #
  82. ITEM IDX I; # INDEX FOR 2ND HALF OF *MSGBUF* #
  83. ITEM MATCH B; # EXIT LOOP INDICATOR #
  84. ITEM PD I; # SUBSCRIPT FOR ARRAY PDCT #
  85. ITEM PO I; # POSITION WHERE TABLE IS TO BE ENLARGED #
  86. ITEM PT I; # SUBSCRIPT FOR ARRAY PTAC #
  87. ITEM PTDT I; # SUBSCRIPT FOR GOTO SWITCH #
  88. ITEM SBITA I; # STARTING BIT OF ASCII NAME #
  89. ITEM SBITD I; # STARTING BIT OF DISPLAY NAME #
  90. ITEM VCBORD I; # VCB ORDINAL #
  91.  
  92.  
  93. #
  94. * FOLLOWING ARRAY CONTAINS MESSAGE ISSUED TO THE DAYFILE UPON NOT
  95. * FINDING AN EXPECTED PDCT ENTRY FOR THE PASSIVE DEVICE'S OWNING
  96. * CONSOLE.
  97. #
  98. ARRAY DAYMSG[00:00] S(5);
  99. BEGIN
  100. ITEM DAY$MSG1 C(00,00,27) = ["NVFTITE - CANNOT FIND PDCT "];
  101. ITEM DAY$MSG2 C(02,42,17) = ["ENTRY FOR TERMNAM"];
  102. ITEM DAY$TNAME C(03,42,07); # OWNING CONSOLE'S NAME #
  103. END
  104.  
  105. #
  106. * THE FOLLOWING BASED ARRAY POINTER POINTS TO THE NEW PTAC ENTRY.
  107. #
  108. BASED ARRAY BPTAC[00:00] S(1);
  109. BEGIN
  110. ITEM BPT$WORD U(00,00,60); # FULL WORD REFERENCE #
  111. END
  112.  
  113. SWITCH DTYPSWT:DTSTAT
  114. LLINT : SCON, # LABEL FOR CONSOLE DEVICE TYPE #
  115. LLPASV : SCR, # LABEL FOR CARD READER DEVICE #
  116. LLPASV : SLP, # LABEL FOR LINE PRINTER DEVICE #
  117. LLPASV : SCP, # LABEL FOR CARD PUNCH DEVICE #
  118. LLPASV : SPL, # LABEL FOR PLOTTER DEVICE #
  119. LLINT : SCLP, # LABEL FOR CDCNET LINE PRINTER (PSU) #
  120. LLINT : SUSER; # LABEL FOR USER DEVICE TYPE #
  121.  
  122. #
  123. * CLEAR OUTGOING SM BUFFER (2ND HALF OF *MSGBUF*).
  124. #
  125. IDX = (NMSGBUF$ + 1) / 2; # INDEX TO 2ND HALF OF *MSGBUF* #
  126. FOR I = IDX STEP 1 UNTIL NMSGBUF$
  127. DO
  128. BEGIN
  129. MSG$WORD[I] = 0;
  130. END
  131.  
  132. ADDR = ABHADR[0];
  133. #
  134. * GET A VCB ORDINAL. IF NO ORDINAL AVAILABLE, SEND CR/ITE/A
  135. * RESPONSE AND EXIT. OTHERWISE, CONTINUE PROCESSING.
  136. #
  137. NVFUAFV(VCBORD,ERRFLAG); # OBTAIN AN AVAILABLE VCB ORD #
  138. IF ERRFLAG
  139. THEN # NO VCB ORDINAL AVAILABLE #
  140. BEGIN # BUILD CR/ITE/A RESPONSE #
  141. PFCSFC[1] = CRITEA;
  142. CRRITE[1] = RCIT"NVC";
  143. CRACN[1] = CRACN[0];
  144. NVFUMQE(P<CTQ>,APSM[1],APPPR$,ADDR,LCRITEA); # RESPONSE TO Q #
  145.  
  146. RETURN;
  147. END
  148. #
  149. * VCB ORDINAL AVAILABLE, PROCEED TO ALLOCATE SPACE FOR A NEW PTAC
  150. * ENTRY.
  151. #
  152. PT = PTALNGTH / PTACSIZ$; # CALCULATE NEW PTAC ENTRY ORD #
  153. SSTATS(P<PTAC>,PTACSIZ$); # ALLOC SPACE FOR PTAC ENTRY #
  154. #
  155. * CLEAR NEW PTAC BUFFER.
  156. #
  157. P<BPTAC> = LOC(PTAC[PT]); # POINTS TO NEW PTAC ENTRY #
  158. FOR I = 0 STEP 1 UNTIL (PTACSIZ$ - 1)
  159. DO
  160. BEGIN
  161. BPT$WORD[I] = 0;
  162. END
  163. #
  164. * CONVERT ASCII NAME TO DISPLAY NAME AND STORE IN TEMPORARY.
  165. #
  166. AORD = 1; # LOCATION OF ASCII NAME #
  167. SBITA = 4; # STARTING BIT OF ASCII NAME #
  168. DORD = 0; # LOCATION OF DISPLAY NAME #
  169. SBITD = 0; # STARTING BIT OF DISPLAY NAME #
  170. FOR I = 0 STEP 1 UNTIL 6
  171. DO
  172. BEGIN
  173. SSBEBF(NVFSM[0],AORD,SBITA,8,ADCHAR); # EXTRACT 1 ASCII CHAR #
  174. ADCHAR = SSDCAD(ADCHAR); # CONVERT TO DISPLAY #
  175. SSBSBF(CTEMP,DORD,SBITD,6,ADCHAR); # STORE 1 DISPLAY CHAR #
  176. END
  177.  
  178.  
  179. #
  180. * SEARCH THE ALT FOR THIS TERMINAL. IF FOUND STORE THE AUTO
  181. * LOGIN INFO IN THE PTAC ENTRY.
  182. #
  183.  
  184. FOR I=0 STEP 1 WHILE CTEMP NQ ALT$TNAM[I] AND
  185. I LQ ALTL/ALTSIZ$
  186. DO
  187. BEGIN
  188. END
  189.  
  190.  
  191. IF I LQ ALTL/ALTSIZ$
  192. THEN
  193. BEGIN
  194. PTA$ALIF[PT] = TRUE;
  195. PTA$AFWRD[PT] = ALT$WRD1[I];
  196. PTA$AUWRD[PT] = ALT$WRD2[I];
  197. PTA$AAWRD[PT] = ALT$WRD3[I];
  198. END
  199.  
  200. #
  201. * BUILD CR/ITE/N RESPONSE.
  202. #
  203. PFCSFC[1] = CRITEN;
  204. CRACN[1] = CRACN[0];
  205. CRNXP[1] = TRUE;
  206. CRICT[1] = ICT$;
  207. CRALN[1] = ALN$;
  208. CRVCB[1] = VCBORD;
  209. CRITN[1] = CTEMP;
  210.  
  211. NVFUMQE(P<CTQ>,APSM[1],APPPR$,ADDR,LCRITEN); # TRNSFR RSP TO Q #
  212. #
  213. * BUILD PTAC ENTRY.
  214. #
  215. PTA$TN[PT] = CRITN[1];
  216. PTA$ICF[PT] = CRIC[0];
  217. PTA$ACN[PT] = CRACN[0];
  218. PTA$VCB[PT] = VCBORD;
  219. PTA$ABL[PT] = CRITABL[0];
  220. PTA$SDT[PT] = CRSDT[0];
  221. PTA$DT[PT] = CRITDT[0];
  222. PTA$TC[PT] = CRITTC[0];
  223. PTA$DO[PT] = CRDO[0];
  224. PTA$PW[PT] = CRITPW[0];
  225. PTA$PL[PT] = CRITPL[0];
  226. PTA$XBZ[PT] = CRXBZ[0];
  227. PTA$NET[PT] = CRINET[0];
  228. PTA$UBZ[PT] = CRUBZ[0];
  229. PTA$SL[PT] = CRSL[0];
  230. PTA$DBZ[PT] = CRDBZ[0];
  231. PTA$CNTIME[PT] = CTM$PDT[0];
  232. PTA$HW[PT] = CRHW[0];
  233. PTA$VTP[PT] = CRVTP[0];
  234. PTA$IUVF[PT] = TRUE;
  235. #
  236. * IF SYNCHRONOUS CONSOLE, CALL *SSTATS* TO ALLOCATE SPACE FOR A NEW
  237. * PDCT ENTRY. FOR ALL INTERACTIVE DEVICES, SEND BANNER AND CALL
  238. * *NVFTILP* TO ISSUE APPROPRIATE PROMPT. FOR PASSIVE DEVICES, ADD
  239. * DEVICE TO ITS OWNING CONSOLE'S PDCT ENTRY AND DETERMINE IF DEVICE
  240. * IS TO BE SWITCHED IMMEDIATELY.
  241. #
  242. PTDT = PTA$DT[PT];
  243. GOTO DTYPSWT[PTDT];
  244.  
  245. LLINT: # CONSOLE AND USER DEVICE TYPE #
  246. PTA$PROMPT[PT] = AWTFAM$; # AWAIT FAMILY PROMPT #
  247. IF PTA$TC[PT] GQ TC9$
  248. THEN # SYNCHRONOUS CONSOLE DEVICE #
  249. BEGIN # CREATE PDCT ENTRY #
  250. PD = PDTLNGTH; # SAVE NEW PDCT SUBSCRIPT #
  251. SSTATS(P<PDCT>,PDCTSIZ$); # ALLOCATE SPACE FOR PDCT ENTRY #
  252. #
  253. * CLEAR NEW PDCT BUFFER.
  254. #
  255. FOR I = PD STEP 1 UNTIL (PDTLNGTH - 1)
  256. DO
  257. BEGIN
  258. PDT$WORD[I] = 0;
  259. END
  260.  
  261. PDT$CN[PD] = PTA$TN[PT];
  262. PDT$WC[PD] = PDCTSIZ$;
  263. PDT$CSTAT[PD+1] = PDCTST"AWTCVAL";
  264. PDT$CVCB[PD+1] = PTA$VCB[PT];
  265. END
  266. #
  267. * CHECK TERMINAL CLASS TO SEE IF NVF SHOULD SEND A CTR/CHAR.
  268. #
  269. ADDR = PTA$ACN[PT]; # APPLICATION CONNECTION NUMBER #
  270. GOTO TERMCLS [PTA$TC[PT]];
  271.  
  272. SENDCTRCHAR:
  273.  
  274. #
  275. * SEND CTR/CHAR TO FORCE TERMINAL TO BE IN NON-TRANSPARENT INPUT
  276. * MODE.
  277. #
  278. PFCSFC[1] = CTRCHAR;
  279. CTRSTR[1] = 0; # CLEAR REST OF WORD 0 #
  280. B<0,16>CTRSTR[1] = NOXPAR$; # ADD FN/FV PAIR FOR NON-XPARENT#
  281. NVFUMQE(P<CTQ>,APSM[1],APPPR$,ADDR,LCTRLO$); # TRANSFER TO QUEUE #
  282.  
  283. NOCTRCHAR:
  284.  
  285. #
  286. * BUILD BANNER AND CALL *NVFTILP* TO ISSUE APPROPRIATE PROMPT.
  287. #
  288. BAN$DATE[0] = C<1,9>CTM$DATE[0]; # SET DATE #
  289. BAN$TIME[0] = CTM$CLOCK[0]; # SET TIME OF DAY #
  290. BAN$TNAM[0] = PTA$TN[PT]; # TERMINAL NAME #
  291. NVFUMQE(P<CTQ>,CPRBUF[0],APPTTX$,ADDR,LMSG90$);
  292. NVFUMQE(P<CTQ>,BANBUF[0],APPTTX$,ADDR,LMSG30$); # TRANSFER TO Q #
  293. NVFUMQE(P<CTQ>,SYSHDR[0],APPTTX$,ADDR,LMSG70$); # TRANSFER TO Q #
  294. NVFTILP(PT); # ISSUE PROMPT IF REQUIRED #
  295.  
  296. GOTO ENDDTYP;
  297.  
  298. LLPASV: # PASSIVE DEVICE TYPE #
  299. #
  300. * CONVERT ASCII OWNING CONSOLE NAME TO DISPLAY AND STORE IN PTAC
  301. * ENTRY.
  302. #
  303. AORD = 3; # LOCATION OF ASCII NAME #
  304. SBITA = 4; # STARTING BIT OF ASCII NAME #
  305. DORD = 2; # LOCATION OF DISPLAY NAME #
  306. SBITD = 0; # STARTING BIT OF DISPLAY NAME #
  307. FOR I = 0 STEP 1 UNTIL 6
  308. DO
  309. BEGIN
  310. SSBEBF(NVFSM[0],AORD,SBITA,8,ADCHAR); # EXTRACT 1 ASCII CHAR #
  311. ADCHAR = SSDCAD(ADCHAR); # CONVERT TO DISPLAY #
  312. SSBSBF(PTAC[PT],DORD,SBITD,6,ADCHAR); # STORE 1 DISPLAY CHAR #
  313. END
  314.  
  315. #
  316. * SEARCH PDCT TABLE FOR ENTRY BELONGING TO THIS DEVICE'S OWNING
  317. * CONSOLE.
  318. #
  319. MATCH = FALSE;
  320. FOR PD = 0 STEP PDT$WC[PD] WHILE (NOT MATCH AND PD LS PDTLNGTH)
  321. DO
  322. BEGIN
  323. IF PDT$CN[PD] EQ PTA$OCN[PT]
  324. THEN
  325. BEGIN # FOUND OWNING CONSOLE ENTRY #
  326. PO = PD + PDT$WC[PD]; # POSITION TO ENLARGE TABLE #
  327. SSTETS(P<PDCT>,PO,1); # ENLARGE TABLE BY 1 WORD #
  328. PDT$WC[PD] = PDT$WC[PD] + 1; # UPDATE PDCT WORD COUNT #
  329. PDT$PN[PO] = PTA$TN[PT]; # SAVE TERMINAL NAME #
  330. PDT$PVCB[PO] = PTA$VCB[PT]; # SAVE VCB ORDINAL #
  331. PDT$PSTAT[PO] = PDCTST"AWTCON"; # SET STATE TO AWAIT CONSOL #
  332. IF PDT$CSTAT[PD+1] EQ PDCTST"CONSWT"
  333. THEN # CONSOLE HAS BEEN SWITCHED #
  334. BEGIN
  335. NVFTDSP(PT,PD); # SWITCH DEVICE IF POSSIBLE #
  336. END
  337. MATCH = TRUE;
  338. END
  339. END
  340.  
  341. IF NOT MATCH
  342. THEN # NO ENTRY IN PDCT TABLE #
  343. BEGIN
  344. DAY$TNAME[0] = PTA$OCN[PT];
  345. MESSAGE(DAYMSG,0); # MSG TO SYSTEM AND USR DAYFILE #
  346. NVFTETC(PT); # END TERMINAL CONNECTION #
  347. END
  348.  
  349. GOTO ENDDTYP;
  350.  
  351. ENDDTYP: # COMMON END PROCESSING #
  352. END # END NVFTITE #
  353.  
  354. TERM
cdc/nos2.source/nam5871/nvftite.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator