cdc:nos2.source:nam5871:nvftite
Table of Contents
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
- *DECK NVFTITE
- USETEXT TEXTNVF
- USETEXT TXTANVF
- USETEXT TEXTSS
- USETEXT TXSMNVF
- USETEXT TXTAPSS
- USETEXT TXTSUSS
- PROC NVFTITE;
- # TITLE NVFTITE - INITIATE TERMINAL CONNECTION (CR/ITE SM) #
- BEGIN # NVFTITE #
- #
- ** NVFTITE - INITIATE TERMINAL CONNECTION (CR/ITE SM).
- *
- * E. THAVIKULWAT 81/08/18
- *
- * THIS PROCEDURE INITIATES TERMINAL CONNECTION IN RESPONSE TO A
- * CR/ITE REQUEST. IT IS CALLED INTO EXECUTION BY PROCEDURE
- * *NVFTDQE*.
- *
- * PROC NVFTITE
- *
- * ENTRY:
- * ABH IN *ABHBUF*
- * CR/ITE SM IN *MSGBUF*
- *
- * EXIT:
- * CONNECTION INITIATED
- *
- * METHOD:
- * CALL *NVFUAFV* TO GET A VCB ORDINAL. IF NO ORDINAL AVAILABLE,
- * SEND CR/ITE/A RESPONSE AND EXIT. OTHERWISE, CALL *SSTATS* TO
- * ALLOCATE SPACE FOR A NEW PTAC ENTRY AND COPY AUTOLOGIN DATA,
- * IF ANY, TO THE PTAC. SEND CR/ITE/N RESPONSE AND SAVE
- * APPROPRIATE INFORMATION FROM THE CR/ITE REQUEST IN THE PTAC.
- * IF SYNCHRONOUS CONSOLE, CALL *SSTATS* TO ALLOCATE SPACE FOR A
- * NEW PDCT. FOR ALL INTERACTIVE DEVICES, SEND BANNER AND CALL
- * *NVFTILP* TO ISSUE LOGIN PROMPT. DEPENDING ON THE TERMINAL
- * CLASS, SEND A CTR/CHAR TO FORCE THE TERMINAL TO BE IN NON-
- * TRANSPARENT INPUT MODE. FOR PASSIVE DEVICES, ADD THE
- * DEVICE TO ITS OWNING CONSOLE'S PDCT ENTRY AND DETERMINE IF
- * DEVICE IS TO BE SWITCH IMMEDIATELY.
- #
- #
- **** PROC NVFTITE - XREF LIST.
- #
- XREF
- BEGIN
- FUNC SSDCAD U; # CONVERT ASCII TO DISPLAY #
- PROC MESSAGE; # SEND MESSAGE TO SYSTEM AND USER DAYFILE #
- PROC NVFUAFV; # ACQUIRE A FREE VCB ORDINAL #
- PROC NVFTDSP; # DETERMINE SWITCH POSSIBILITY #
- PROC NVFTETC; # END TERMINAL CONNECTION #
- PROC NVFTILP; # ISSUE LOGIN PROMPT #
- PROC NVFUMQE; # TRANSFER SM OR TEXT TO QUEUE #
- PROC SSBEBF; # EXTRACT BIT FIELDS #
- PROC SSBSBF; # STORE BIT FIELDS #
- PROC SSTATS; # ALLOCATE TABLE SPACE #
- PROC SSTETS; # ENLARGE TABLE SPACE #
- END
- #
- ****
- #
- DEF LNAME$ #7#; # NUMBER OF CHARACTERS IN NAME #
- *CALL TMSGNVF
- *CALL TERMCLS
- ITEM ADDR I; # ADDRESSING INFORMATION FOR ABH #
- ITEM AORD I; # LOCATION OF ASCII NAME WITHIN ENTRY #
- ITEM ADCHAR I; # AREA FOR STORING ONE ASCII/DISPLAY CHAR #
- ITEM CTEMP C(7); # CHARACTER TERMPORARY #
- ITEM DORD I; # LOCATION OF DISPLAY NAME WITHIN ENTRY #
- ITEM ERRFLAG B; # ERROR FLAG #
- ITEM I I; # LOOP VARIABLE #
- ITEM IDX I; # INDEX FOR 2ND HALF OF *MSGBUF* #
- ITEM MATCH B; # EXIT LOOP INDICATOR #
- ITEM PD I; # SUBSCRIPT FOR ARRAY PDCT #
- ITEM PO I; # POSITION WHERE TABLE IS TO BE ENLARGED #
- ITEM PT I; # SUBSCRIPT FOR ARRAY PTAC #
- ITEM PTDT I; # SUBSCRIPT FOR GOTO SWITCH #
- ITEM SBITA I; # STARTING BIT OF ASCII NAME #
- ITEM SBITD I; # STARTING BIT OF DISPLAY NAME #
- ITEM VCBORD I; # VCB ORDINAL #
- #
- * FOLLOWING ARRAY CONTAINS MESSAGE ISSUED TO THE DAYFILE UPON NOT
- * FINDING AN EXPECTED PDCT ENTRY FOR THE PASSIVE DEVICE'S OWNING
- * CONSOLE.
- #
- ARRAY DAYMSG[00:00] S(5);
- BEGIN
- ITEM DAY$MSG1 C(00,00,27) = ["NVFTITE - CANNOT FIND PDCT "];
- ITEM DAY$MSG2 C(02,42,17) = ["ENTRY FOR TERMNAM"];
- ITEM DAY$TNAME C(03,42,07); # OWNING CONSOLE'S NAME #
- END
- #
- * THE FOLLOWING BASED ARRAY POINTER POINTS TO THE NEW PTAC ENTRY.
- #
- BASED ARRAY BPTAC[00:00] S(1);
- BEGIN
- ITEM BPT$WORD U(00,00,60); # FULL WORD REFERENCE #
- END
- SWITCH DTYPSWT:DTSTAT
- LLINT : SCON, # LABEL FOR CONSOLE DEVICE TYPE #
- LLPASV : SCR, # LABEL FOR CARD READER DEVICE #
- LLPASV : SLP, # LABEL FOR LINE PRINTER DEVICE #
- LLPASV : SCP, # LABEL FOR CARD PUNCH DEVICE #
- LLPASV : SPL, # LABEL FOR PLOTTER DEVICE #
- LLINT : SCLP, # LABEL FOR CDCNET LINE PRINTER (PSU) #
- LLINT : SUSER; # LABEL FOR USER DEVICE TYPE #
- #
- * CLEAR OUTGOING SM BUFFER (2ND HALF OF *MSGBUF*).
- #
- IDX = (NMSGBUF$ + 1) / 2; # INDEX TO 2ND HALF OF *MSGBUF* #
- FOR I = IDX STEP 1 UNTIL NMSGBUF$
- DO
- BEGIN
- MSG$WORD[I] = 0;
- END
- ADDR = ABHADR[0];
- #
- * GET A VCB ORDINAL. IF NO ORDINAL AVAILABLE, SEND CR/ITE/A
- * RESPONSE AND EXIT. OTHERWISE, CONTINUE PROCESSING.
- #
- NVFUAFV(VCBORD,ERRFLAG); # OBTAIN AN AVAILABLE VCB ORD #
- IF ERRFLAG
- THEN # NO VCB ORDINAL AVAILABLE #
- BEGIN # BUILD CR/ITE/A RESPONSE #
- PFCSFC[1] = CRITEA;
- CRRITE[1] = RCIT"NVC";
- CRACN[1] = CRACN[0];
- NVFUMQE(P<CTQ>,APSM[1],APPPR$,ADDR,LCRITEA); # RESPONSE TO Q #
- RETURN;
- END
- #
- * VCB ORDINAL AVAILABLE, PROCEED TO ALLOCATE SPACE FOR A NEW PTAC
- * ENTRY.
- #
- PT = PTALNGTH / PTACSIZ$; # CALCULATE NEW PTAC ENTRY ORD #
- SSTATS(P<PTAC>,PTACSIZ$); # ALLOC SPACE FOR PTAC ENTRY #
- #
- * CLEAR NEW PTAC BUFFER.
- #
- P<BPTAC> = LOC(PTAC[PT]); # POINTS TO NEW PTAC ENTRY #
- FOR I = 0 STEP 1 UNTIL (PTACSIZ$ - 1)
- DO
- BEGIN
- BPT$WORD[I] = 0;
- END
- #
- * CONVERT ASCII NAME TO DISPLAY NAME AND STORE IN TEMPORARY.
- #
- AORD = 1; # LOCATION OF ASCII NAME #
- SBITA = 4; # STARTING BIT OF ASCII NAME #
- DORD = 0; # LOCATION OF DISPLAY NAME #
- SBITD = 0; # STARTING BIT OF DISPLAY NAME #
- FOR I = 0 STEP 1 UNTIL 6
- DO
- BEGIN
- SSBEBF(NVFSM[0],AORD,SBITA,8,ADCHAR); # EXTRACT 1 ASCII CHAR #
- ADCHAR = SSDCAD(ADCHAR); # CONVERT TO DISPLAY #
- SSBSBF(CTEMP,DORD,SBITD,6,ADCHAR); # STORE 1 DISPLAY CHAR #
- END
- #
- * SEARCH THE ALT FOR THIS TERMINAL. IF FOUND STORE THE AUTO
- * LOGIN INFO IN THE PTAC ENTRY.
- #
- FOR I=0 STEP 1 WHILE CTEMP NQ ALT$TNAM[I] AND
- I LQ ALTL/ALTSIZ$
- DO
- BEGIN
- END
- IF I LQ ALTL/ALTSIZ$
- THEN
- BEGIN
- PTA$ALIF[PT] = TRUE;
- PTA$AFWRD[PT] = ALT$WRD1[I];
- PTA$AUWRD[PT] = ALT$WRD2[I];
- PTA$AAWRD[PT] = ALT$WRD3[I];
- END
- #
- * BUILD CR/ITE/N RESPONSE.
- #
- PFCSFC[1] = CRITEN;
- CRACN[1] = CRACN[0];
- CRNXP[1] = TRUE;
- CRICT[1] = ICT$;
- CRALN[1] = ALN$;
- CRVCB[1] = VCBORD;
- CRITN[1] = CTEMP;
- NVFUMQE(P<CTQ>,APSM[1],APPPR$,ADDR,LCRITEN); # TRNSFR RSP TO Q #
- #
- * BUILD PTAC ENTRY.
- #
- PTA$TN[PT] = CRITN[1];
- PTA$ICF[PT] = CRIC[0];
- PTA$ACN[PT] = CRACN[0];
- PTA$VCB[PT] = VCBORD;
- PTA$ABL[PT] = CRITABL[0];
- PTA$SDT[PT] = CRSDT[0];
- PTA$DT[PT] = CRITDT[0];
- PTA$TC[PT] = CRITTC[0];
- PTA$DO[PT] = CRDO[0];
- PTA$PW[PT] = CRITPW[0];
- PTA$PL[PT] = CRITPL[0];
- PTA$XBZ[PT] = CRXBZ[0];
- PTA$NET[PT] = CRINET[0];
- PTA$UBZ[PT] = CRUBZ[0];
- PTA$SL[PT] = CRSL[0];
- PTA$DBZ[PT] = CRDBZ[0];
- PTA$CNTIME[PT] = CTM$PDT[0];
- PTA$HW[PT] = CRHW[0];
- PTA$VTP[PT] = CRVTP[0];
- PTA$IUVF[PT] = TRUE;
- #
- * IF SYNCHRONOUS CONSOLE, CALL *SSTATS* TO ALLOCATE SPACE FOR A NEW
- * PDCT ENTRY. FOR ALL INTERACTIVE DEVICES, SEND BANNER AND CALL
- * *NVFTILP* TO ISSUE APPROPRIATE PROMPT. FOR PASSIVE DEVICES, ADD
- * DEVICE TO ITS OWNING CONSOLE'S PDCT ENTRY AND DETERMINE IF DEVICE
- * IS TO BE SWITCHED IMMEDIATELY.
- #
- PTDT = PTA$DT[PT];
- GOTO DTYPSWT[PTDT];
- LLINT: # CONSOLE AND USER DEVICE TYPE #
- PTA$PROMPT[PT] = AWTFAM$; # AWAIT FAMILY PROMPT #
- IF PTA$TC[PT] GQ TC9$
- THEN # SYNCHRONOUS CONSOLE DEVICE #
- BEGIN # CREATE PDCT ENTRY #
- PD = PDTLNGTH; # SAVE NEW PDCT SUBSCRIPT #
- SSTATS(P<PDCT>,PDCTSIZ$); # ALLOCATE SPACE FOR PDCT ENTRY #
- #
- * CLEAR NEW PDCT BUFFER.
- #
- FOR I = PD STEP 1 UNTIL (PDTLNGTH - 1)
- DO
- BEGIN
- PDT$WORD[I] = 0;
- END
- PDT$CN[PD] = PTA$TN[PT];
- PDT$WC[PD] = PDCTSIZ$;
- PDT$CSTAT[PD+1] = PDCTST"AWTCVAL";
- PDT$CVCB[PD+1] = PTA$VCB[PT];
- END
- #
- * CHECK TERMINAL CLASS TO SEE IF NVF SHOULD SEND A CTR/CHAR.
- #
- ADDR = PTA$ACN[PT]; # APPLICATION CONNECTION NUMBER #
- GOTO TERMCLS [PTA$TC[PT]];
- SENDCTRCHAR:
- #
- * SEND CTR/CHAR TO FORCE TERMINAL TO BE IN NON-TRANSPARENT INPUT
- * MODE.
- #
- PFCSFC[1] = CTRCHAR;
- CTRSTR[1] = 0; # CLEAR REST OF WORD 0 #
- B<0,16>CTRSTR[1] = NOXPAR$; # ADD FN/FV PAIR FOR NON-XPARENT#
- NVFUMQE(P<CTQ>,APSM[1],APPPR$,ADDR,LCTRLO$); # TRANSFER TO QUEUE #
- NOCTRCHAR:
- #
- * BUILD BANNER AND CALL *NVFTILP* TO ISSUE APPROPRIATE PROMPT.
- #
- BAN$DATE[0] = C<1,9>CTM$DATE[0]; # SET DATE #
- BAN$TIME[0] = CTM$CLOCK[0]; # SET TIME OF DAY #
- BAN$TNAM[0] = PTA$TN[PT]; # TERMINAL NAME #
- NVFUMQE(P<CTQ>,CPRBUF[0],APPTTX$,ADDR,LMSG90$);
- NVFUMQE(P<CTQ>,BANBUF[0],APPTTX$,ADDR,LMSG30$); # TRANSFER TO Q #
- NVFUMQE(P<CTQ>,SYSHDR[0],APPTTX$,ADDR,LMSG70$); # TRANSFER TO Q #
- NVFTILP(PT); # ISSUE PROMPT IF REQUIRED #
- GOTO ENDDTYP;
- LLPASV: # PASSIVE DEVICE TYPE #
- #
- * CONVERT ASCII OWNING CONSOLE NAME TO DISPLAY AND STORE IN PTAC
- * ENTRY.
- #
- AORD = 3; # LOCATION OF ASCII NAME #
- SBITA = 4; # STARTING BIT OF ASCII NAME #
- DORD = 2; # LOCATION OF DISPLAY NAME #
- SBITD = 0; # STARTING BIT OF DISPLAY NAME #
- FOR I = 0 STEP 1 UNTIL 6
- DO
- BEGIN
- SSBEBF(NVFSM[0],AORD,SBITA,8,ADCHAR); # EXTRACT 1 ASCII CHAR #
- ADCHAR = SSDCAD(ADCHAR); # CONVERT TO DISPLAY #
- SSBSBF(PTAC[PT],DORD,SBITD,6,ADCHAR); # STORE 1 DISPLAY CHAR #
- END
- #
- * SEARCH PDCT TABLE FOR ENTRY BELONGING TO THIS DEVICE'S OWNING
- * CONSOLE.
- #
- MATCH = FALSE;
- FOR PD = 0 STEP PDT$WC[PD] WHILE (NOT MATCH AND PD LS PDTLNGTH)
- DO
- BEGIN
- IF PDT$CN[PD] EQ PTA$OCN[PT]
- THEN
- BEGIN # FOUND OWNING CONSOLE ENTRY #
- PO = PD + PDT$WC[PD]; # POSITION TO ENLARGE TABLE #
- SSTETS(P<PDCT>,PO,1); # ENLARGE TABLE BY 1 WORD #
- PDT$WC[PD] = PDT$WC[PD] + 1; # UPDATE PDCT WORD COUNT #
- PDT$PN[PO] = PTA$TN[PT]; # SAVE TERMINAL NAME #
- PDT$PVCB[PO] = PTA$VCB[PT]; # SAVE VCB ORDINAL #
- PDT$PSTAT[PO] = PDCTST"AWTCON"; # SET STATE TO AWAIT CONSOL #
- IF PDT$CSTAT[PD+1] EQ PDCTST"CONSWT"
- THEN # CONSOLE HAS BEEN SWITCHED #
- BEGIN
- NVFTDSP(PT,PD); # SWITCH DEVICE IF POSSIBLE #
- END
- MATCH = TRUE;
- END
- END
- IF NOT MATCH
- THEN # NO ENTRY IN PDCT TABLE #
- BEGIN
- DAY$TNAME[0] = PTA$OCN[PT];
- MESSAGE(DAYMSG,0); # MSG TO SYSTEM AND USR DAYFILE #
- NVFTETC(PT); # END TERMINAL CONNECTION #
- END
- GOTO ENDDTYP;
- ENDDTYP: # COMMON END PROCESSING #
- END # END NVFTITE #
- TERM
cdc/nos2.source/nam5871/nvftite.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator