cdc:nos2.source:nam5871:tvf
Table of Contents
TVF
Table Of Contents
- [00002] PRGM TVF1
- [00309] PROC ABORT
- [00310] PROC NETON
- [00311] PROC NETOFF
- [00312] PROC NETGETL
- [00313] PROC NETWAIT
- [00314] PROC NETPUT
- [00315] PROC MESSAGE
- [00316] PROC CLOCK
- [00317] PROC RECALL
- [00318] PROC TVFRECV
- [00319] PROC DATE
- [00320] FUNC XCDD C(10)
- [00321] FUNC XCHD C(10)
- [00631] PROC NETOF
- [00638] PROC SHUTDOWN
- [00713] PROC SHUTDD
- [00792] PROC ERMMSG
- [00871] PROC SMTREE
- [01051] PROC ENDCON
- [01098] PROC TERMSG
- [01291] PROC COMPUTEUS
- [01314] PROC CLEANUP
- [01325] PROC GENDATA
- [01402] PROC ENDTEST
- [01452] PROC LOFFMSG
Source Code
- TVF.txt
- *DECK TVF
- PRGM TVF1;
- BEGIN
- # COPYRIGHT CONTROL DATA SYSTEMS INC. 1994. #
- *IF,DEF,IMS
- #
- * TVF (TERMINAL VERIFICATION FACILITY) PAGE 1
- * IMS (INTERNAL MAINTENANCE SPECIFICATION) DATE.
- #
- #
- *1DC TVF IMS
- *
- * PROG NAME AUTHOR DATE
- * TVF P. WARBURTON 77/05/16
- *
- *
- * CONTENTS
- *
- * 1. INTERFACES
- * 2. DATA ARRAYS
- *
- * 3. DESIGN APPROACH
- *
- * 4. PROGRAM STRUCTURE
- *
- * 1.0 INTERFACES
- * INTERFACES ARE DESCRIBED AS TVF RESPONSE TO INPUT.
- *
- * FOR AN OVERVIEW OF THE USER INTERFACE, SEE THE NAM ERS
- * APPENDIX E OR NAM REFERENCE MANUAL. FOR EXPLANATION OF
- * TABLE FLAGS, SEE SECTION 2.0 BELOW.
- *
- * 1.1 USER (TERMINAL OPERATION) INTERFACE
- *
- * 1.1.1 BANNER - RESPONSE TO FC/INIT/SM
- *
- *
- * 1.1.2 TESTLIST - RESPONSE TO COMMAND "TEST"
- *
- * 1.1.3 COMLIST - RESPONSE TO COMMAND "HELP"
- *
- * 1.1.4 LOOPBACK TEST MSG-S
- * (A) BEGIN - RESPONSE TO COMMAND "1"
- * (B) MSG - RESPONSE TO USER INPUT FOR TEST = 1
- * (C) COMPLETE - RESPONSE TO COMMAND "ENDL" FOR TEST = 1
- *
- * 1.1.5 LINE TEST MSG-S
- * (A) BEGIN - RESPONSE TO COMMAND "2"
- * (B) MSG - RESPONSE TO USER INPUT FOR TEST = 2
- * (C) COMPLETE - SEND FOLLOWING MSG
- *
- * 1.1.6 SCREEN TEST MSG-S
- * (A) BEGIN - RESPONSE TO COMMAND "3"
- * (B) MSG - RESPONSE TO USER INPUT FOR TEST = 3
- * (C) (THERE IS NO COMPLETE MSG FOR SCREEN TEST)
- *
- * 1.1.7 AUTO-END - RESPONSE TO SHUT/INDS/SM WITH SHUTF = 1
- *
- * 1.1.8 UNRECOGNIZED - RESPONSE TO UNIDENTIFIABLE COMMAND
- *
- * 1.1.9 PARITY - RESPONSE TO INPUT MSG WITH PARITY ERROR FLAG
- *
- * 1.1.10READY - SEND WHEN TVF CLEARS INTERNAL TTST FLAG
- *
- * 1.2 DAYFILE MSG-S
- *
- * 1.2.1 NETON ATTEMPT - RESPONSE WHEN TVF CALLED
- *
- * 1.2.2 NETON SUCCESSFUL - RESPONSE WHEN NETON ACCEPTED
- *
- * 1.2.3 TVF ERC -RESPONSE TO ERR/LGL/SM
- *
- * 1.2.4 TVF ERRMSG -RESPONSE TO SM OR TERM DATA MSG TVF
- * CANNOT PROCESS
- * -PFCSFC NOT APPROPRIATE FOR TVF
- * -PFCSFC OUT-OF-SEQUENCE FOR NAM PROTOCOL
- * -ABT OUT-OF-RANGE
- * -ADR OUT-OF-RANGE
- *
- * 1.3 TVF CALLS TO NAM
- * -NETON
- * -NETWAIT
- * -NETGETL
- * -NETPUT
- * -NETOFF
- *
- * 1.4 TVF-TO-NAM SUPERVISORY MSG-S
- *
- * 1.4.1 CON/REQ/N-RESPONSE TO CON/REQ/SM
- *
- * 1.4.2 CON/REQ/A-RESPONSE TO CON/REQ/SM IF ACN OUT-OF-RANGE,
- * OR IF DEVICE TYPE NOT CONSOLE
- * OR IF FROM APPLICATION
- *
- * 1.4.3 FC/INIT/N-RESPONSE TO FC/INIT/SM
- *
- * 1.4.4 CON/END/SM-RESPONSE TO USER COMMAND"END",
- * TO CON/CB/SM, TO FC/STP/SM, TO FC/NAK/SM,
- * TO SHUT/INSD/SM SHUTF = 1
- *
- * 1.4.5 FC/RST/SM-RESPONSE TO FC/BRK/SM, TO FC/STP/SM
- *
- * 1.4.6 LST/OFF/SM - SENT FOLLOWING MESSAGE TO TERMINAL
- *
- * 1.4.7 LST/ON/SM - RESPONSE TO FC/ACK/SM
- *
- * 1.5 TABLE UPDATES
- *
- * 1.5.1 CLEAR TABLE -RESPONSE TO NETON SUCCESSFUL
- *
- * 1.5.2 SET WORD0,WORD1 -RESPONSE TO CON/REQ/SM IS TO SET
- * (PER TERMINAL) WORD0,WORD1 = CON/REQ WORD1,
- * -SET TEST=0,TFLAG=0
- *
- * 1.5.3 TTST=N -RESPONSE TO USER COMMAND "N"
- *
- * 1.5.4 TTST=0 -WHEN TEST "COMPLETE" SENT
- *
- * 1.5.5 TFLAG=1 -WHEN DATA MSG SENT
- *
- * 1.5.6 TFLAG=0 -WHEN FC/ACK/SM RECEIVED
- *
- * 1.5.7 CLEAR TABLE -RESPONSE TO CON/END/N
- * ENTRY
- *
- * 1.5.8 TPFCSFC=FCINIT -RESPONSE TO FC/INIT/SM
- *
- * 1.5.9 TPFCSFC=CONEND -WHEN CONEND SENT
- *
- * 1.5.10 SET PW,PL -RESPONSE TO TCH/TCHAR/SM
- *
- * 1.5.1.11 SET FLAG2 RESPONSE IN TEST 2 WHEN LINE SENT
- *
- * 1.6 SYSTEM MACREL CALLS
- * -DATE (FOR BANNER)
- * -CLOCK (FOR BANNER)
- * -XCOD (CONVERT OCTAL-TO-DISPLAY)
- * -XCDD (CONVERT OCTAL-TO-DECIMAL-TO-DISPLAY)
- * -XCHD (CONVERT HEX-TO-DISPLAY
- * -MESSAGE (FOR OUTPUT DAYFILE MSG-S)
- *
- * 2.0 DATA STRUCTURE: ARRAYS.
- *
- * 2.1 ABH - APPLICATION BLOCK HEADER - LENGTH: 1 WORD.
- * HOLDS THE HEADER FOR CALLS TO/FROM NAM.
- *
- * 2.2 BUFFER - LENGTH: BUFFERSIZE = 280 WORDS.
- * HOLDS INPUT/OUTPUT FOR NAM CALLS, DAYFILE
- * MESSAGES AND TERMINAL MESSAGES.
- *
- * 2.3 TABLE - LENGTH: TERMCOUNT (=20) * 2 WORDS.
- * HOLDS DATA FOR EACH TERMINAL CONNECTED.
- * - FORMAT SAME AS WORDS 0 AND 1 OF CON/REQ/SM
- * - UNUSED BIT FIELDS OF CON/REQ/SM USED AS FLAGS
- * - TTST INDICATES WHICH TVF TEST IN EXECUTION
- * - TFLAG INDICATES A CURRENT TEST WILL CONTINUE
- * WHEN CURRENT OUTPUT BLOCK IS ACK (FC/ACK/SM)
- *
- * 2.4 BANNER - LENGTH: 15 WORDS.
- * HOLDS BANNER FORMAT
- *
- * 2.5 MODELS - LENGTH: 15 WORDS.
- * HOLDS MODEL NUMBERS FOR TERMINAL DEVICE TYPES
- * (USED BY BANNER)
- *
- * 2.6 ASCII - LENGTH: 14 WORDS
- * HOLDS ASCII 95 CHARACTER SUBSET, DIGITS 0-9 REPEATED
- * TO FILL 105 8-BIT CHARACTER IN 14 WORDS (PACKED
- * 7.5 CHARACTERS PER WORD)
- *
- * 2.7 COMLIST - TVF COMMAND LIST - LENGTH: 4 WORDS
- * HOLDS TVF COMMANDS, RESPONSE TO HELP COMMAND
- *
- * 2.8 TESTLIST - TVL TEST LIST - LENGTH: 10 WORDS
- * HOLDS DISPLAY TESTLIST, RESPONSE TO TEST COMMAND
- *
- * 3.0 DESIGN APPROACH AND CONVENTIONS
- * -TVF CONSISTS OF A MAINLOOP AND CALLED PROCEDURES.
- * -THE MAINLOOP DOES NETON AND NETGETL.
- * -NO OTHER PROCEDURE READS DATA FROM NAM (NETGETL).
- * -CALLED PROCEDURES FORMAT TERMINAL AND DAYFILE
- * MESSAGE RESPONSES TO INPUT MESSAGES.
- * -AS PROCESSING PROCEEDS, ONE PROCEDURE MAY CALL ANOTHER.
- * -BUT NO PROCEDURE IS USED AS A RETURN JUMP, I.E., NO
- * PROCEDURE RETURNS CONTROL TO ITS CALLER.
- * -PROCESSING OF AN INPUT TERMINATES WITH A GOTO
- * NEXT, WHICH RETURNS CONTROL TO MAINLOOP NETGET CALL.
- * -IF NETON FAILS, CHECK STATUS BIT TO DETERMINE IF
- * SHOULD LOOP ON NETON CALL, OR SIMPLY ABORT TVF.
- * -IF NETGETL FINDS NO INPUT (ABT=0), NETWAIT IS
- * ENTERED.
- * -THERE IS NO PARAMETER PASSING BETWEEN PROCEDURES,
- * SINCE DATA NEEDED BY A CALLED PROCEDURE IS HELD
- * IN EITHER:
- * (A) TABLE ARRAY - STATUS OF CONNECTED TERMINAL
- * (B) BUFFER - INPUT SM OR TERMINAL MSG
- * -RESPONSES TO INCOMING SM (OUTPUT SM, DF MSG) AND
- * FIRST RESPONSE TO TERMINAL COMMANDS ARE GENERATED
- * IMMEDIATELY FOLLOWING IF-CONDITIONAL IDENTIFYING
- * SM
- * -FOR A TVF TEST, THERE ARE THREE RESPONSES
- * (A) TEST BEGIN MSG
- * (B) TEST MSG
- * (C) TEST COMPLETE MSG
- * -TEST BEGIN RESPONSE IS GENERATED IMMEDIATELY, BUT
- * (B) AND (C) MAY BE GENERATED SEPARATELY, DEPENDING
- * UPON THE COMPLEXITY OF THE TEST.
- * -NETPUT CALLS ARE SPREAD THRU CODE, OTHER NAM CALLS
- * (NETON,NETWAIT,NETGETL,NETOFF) OCCUR AT ONLY ONE
- * PLACE IN CODE.
- * -TFLAG SET/CLEARED SO THAT WHEN SHUTDOWN OCCURS, MAY
- * HAVE TO WAIT FOR FC/ACK/SM BEFORE SENDING AUTO
- * END MESSAGE
- * -ONLY ONE MSG AT A TIME IS SENT TO A TERMINAL.
- * LIST OFF IS SENT FOLLOWING THE MSG.
- * LIST ON IS SENT WHEN FC/ACK/SM IS RECEIVED.
- * THIS AVOIDS POTENTIAL TYPE-AHEAD BY TERMINAL OPERATOR.
- *
- * 4.0 PROGRAM STRUCTURE
- *
- * 4.1 MAIN LOOP
- * -NETON (INITIALIZE TVF)
- * -NETGETL FOR NEXT MSG
- * -AFTER EACH MSG IS PROCESSED, CONTROL RETURNS TO THIS
- * POINT OF THE MAINLOOP, BY A "GOTO NEXT"
- * -NETWAIT, IF NO INPUT AVAILABLE
- * -ROUTE SHUT/INSD/SM TO PROC SHUTDOWN
- * -ROUTE ALL MSGS TO PROC SHUTDOWND, IF THE SHUTDOWNF FLAG
- * IS SET.
- * -ROUTE ERR/LGL/SM TO PROC ERRMSG
- * -IF ACN (DATA MSG) OR ADR (SM) OUT-OF-RANGE, ROUTE TO
- * ERRMSG
- * -ROUTE SM TO PROC SMTREE
- * -ROUTE DM TO PROC TERMSG
- * -ROUTE ANYTHING ELSE TO ERRMSG
- * -IF SHUTDOWNF FLAG SET, ROUTE SM AND DM TO SHUTDD
- *
- * 4.2 SHUTDOWN
- * -IF SHUTYPE"1, NETOFF IMMEDIATELY
- * -IF SHUTYPE=1, INITIATE SHUTDOWN
- * -IF NO CONNECTIONS, NETOFF
- * -SET SHUTDOWN = 1
- * -SEND AUTO END MSG, IF POSSIBLE
- *
- * 4.3 SHUTDD
- * -IF REDUNDANT SHUTF=1, IGNORE
- * -IF TERMINAL DATA INPUT, IGNORE
- * -IF FC/INIT/SM AND TFLAG=1, SEND AUTO END, TFLAG=0
- * -IF FC/INIT/SM AND TFLAG=0, SEND CON/END/SM
- * -IF CON/END/N, CLEAR TABLE ENTRY
- * -WHEN ALL TABLE ENTRIES CLEARED, NETOFF
- *
- * 4.3 ERRMSG
- * -FORMAT DAYFILE MSG: "TVF ERRMSG" FOR SPURIOUS SM-S
- * "TVF ERC=NN" FOR ERR/LGL/SM
- *
- * 4.5 SMTREE: PROCESS SUPERVISORY MSG-S
- * -PROCESSING CONTROLLED BY ENTRY FOR TERMINAL IN TABLE
- * -ENTRY CLEARED: LOOK FOR CON/REQ/SM, NOTHING ELSE
- * IF IT COMES, SET TABLE
- * -CONREQ: LOOK FOR FC/INIT/SM, NOTHING ELSE
- * IF IT COMES, SET FCINIT
- * -FCINIT: LOOK FOR VARIOUS MSGS AND RESPOND ACCORDINGLY
- * IF A CON/END/SM IS SENT, UPDATE TABLE
- * -CONEND: LOOK FOR CON/END/N, IGNORE OTHER MSGS
- * IF IT COMES, CALL CONEND
- *
- * 4.6 ENDCON
- * -SEND END/CON/SM
- * -EXIT TO MAINLOOP
- * -CALLED BY SHUTDD, SMTREE, TERMSG TO END A CONNECTION
- *
- * 4.7 TERMSG: PROCESS DATA MSGS
- * -PROCESSING CONTROLLED BY ITEM "TTST" IN TERM TABLE ENTRY
- * -TTST=0: LOOK FOR TVF USER COMMANDS, INCLUDING TEST NUMBER
- * -FORMAT APPROPRIATE REPLY
- * -FOR TEST NUMBER, UPDATE TEST=N
- * -TTST=1: DO LOOPBACK TEST
- * -CHECK FOR "ENDL" TO END TEST
- * -TTST=2: SET I FOR NUMBER OF CHAR IN LINE,
- * CALL GENDATA TO GENERATE OUTPUT
- * -TTST=3: SET I FOR NUMBER OF CHAR IN SCREEN,
- * CALL GENDATA TO GENERATE OUTPUT
- * -TTST"1,2,3: SEND MSG TO TERMINAL, RESET TTST=0
- *
- * 4.8 GENDATA: GENERATE DATA (USED BY LINE AND SCREEN TESTS)
- * -IF USER INPUT, USE IT
- * -IF NULL INPUT, USE ASCII CODES
- * -EXIT TO LOFFMSG
- *
- * 4.9 ENDTEST: CALLED TO SEND TEST COMPLETE MSG
- * -CALLED BY TERMSG WHEN TEST=1 AND "ENDL" RECEIVED
- * -CALLED BY SMTREE TO END TEST 2
- * -EXIT TO LOFFMSG
- *
- * 4.10 LOFFMSG
- * -SEND LST/OFF/SM, SET TFLAG = 1.
- * -EXIT TO MAINLOOP
- * -CALLED BY SMTREE WHEN BANNER SEND
- * -CALLED BY TERMSG AND GENDATA WHEN MSG SENT
- *
- * SEE SECTIONS BELOW FOR PROC DESCRIPTIONS
- *
- #
- *ENDIF
- XREF
- BEGIN
- PROC ABORT;
- PROC NETON;
- PROC NETOFF;
- PROC NETGETL;
- PROC NETWAIT;
- PROC NETPUT;
- PROC MESSAGE;
- PROC CLOCK;
- PROC RECALL;
- PROC TVFRECV ;
- PROC DATE;
- FUNC XCDD C(10);
- FUNC XCHD C(10);
- END
- DEF BUFFERSIZE # 280 #;# I/O BUFFER SIZE #
- DEF TERMCOUNT # 20 #;# NUMBER OF TERMINALS #
- DEF DFOPTION # 3 #;# OPTION FOR DESTINATION OF DAYFILE MSG-S#
- DEF BDOPTION # 1 #;# OPTION FOR DISPLAY MSG AT CONTROL-POINT#
- DEF WAIT #4095 #;# NETWAIT TIME LIMIT #
- DEF NUMTC # 31#;# NUMBER OF TERMINAL CLASSES #
- ITEM I;
- ITEM J;
- ITEM K;
- ITEM TEMP C(10);
- ITEM SHUTDOWNF = 0;
- ITEM ACN;
- ITEM NETFLG I = 0; # FIRST UNSUCCESSFUL NETON FLAG #
- ITEM MSGFLG I = 0; # PUT MSG ON DAY-FILE ONCE FLAG #
- # COMDECKS: USERDEFS, CONDEF, CTRLDEF, DCDEF, ERRDEF, FCDEF, FILEDEF,#
- # LOUTDEF, LSTDEF, MSGDEF, SHUTDEF, TCHDEF, HEADER, #
- # USERITMS, SUPMSG, CON, CTRL, DC, ERR, FC, FILE, LOUT, #
- # LST, MSG, SHUT, TCH, NAMLEV. #
- CONTROL NOLIST;
- *CALL USERDEFS
- ARRAY ABH;
- BEGIN
- *CALL HEADER
- END
- BASED ARRAY SMESSAGE;
- BEGIN
- *CALL USERITMS
- END
- *CALL NAMLEV
- CONTROL LIST;
- ARRAY BUFFER [0:BUFFERSIZE] S(1);
- BEGIN
- ITEM BUF U(0,0,60);
- ITEM BUC C(0,0,10);
- END
- ARRAY NSUP[0:0] S(1);
- ITEM NSUPN B(0,2,1);
- BASED ARRAY BUFFOUT;
- ITEM BUFMSG U;
- ARRAY TABLE [1:TERMCOUNT] S(2);
- ITEM
- TWORD0 U(0,0,60),
- TWORD1 U(1,0,60),
- TPFCSFC U(0,0,16),
- TRC U(0,16,8),
- TACN U(0,24,12),
- TABL U(0,36,3),
- TTST U(0,39,4),
- THW U(0,43,1),
- TDT U(0,44,3),
- TTC U(0,47,5),
- TORD U(0,52,8),
- TNAME C(1,0,7),
- TFLAG U(1,42,1),
- TFLAG2 U(1,43,1),
- TPW U(1,44,8),
- TPL U(1,52,8);
- ARRAY MODELS [1:NUMTC] S(1);
- ITEM MODEL C(0,0,10) =["M33",
- "713",
- "721",
- "2741",
- "M40",
- "H2000",
- "X364",
- "T4014X",
- "HASP-POST",
- "200UT",
- "714-30",
- "711-10",
- "714-10",
- "HASP-PRE",
- "734",
- "2780-BSC",
- "3780-BSC",
- "3270",
- "UNKNOWN",
- "UNKNOWN",
- "UNKNOWN",
- "UNKNOWN",
- "UNKNOWN",
- "UNKNOWN",
- "UNKNOWN",
- "UNKNOWN",
- "UNKNOWN",
- "TC28-USER",
- "TC29-USER",
- "TC30-USER",
- "TC31-USER"];
- ARRAY [0:13] S(1);
- ITEM ASCII U(0,0,60) =[X"202122232425262",
- X"728292A2B2C2D2E",
- X"2F3031323334353",
- X"63738393A3B3C3D",
- X"3E3F40414243444",
- X"5464748494A4B4C",
- X"4D4E4F505152535",
- X"455565758595A5B",
- X"5C5D5E5F6061626",
- X"36465666768696A",
- X"6B6C6D6E6F70717",
- X"273747576777879",
- X"7A7B7C7D7E30313",
- X"233343536373839"];
- ARRAY COMLIST S(9);
- ITEM
- C1 C(0,00,16) = ["TVF COMMAND LIST"],
- C2 U(1,36,24) = [0],
- C3 C(2,00,06) = [" HELP"],
- C4 U(2,36,24) = [0],
- C5 C(3,00,06) = [" TEST"],
- C6 U(3,36,24) = [0],
- C7 C(4,00,05) = [" END"],
- C8 U(4,30,30) = [0],
- C9 C(5,00,20) = [" ENDL (END TEST 1)"],
- C10 U(7,00,60) = [0],
- C11 C(8,00,02) = [".."],
- C12 U(8,12,48) = [0];
- ARRAY TESTLIST S(11);
- ITEM
- T1 C(0,00,30) = ["PLEASE ENTER TEST LIST DESIRED"],
- T2 U(3,00,60) = [0],
- T3 C(4,00,17) = [" 1-LOOPBACK TEST"],
- T4 U(5,42,18) = [0],
- T5 C(6,00,13) = [" 2-LINE TEST"],
- T6 U(7,18,42) = [0],
- T7 C(8,00,15) = [" 3-SCREEN TEST"],
- T8 U(9,30,30) = [0],
- T9 C(10,0,02) = [".."],
- T10 U(10,12,48)= [0];
- ARRAY PR [0:0] S(1);
- ITEM
- PROMPTC C(0,0,2) = [".."],
- PROMPTB U(0,12,48)= [0],
- PROMPT U(0,0,60);
- ARRAY AUTERM S(3);
- ITEM
- AUTERMA C(0,0,24) = [ "AUTO END -TVF TERMINATES"],
- AUTERMB U(2,24,36) = [0];
- ARRAY TVFERR S(3);
- ITEM
- TVFERRA C(0,0,15) = ["ERROR TVF READY"],
- TVFERRB U(1,30,30) = [0],
- TVFERRC C(2,0,2) = [".."],
- TVFERRD U(2,12,48) = [0];
- ARRAY TESTCOM S(3);
- ITEM
- TESTCOMA C(0,0,17) = ["TVF TEST COMPLETE"],
- TESTCOMB U(1,42,18) = [0],
- TESTCOMC C(2,0,2) = [".."],
- TESTCOMD U(2,12,48) = [0];
- CONTROL EJECT;
- # MAIN LOOP #
- *IF,DEF,IMS
- #
- *1DC TVF MAINLOOP
- *
- * 1. TFV PRGM AUTHOR DATE
- * MAINLOOP P.WARBURTON 77/05/16
- *
- * 2. FUNCTIONAL DESCRIPTION
- * WHEN TVF CALLED, DOES NETON. MAINLOOP CONTAINS:
- * -NETGETL CALL, LABELED "NEXT". CONTROL RETURNS HERE IN
- * MAINLOOP.
- * -NETWAIT, IF NO INPUT (ABT=0), LOOP TO "NEXT".
- * -JUMP ON ABT VALUE IN ABH HEADER FOR SUPERVISORY OR DATA
- * MSG
- * -TESTS FOR ADR AND ABT IN RANGE, ERROR IF NOT.
- * -FOR SHUTDOWN, CALLS SHUTDOWN OR SHUTDD.
- * -FOR SM OR DATA MSG, PUT ACN IN LOC "ACN".
- *
- * 3. METHOD USED
- * IF-THEN CONDITIONAL TESTS TO CALL OTHER TVF PROCEDURES,
- * FALL THROUGH TO PROCESS ERROR MSG WHEN CONDITIONS FAIL.
- *
- * 4. ENTRY CONDIIONS
- * NONE
- *
- * 5. EXIT CONDITIONS
- * EXITS WITH MSG READ BY NETGETL IN BUFFER (FOR FURTHER
- * PROCESSING)
- * EXITS TO PROCS: TERMSG,SMTREE,SHUTDOWN,ERRMSG,SHUTDD
- * -ACN FROM HEADER OR MSG IS IN LOC "ACN"
- *
- * 6. COMMON DECKS CALLED
- * HEADER-ABH ITEM DEFS
- * USERIMS-SUPERVISORY MSG ITEM DEFS
- *
- * 7. PROCEDURES/FUNCTIONS CALLED
- * NETON
- * NETGETL - GET NEXT INPUT, (LIST=0) SUPERVISORY OR DATA MSG
- * NETWAIT - FOR ABT=0, NETWAIT AND LOOP BACK TO "NEXT" NETGETL
- * TERMSG - EXIT FOR TERMINAL INPUT MSG (ABT=2) WITH ADR IN RANGE
- * SHUTDOWN - EXIT FOR SHUT/INSD/SM
- * SHUTDD - FOR ORDERLY SHUTDOWN
- * ERRMSG - EXIT FOR ERR/LGL/SM
- * SMTREE - EXIT TO PROCESS SUP MSG (ABT=3) WITH ACN IN RANGE
- * ERRMSG - FALL THRU EXIT FOR ABT, ADR, OR ACN OUT-OF-RANGE
- *
- * 8. DAYFILE MSG
- * -TVF ATTEMPTING NETON
- * -TVF NETON SUCCESSFUL
- *
- #
- *ENDIF
- TVFRECV ;
- BUC[0] = "TVF ATTEMP";
- BUC[1] = "TING NETON";
- BUF[2] = 0;
- MESSAGE (BUFFER,DFOPTION);
- FOR I = 1 WHILE I NQ 0 DO
- BEGIN
- NETON("TVF",NSUP,I,1,TERMCOUNT);
- IF I EQ 2 THEN
- BEGIN #TVF ALRDY PRESENT, ABORT#
- BUC[0] = "NETON REJE";
- BUC[1] = "CTED, TVF ";
- BUC[2] = "ALREADY PR";
- BUC[3] = "ESENT";
- BUF[4] = 0;
- MESSAGE(BUFFER,DFOPTION);
- ABORT;
- END
- ELSE
- BEGIN
- IF I EQ 3 THEN
- BEGIN #WAITING FOR TVF TO ENABLE#
- BUC[0] = "WAITING FO";
- BUC[1] = "R TVF TO B";
- BUC[2] = "E ENABLED";
- BUF[3] = 0;
- IF MSGFLG EQ 0 THEN
- BEGIN #PUT MSG ON DF ONCE ONLY #
- MESSAGE(BUFFER,DFOPTION);
- MSGFLG = 1;
- END
- ELSE #PUT MSG ON B-DISPLAY #
- MESSAGE(BUFFER,BDOPTION);
- END
- END
- RECALL(0);
- END
- BUC[0] = "TVF NETON ";
- BUC[1] = "SUCCESSFUL";
- BUF[2] = 0;
- MESSAGE (BUFFER,DFOPTION);
- SHUTDOWNF = 0;
- FOR I = 1 STEP 1 WHILE I LQ TERMCOUNT DO
- BEGIN
- TWORD0[I] = 0;
- TWORD1[I] = 0;
- END
- P<SMESSAGE> = LOC(BUFFER);
- P<BUFFOUT> = LOC(BUF[10]);
- NEXT:
- BUF[0] = 0;
- BUF[1] = 0;
- NETGETL (0,ABH,BUFFER,BUFFERSIZE);
- IF ABHABT EQ 0 THEN
- BEGIN
- NETWAIT (WAIT,0);
- GOTO NEXT;
- END
- IF ABHABT EQ 3 AND ABHADR NQ 0 THEN GOTO NEXT;
- IF ABHABT EQ 3 THEN ACN = CONACN[0];
- IF ABHABT EQ 1 OR ABHABT EQ 2 THEN ACN = ABHADR;
- IF ABHABT EQ 3 AND PFC EQ ERR THEN ERMMSG;
- IF ABHABT EQ 3 AND PFCSFC EQ SHUINS THEN SHUTDOWN;
- IF ACN EQ 0 OR ACN GR TERMCOUNT THEN ERMMSG;
- IF SHUTDOWNF EQ 1 THEN SHUTDD;
- IF ABHABT EQ 1 OR ABHABT EQ 2 THEN TERMSG;
- IF ABHABT EQ 3 THEN SMTREE;
- ERMMSG;
- # END OF MAINLOOP #
- PROC NETOF;
- BEGIN
- NETOFF;
- ABORT;
- END
- CONTROL EJECT;
- PROC SHUTDOWN;
- BEGIN
- *IF,DEF,IMS
- #
- *1DC SHUTDOWN
- *
- * 1. PROC NAME AUTHOR DATE
- * SHUTDOWN P.WARBURTON 77/05/16
- *
- * 2. FUNCTIONAL DESCRIPTION
- * PROCESSES SHUT/INSD/SM, TERMINATING TVF WITH A NETOFF.
- *
- * 3. METHOD USED
- * IF SHUTF EQ 1, THEN "TVF TERMINATE" MESSAGE SENT TO EACH
- * CONNECTED TERMINAL AND CON/END/SM SENT FOR EACH TERMINAL,
- * THEN NETOFF AND STOP.
- * IF SHUTF EQ 0, THEN NETOFF AND STOP IMMEDIATELY.
- * IF ORDERLY SHUTDOWN CANNOT BE DONE IMMEDIATELY, SET SHUTDOWNF
- * FLAG FOR SHUTDD PROCEDURE, WHICH FINISHES SHUTDOWN.
- *
- * 4. ENTRY CONDITIONS
- * SHUT/INSD/SM IS IN BUFFER,
- * TABLE HAS NON-ZERO ENTRY FOR EACH TERMINAL CONNECTED.
- *
- * 5. EXIT CONDITIONS
- * IF NO NETOFF, THEN SET SHUTDOWNF = 1.
- *
- * 6. COMMON DECKS CALLED
- * IF NO NETOFF, THEN SET SHUTDOWNF = 1, AND EXIT TO NEXT
- *
- * NONE
- *
- * 7. PROCEDURES/FUNCTIONS CALLED
- * NETPUT-SEND MSG TO TERMINALS, SEND CON/END/SM MSG-S
- * NETOFF-TVF TERMINATES
- *
- * 8. DAYFILE DIAGNOSTIC MESSAGES
- * NONE
- *
- #
- *ENDIF
- K = 0;
- FOR I = 1 STEP 1 WHILE I LQ TERMCOUNT DO
- IF TWORD0[I] NQ 0 THEN K = 1;
- IF SHUTF OR K EQ 0 THEN
- BEGIN
- NETOFF;
- STOP;
- END
- IF SHUTDOWNF EQ 1 THEN GOTO NEXT;
- SHUTDOWNF = 1;
- FOR I = 1 STEP 1 WHILE I LQ TERMCOUNT DO
- IF TPFCSFC[I] EQ CONREQ THEN
- BEGIN
- ABHTLC = 2;
- PFCSFC = CONEND;
- CONACN = TACN[I];
- BUF[1] = 0;
- NETPUT (ABH,BUFFER);
- END
- ABHABT = 1;
- ABHTLC = 30;
- ABHACT = 4;
- ABHNFE = 1;
- FOR I = 1 STEP 1 WHILE I LQ TERMCOUNT DO
- IF TPFCSFC[I] EQ FCINIT AND TFLAG[I] EQ 0 THEN
- BEGIN
- ABHADR = TACN[I];
- NETPUT(ABH,AUTERM);
- END
- GOTO NEXT;
- END
- CONTROL EJECT;
- PROC SHUTDD;
- BEGIN
- *IF,DEF,IMS
- #
- *1DC SHUTDD
- *
- * 1. PROC NAME AUTHOR DATE
- * SHUTDD P.WARBURTON 77/06/01
- *
- * 2. FUNCTIONAL DESCRIPTION
- * PROCESS INCOMING MESSAGES DURING SHUTDOWN, WHEN SHUTDOWNF = 1.
- *
- * 3. METHOD USED
- * -IGNORE TERMINAL INPUT
- * -TRACK TFLAG AND FC/ACK/SM TO INSURE THAT
- * A. AUTO END MSG SENT
- * B. CON/END/SM SENT EITHER BY SHUTDOWN OR BY SHUTDD
- * -NETOFF WHEN CON/END/N RECEIVED FOR ALL CONNECTIONS
- * -UPDATE FLAGS
- *
- * 4. ENTRY CONDITIONS
- * MESSAGE IN BUFFER
- * TFLAG SET IF AUTO END NOT YET SENT
- *
- * 5. EXIT CONDITIONS
- * RETURN TO MAIN LOOP, OR NETOFF
- *
- * 6. COMMON DECKS CALLED
- * NONE
- *
- * 7. PROCEDURES CALLED
- * GOTO NEXT (RETURN TO MAINLOOP)
- *
- * 8. DAYFILE/DIAGNOSTIC MESSAGES
- * NONE
- *
- #
- *ENDIF
- IF ABHABT NQ 3 THEN GOTO NEXT;
- IF PFCSFC EQ CONREQ THEN
- BEGIN
- ABHTLC = 1;
- EB = TRUE;
- NETPUT (ABH,BUFFER);
- GOTO NEXT;
- END
- IF PFCSFC EQ FCNAK OR (PFCSFC EQ FCACK AND TFLAG[ACN] EQ 0) THEN
- ENDCON;
- IF PFCSFC EQ FCACK AND TFLAG[ACN] NQ 0 THEN
- BEGIN
- TFLAG[ACN] = 0;
- ABHABT = 1;
- ABHADR = ACN;
- ABHACT = 4;
- ABHNFE = 1;
- ABHTLC = 30;
- NETPUT(ABH,AUTERM);
- GOTO NEXT;
- END
- IF PFC EQ CON AND SFC EQ ENDD AND RB THEN
- BEGIN
- TWORD0[ACN] = 0;
- TWORD1[ACN] = 0;
- END
- K = 0;
- FOR I = 1 STEP 1 WHILE I LQ TERMCOUNT DO
- IF TWORD0[I] NQ 0 THEN K = 1;
- IF K EQ 0 THEN
- BEGIN
- NETOFF;
- STOP;
- END
- GOTO NEXT;
- END
- CONTROL EJECT;
- PROC ERMMSG;
- BEGIN
- *IF,DEF,IMS
- #
- *1DC ERRMSG
- *
- * 1. PROC NAME AUTHOR DATE
- * ERRMSG P.WARBURTON 77/05/16
- *
- * 2. FUNCTIONAL DESCRIPTION
- * GENERATE DAYFILE MSG-S "TVF ERRMSG" AND "TVF ERC", FILLING IN
- * VALUES FOR ABT, ADR, TEXT, AND TERMINAL
- *
- * 3. METHOD USED
- * SET UP FOR ERRMSG OR ERR/LGL/SM.
- * IF ERR/LGL/SM, FILL IN VALUE FOR RC, THEN MOVE HEADER OF
- * MSG THAT CAUSED ERR FROM BUF[1] TO HEADER, AND FIRST WORD OF
- * MSG THAT CAUSED ERR FROM BUF[2] TO BUF[0].
- * NOW FILL IN VALUES FOR VARIABLES. USE ACT OF HEADER TO
- * DETERMINE WHETHER HEX OR OCTAL SOURCE TO DISPLAY CODE.
- * THEN DETERMINE IF TABLE CONTAINS A RELEVANT TERMINAL NAME.
- *
- * 4. ENTRY CONDITIONS
- * MSG IN BUFFER, EITHER ERR/LGL/SM, SUPERVISORY, OR DATA MSG.
- * TABLE HAS ENTRY FOR CONNECTED TERMINAL.
- *
- * 5. EXIT CONDITIONS
- * GOTO NEXT, FOR NEXT INPUT.
- *
- * 6. COMONDECKS CALLED: NONE
- *
- * 7. PROCEDURES/FUNCTIONS CALLED
- * XCHD, HEX TO DISPLAY CONVERSION
- * XCDD, OCTAL TO DECIMAL TO DISPLAY CONVERSION
- * MESSAGE, TO OUTPUT DAYFILE MSG
- *
- * 8. DAYFILE/DIAGNOSTIC MESSAGES
- * (SEE ABOVE, 2 THRU 7)
- #
- *ENDIF
- IF PFC EQ ERR THEN
- BEGIN
- BUC[10] = "TVF ERC=NN";
- TEMP = XCDD(RC);
- C<8,2> BUC[10] = C<8,2> TEMP;
- ABHWORD = BUF[1];
- BUF[0] = BUF[2];
- END
- ELSE BUC[10] = "TVF ERRMSG";
- BUC[11] = ", ABT=NN, ";
- BUC[12] = "ADR=NNNN, ";
- BUC[13] = "TEXT=NNNN ";
- TEMP = XCDD(ABHABT);
- C<6,2> BUC[11] = C<8,2> TEMP;
- TEMP = XCDD(ABHADR);
- C<4,4> BUC[12] = C<6,4> TEMP;
- IF ABHACT EQ 1 OR ABHACT EQ 2 OR ABHACT EQ 3 THEN
- BEGIN
- TEMP = XCHD(PFCSFC);
- C<5,4> BUC[13] = C<6,4> TEMP;
- END
- ELSE C<5,4> BUC[13] = C<0,4> BUC[0];
- IF ACN NQ 0 AND ACN LQ TERMCOUNT AND TPFCSFC[ACN] NQ 0 THEN
- BEGIN
- BUC[14] = ",TERMINAL =";
- C<0,7> BUC[15] = C<0,7> TNAME[ACN];
- B<42,18> BUF[15] = 0;
- BUF[16] = 0;
- END
- ELSE BUF[14] = 0;
- MESSAGE (BUFFOUT,DFOPTION);
- IF TPFCSFC [ABHADR] EQ FCINIT THEN CLEANUP;
- ELSE GOTO NEXT;
- END
- CONTROL EJECT;
- PROC SMTREE;
- BEGIN
- *IF,DEF,IMS
- #
- *1DC SMTREE
- *
- * 1. PROC NAME AUTHOR DATE
- * SMTREE P.WARBURTON 77/05/16
- *
- * 2. FUNCTIONAL DESCRIPTION
- * ANALYZE SUPERVISORY MESSAGE AND DO APPROPRIATE ACTION (REPLY
- * UPDATE TABLE, MSG TO TERMINAL, OR GOTO ERRMSG TO PROCESS
- * ERROR)
- *
- * 3. METHOD USED
- * DECISION TREE TESTS SM IN AN ORDERLY SEQUENCE BY TABLE
- * VALUES:
- * -TABLE ENTRY CLEAR, LOOKING FOR CON/REQ/SM
- * -TABLE ENTRY HAS CONREQ, LOOKING FOR FC/INIT/SM
- * -TABLE ENTRY HAS FCINIT, LOOKING FOR LEGAL SM
- * -TABLE ENTRY HAS CONEND, LOOKING FOR CON/END/N
- * IF NOT LEGAL, GOTO ERRMSG TO PROCESS ERROR.
- *
- * 4. ENTRY CONDITIONS
- * MSG IN BUFFER, HEADER IN ABH
- * TABLE HAS ENTRY FOR TERMINALS
- *
- * 5. EXIT CONDITIONS
- * GOTO NEXT, IF MSG PROCESSED OR DELIBERATELY IGNORED.
- * ENDTEST, IF ENDTEST CONDITION DETECTED.
- * ERRMSG, IF FALLTHRU DECISION TREE, MSG IN BUFFER FOR ERRMSG.
- * ENDCON, TO END A CONNECTION.
- * LOFFMSG, AFTER SENDING BANNER.
- * TABLE ENTRY UPDATED.
- *
- * 6. COMMON DECKS CALLED
- * NONE
- *
- * 7. PROCEDURES/FUNCTIONS CALLED
- * GOTO NEXT - CONTROL PASSES BACK TO MAINLOOP
- * NETPUT - MSG TO TERMINAL
- * ENDTEST - EXIT TO PROC ENDTEST
- * ERRMSG - EXIT TO PROC ERRMSG
- * ENDCON - EXIT TO END A CONNECTION
- * LOFFMSG - AFTER SENDING A BANNER
- * DATE - FOR BANNER DISPLAY TO TERMINAL
- * CLOCK - BANNER
- * XCDD - BANNER, OCTAL TO DECIMAL TO DISPLAY CODE
- *
- * 8. DAYFILE MSG
- * NONE - EXIT TO ERRMSG TO PROCESS ERROR
- *
- #
- *ENDIF
- IF TPFCSFC[ACN] EQ 0 AND PFCSFC EQ CONREQ THEN
- BEGIN
- IF COND EQ 0 # ALLOW CONSOLE DEVICE CONNECTION ONLY #
- THEN
- BEGIN
- TWORD0[ACN] = BUF[0];
- TWORD1[ACN] = BUF[1];
- TTST[ACN] = 0;
- TFLAG[ACN] = 0;
- RB = TRUE;
- CONACT = 2;
- CONALN = 0;
- END
- ELSE EB = TRUE;
- ABHTLC = 1;
- NETPUT (ABH,BUFFER);
- GOTO NEXT;
- END
- IF TPFCSFC[ACN] EQ CONREQ AND PFCSFC EQ CONCB THEN ENDCON;
- IF TPFCSFC[ACN] EQ CONREQ AND PFCSFC EQ FCINIT THEN
- BEGIN
- TPFCSFC[ACN] = PFCSFC; # FC/INIT/N #
- RB = TRUE;
- NETPUT (ABH,BUFFER);
- DATE (TEMP); #NOW CONSTRUCT BANNER #
- BUC[10] = TEMP;
- CLOCK (TEMP);
- BUC[11] = TEMP;
- BUF[12] = 0;
- BUC[13] = "TVF ";
- B<18,42>BUF[13] = 0;
- BUC[14] = "TERMINAL N";
- BUC[15] = "AME = ";
- C<6,4> BUC[15] = C<0,4>TNAME[ACN];
- C<0,3> BUC[16] = C<4,3>TNAME[ACN];
- B<18,42>BUF[16]= 0;
- BUC[17] = "TERMINAL C";
- BUC[18] = "LASS=NN/MO";
- TEMP = XCDD(TTC[ACN]);
- C<5,2> BUC[18] = C<8,2>TEMP;
- BUC[19] = "DEL XXXXXX";
- C<4,6> BUC[19] = MODEL[TTC[ACN]];
- BUC[20] = C<6,4>MODEL[TTC[ACN]];
- B<24,36>BUF[20] = 0;
- BUC[21] = "LINE WIDTH";
- BUC[22] = " = XXX ";
- TEMP = XCDD(TPW[ACN]);
- C<3,3> BUC[22] = C<7,3>TEMP;
- B<36,24>BUF[22] = 0;
- BUC[23] = "PAGE LENGTH";
- BUC[24] = "H = XXX ";
- B<42,18>BUF[24] = 0;
- TEMP = XCDD(TPL[ACN]);
- C<4,3> BUC[24] = C<7,3>TEMP;
- BUF[25] = 0;
- C<00,10> BUC[26] = C<00,10> NAMVER;
- C<00,03> BUC[27] = C<10,03> NAMVER;
- C<3,05> BUC[27] = NAMLV;
- B<48,12> BUF[27] = 0;
- BUF[28] = PROMPT;
- ABHABT = 2;
- ABHADR = ACN;
- ABHACT = 4;
- ABHNFE = 1;
- ABHTLC = 190;
- NETPUT (ABH,BUFFOUT);
- LOFFMSG;
- END
- IF TPFCSFC[ACN] EQ FCINIT THEN
- BEGIN
- IF PFCSFC EQ CONCB OR PFCSFC EQ FCSTP OR PFCSFC EQ FCNAK
- THEN ENDCON;
- IF PFCSFC EQ INTRUSR
- AND (INTRCHR EQ RIR"UB1"
- OR INTRCHR EQ RIR"UB2")
- THEN # USER BREAK 1 OR 2 OCCURRED #
- BEGIN
- ABHWORD = 0;
- ABHABT = 3;
- ABHACT = ACINTR;
- ABHTLC = LINTR;
- SPMSG0 = 0;
- PFCSFC = INTRRSP;
- INTRACN = ACN;
- NETPUT(ABH,BUFFER); # SEND INTR/RSP #
- ABHWORD = 0;
- ABHABT = 3;
- ABHADR = ACN;
- ABHACT = 2;
- ABHTLC = LROMARK;
- SPMSG0 = 0;
- PFCSFC = ROMARK;
- NETPUT(ABH,BUFFER); # SEND SYN CMD RO/MARK #
- ENDTEST;
- END
- IF PFCSFC EQ TCHTCH THEN
- BEGIN
- TPW[ACN] = TCHPW;
- TPL[ACN] = TCHPL;
- GOTO NEXT;
- END
- IF PFCSFC EQ FCACK AND TFLAG2[ACN] EQ 1 THEN ENDTEST;
- IF PFCSFC EQ FCACK THEN
- BEGIN
- TFLAG[ACN] = 0;
- PFCSFC = LSTON;
- NETPUT (ABH,BUFFER);
- GOTO NEXT;
- END
- IF PFCSFC EQ FCINA THEN GOTO NEXT;
- END
- IF TPFCSFC[ACN] EQ CONEND THEN
- IF PFC EQ CON AND SFC EQ ENDD AND RB THEN
- BEGIN
- TWORD0[ACN] = 0;
- TWORD1[ACN] = 0;
- GOTO NEXT;
- END
- ELSE GOTO NEXT;
- ERMMSG;
- END
- CONTROL EJECT;
- PROC ENDCON;
- BEGIN
- *IF,DEF,IMS
- #
- *1DC ENDCON
- * 1. PROC NAME AUTHOR DATE
- * ENDCON P.WARBURTON 77/06/01
- *
- * 2. FUNCTIONAL DESCRIPTION
- * ISSUES CON/END/SM WHEN CALLED
- *
- * 3. METHOD USED
- * FORMATS HEADER AND SM
- *
- * 4. ENTRY CONDITIONS
- * LOC "ACN" CONTAINS ACN
- *
- * 5. EXIT CONDITIONS
- * NONE - EXITS TO MAINLOOP
- *
- * 6. COMMON DECKS CALLED
- * NONE
- *
- * 7. PROCEDURES CALLED
- * NETPUT
- *
- * 8. DAYFILE MSG
- * NONE
- *
- #
- *ENDIF
- ABHABT = 3;
- ABHADR = 0;
- ABHACT = 1;
- ABHTLC = 2;
- PFCSFC = CONEND;
- CONACN = ACN;
- RC = 0;
- BUF[1] = 0;
- TPFCSFC[ACN] = CONEND;
- NETPUT (ABH,BUFFER);
- GOTO NEXT;
- END
- CONTROL EJECT;
- PROC TERMSG;
- BEGIN
- *IF,DEF,IMS
- #
- *1DC TERMSG
- *
- * 1. PROC NAME AUTHOR DATE
- * TERMSG P.WARBURTON 77/05/16
- *
- * 2. FUNCTIONAL DESCRIPTION
- * ANALYZE INPUT DATA MSG TO DETERMINE APPROPRIATE OUTPUT,
- * GENERATE OUTPUT, PASS CONTROL TO MAINLOOP (GOTO NEXT) OR
- * CALL PROCEDURE TO PROCESS NEXT OUTPUT STEP
- *
- * 3. METHOD USED
- * DECISION TREE TESTS INPUT MSG IN AN ORDERLY SEQUENCE BY
- * TABLE:
- * -TTST[ADR] EQ 0, LOOK FOR VARIOUS TVF COMMANDS - IF FALLTHRU,
- * ISSUE UNREG ENTRY MSG
- * -TTST[ADR] EQ 1, PROCESS INPUT FOR TEST 1
- * -TTST[ADR] EQ 2 OR 3, SET UP FOR CALL TO PROC GENDATA
- * -TTST[ADR] EQ OTHER, SET TEST = 0, SEND "TVF READY" MSG
- *
- * 4. ENTRY CONDITIONS
- * DATA MSG IN BUFFER, HEADER IN ABH
- * TABLE ENTRIES FOR CONNECTED TERMINALS
- *
- * 5. EXIT CONDITIONS
- * GOTO NEXT, IF MSG PROCESSED
- * GENDATA, IF READY TO GENERATE DATA FOR TEST 2 AND 3
- * ERRMSG, IF ADR FOR TERMINAL NOT CONNECTED
- * TABLE UPDATED, AND FOR TEST 2 SET TFLAG2
- * ENDTEST, IF TEST 1 "ENDL" MSG
- * LOFFMSG, IF MSG SENT TO TERMINAL
- *
- * 6. COMMON DECKS CALLED
- * NONE
- *
- * 7. PROCEDURES/FUNCTIONS CALLED
- * NETPUT - OUTPUT MSG TO TERMINAL
- * GOTO NEXT - EXIT TO MAINLOOP
- * ERRMSG - EXIT FOR ERROR PROCESSING
- * GENDATA - EXIT TO GENERATE DATA FOR TESTS 2 AND 3,
- * I = NUMBER OF CHAR TO BE GENERATED
- * ENDTEST - EXIT FOR TEST 1 "ENDL" COMMAND
- * LOFFMSG - EXIT AFTER SENDING MESSAGE
- #
- *ENDIF
- IF TPFCSFC[ABHADR] EQ CONEND THEN GOTO NEXT;
- IF TPFCSFC[ABHADR] NQ FCINIT THEN ERMMSG;
- IF ABHBIT EQ 1 THEN
- BEGIN
- BUF [10] = X"4552524F52202D2"; #PARITY ERR MSG TO TERMINAL #
- BUF [11] = X"050415249545920";
- BUF [12] = 0;
- BUF [13] = 0;
- K = ABHTLC*8;
- IF K GR 40 THEN K = 40;
- FOR J = 0 STEP 8 WHILE J LQ K DO
- B<J,8> BUF[12] = B<J,8> BUF[0];
- ABHABT = 2;
- BUF[14] = X"1F2E2E1F0000000";
- ABHNFE = 1;
- ABHBIT = 0;
- ABHTLC = 34;
- NETPUT (ABH,BUFFOUT);
- TTST[ABHADR] = 0;
- LOFFMSG;
- END
- IF TTST[ABHADR] EQ 0 THEN
- BEGIN
- IF ABHTLC EQ 4 AND
- B<0,32>BUF[0] EQ X"48454C50" OR #TEST FOR HELP COMMAND #
- ABHTLC EQ 4 AND
- B<0,32>BUF[0] EQ X"68656C70" THEN
- BEGIN
- ABHABT = 2;
- ABHACT = 4;
- ABHNFE = 1;
- ABHTLC = 90;
- NETPUT (ABH,COMLIST);
- LOFFMSG;
- END
- IF ABHTLC EQ 4 AND
- B<0,32>BUF[0] EQ X"54455354" OR #TEST FOR TESTLIST COMMAND#
- ABHTLC EQ 4 AND
- B<0,32>BUF[0] EQ X"74657374" THEN
- BEGIN
- ABHABT = 2;
- ABHACT = 4;
- ABHNFE = 1;
- ABHTLC = 110;
- NETPUT (ABH,TESTLIST);
- LOFFMSG;
- END
- IF ABHTLC EQ 3 AND
- B<0,24>BUF[0] EQ X"454E44" OR #TEST FOR END #
- ABHTLC EQ 3 AND
- B<0,24>BUF[0] EQ X"656E64" THEN ENDCON;
- IF ABHTLC EQ 1 AND PFC EQ X"31" THEN
- BEGIN
- BUC[10] = "LOOPBACK T";
- BUC[11] = "EST BEGINS";
- TTST[ACN] = 1;
- END
- IF ABHTLC EQ 1 AND PFC EQ X"32" THEN
- BEGIN
- BUC[10] = "LINETEST B";
- BUC[11] = "EGINS ";
- B<30,30>BUF[11] =0;
- TTST[ACN] = 2;
- END
- IF ABHTLC EQ 1 AND PFC EQ X"33" THEN
- BEGIN
- BUC[10] = "SCREEN TES";
- BUC[11] = "T BEGINS ";
- B<48,12>BUF[11] = 0;
- TTST[ACN] = 3;
- END
- IF TTST[ACN] NQ 0 THEN
- BEGIN
- BUF[12] =0;
- BUF[13] = PROMPT[0];
- ABHABT = 2;
- ABHACT = 4;
- ABHNFE = 1;
- ABHTLC = 40;
- NETPUT (ABH,BUFFOUT);
- LOFFMSG;
- END
- BUF [10] = X"4552524F52202D2"; #MSG TO TERMINAL #
- BUF [11] = X"0454E5452592020"; #UNRECOGNIZED ENTRY #
- BUF [12] = 0;
- BUF [13] = 0;
- K = ABHTLC*8;
- IF K GR 40 THEN K = 40;
- FOR J = 0 STEP 8 WHILE J LQ K DO
- B<J,8> BUF[12] = B<J,8> BUF[0];
- BUF [14] = X"1F2E2E1F0000000";
- ABHACT = 2;
- ABHABT = 2;
- ABHNFE = 1;
- ABHTLC = 34;
- NETPUT (ABH,BUFFOUT);
- TTST[ABHADR] = 0;
- LOFFMSG;
- END
- IF TTST[ABHADR] EQ 1 THEN
- BEGIN
- IF ABHTLC EQ 4 AND B<0,32> BUF[0] EQ X"454E444C" OR
- ABHTLC EQ 4 AND B<0,32>BUF[0] EQ X"656E646C" THEN ENDTEST;
- ABHNFE = 1;
- I = ABHTLC;
- COMPUTEUS;
- IF ABHABT EQ 2
- THEN
- BEGIN
- I = ABHTLC;
- COMPUTEUS; # SECOND UNIT SEPARATOR FOR ASYCH TERMINAL #
- END
- NETPUT (ABH,BUFFER);
- LOFFMSG;
- END
- IF TTST[ABHADR] EQ 2 THEN
- BEGIN
- TFLAG2[ACN] = 1;
- I = TPW[ABHADR];
- IF I EQ 0 THEN ENDTEST;
- ABHABT = 1;
- ABHNFE = 1;
- GENDATA;
- END
- IF TTST[ABHADR] EQ 3 THEN
- BEGIN
- I = TPW[ACN]*(TPL[ACN]-1);
- IF I LS 96 THEN I =96;
- IF I GR 2000 THEN I = 2000;
- ABHABT = 2;
- ABHNFE = 0;
- GENDATA;
- END
- CLEANUP;
- END
- CONTROL EJECT;
- PROC COMPUTEUS; # COMPUTE AND POSITION <US>, INCREMENT ABHTLC #
- BEGIN # I = COUNT OF ASCI CHARACTERS #
- J = (I/15)*2; # COMPUTE WD ADR OF LAST WD PAIR OF ASCI CHAR #
- K = I-(15*(I/15));# COMPUTE NUMBER OF CHAR IN LAST WORD PAIR #
- IF K LS 7 THEN
- BEGIN
- K=K*8;
- B<K,8>BUF[J] = X"1F";
- END
- IF K EQ 7 THEN
- BEGIN
- B<56,4>BUF[J] = X"1";
- B<0,4> BUF[J+1] = X"F";
- END
- ELSE
- BEGIN
- K =((K-8)*8)+4;
- B<K,8> BUF[J+1] = X"1F";
- END
- ABHTLC = I + 1;
- END
- CONTROL EJECT;
- PROC CLEANUP;
- BEGIN
- ABHABT = 2;
- ABHACT = 4;
- ABHTLC = 30;
- TTST[ABHADR] = 0;
- NETPUT(ABH,TVFERR);
- LOFFMSG;
- END
- CONTROL EJECT;
- PROC GENDATA;
- BEGIN
- *IF,DEF,IMS
- #
- *1DC GENDATA
- *
- * 1. PROC NAME AUTHOR DATE
- * GENDATA P.WARBURTON 77/05/16
- *
- * 2. FUNCTIONAL DESCRIPTION
- * FOR TESTS 2 AND 3, TVF USER MAY RETURN A CHARACTER TO BE USED
- * IN THE LINE OR SCREEN TESTS, OR A NULL INPUT, IN WHICH CASE
- * TVF GENERATES OUTPUT FROM THE 95 CHAR ASCII SUBSET.
- *
- * 3. METHOD USED
- * IF NULL INPUT, 14 WORDS (110 ASCII CHARACTERS) ARE MOVED FROM
- * THE ARRAY "ASCII" TO THE BUFFER REPEATEDLY UNTIL BUFFER
- * CONTAINS MORE THAN ENOUGH CHARACTERS FOR LINE OR SCREEN
- * OUTPUT. IF CHAR INPUT, CHAR IS PACKED IN WORD PAIR (15
- * CHARACTERS) AND THE BUFFER FILLED WITH ENOUGH WORD PAIRS
- * FOR OUTPUT. FOR TEST 3, FIRST WORD PAIR CONTAINS A FORMAT
- * EFFECTOR TO CLEAR SCREEN: FE IS FIRST CHAR, REST IS NULL
- * FILLED. FOR TEST 2, FIRST WORD PAIR IS NULL FILLED.
- *
- * 4. ENTRY CONDITIONS
- * ITEM I CONTAINS NUMBER OF CHAR TO BE GENERATED.
- * BUFFER CONTAINS INPUT MSG, IF ANY.
- * ABH CONTAINS HEADER, TLC=0 FOR NULL INPUT.
- * TABLE CONTAINS ENTRY FOR TERMINAL.
- *
- * 5. EXIT CONDITIONS
- * EXIT TO LOFFMSG.
- *
- * 6. COMMON DECKS CALLED
- * NONE
- *
- * 7. PROCEDURES/FUNCTIONS CALLED
- * LOFFMSG - EXIT AFTER SENDING MESSAGE.
- * NETPUT - OUTPUT MSG TO TERMINAL.
- *
- * 8. DAYFILE MSG
- * NONE
- *
- #
- *ENDIF
- IF ABHTLC EQ 0 THEN
- BEGIN
- FOR J = 0 STEP 14 WHILE (J*15) LS (I*2) DO
- FOR K = 0 STEP 1 UNTIL 13 DO
- BUF[J+K] = ASCII[K];
- END
- ELSE
- BEGIN
- FOR J = 8 STEP 8 WHILE J LS 56 DO
- B<J,8> BUF [0] = PFC;
- B<56,4> BUF [0] = B<0,4> PFC;
- B<0,4> BUF [1] = B<4,4> PFC;
- FOR J = 4 STEP 8 WHILE J LS 60 DO
- B<J,8> BUF [1] = PFC;
- FOR J = 2 STEP 2 WHILE (J/2) LS ((I+15)/15) DO
- BEGIN
- BUF [J] = BUF [0];
- BUF [J+1] = BUF [1];
- END
- END
- IF TTST[ACN] EQ 3 THEN
- BEGIN
- PFC = X"31";
- TTST[ACN] = 0;
- END
- COMPUTEUS;
- NETPUT (ABH,BUFFER);
- LOFFMSG;
- END
- CONTROL EJECT;
- PROC ENDTEST; # TEST 1, 2 COMPLETE #
- BEGIN
- *IF,DEF,IMS
- #
- *1DC ENDTEST
- *
- * 1. PROC NAME AUTHOR DATE
- * ENDTEST P.WARBURTON 77/05/16
- *
- * 2. FUNCTIONAL DESCRIPTION
- * SEND TO TERMINAL "TEST COMPLETE" MSG.
- * -CALLED FROM PROC GENDATA.
- * -CALLED FROM PROC SMTREE WHEN FC/ACK/SM RECEIVED.
- * -CALLED FROM PROC TERMSG DN TEST 1 "ENDL" COMMAND.
- *
- * 3. METHOD USED
- * FORMAT MSG, NETPUT IT, AND CLEAR TEST AND TFLAG.
- *
- * 4. ENTRY CONDITIONS
- * ABHABT SET FOR DATA MSG
- * ABHADR SET FOR ACN
- * TFLAG2 SET (FOR TEST 2 ONLY)
- *
- *
- * 5. EXIT CONDITIONS
- * EXIT TO LOFFMSG.
- *
- * 6. COMMON DECKS CALLED
- * NONE
- *
- * 7. PROCEDURES/FUNCTIONS CALLED
- * NETPUT - SEND MSG TO TERMINAL
- * LOFFMSG - EXIT AFTER SENDING MESSAGE.
- *
- * 8. DAYFILE MSG
- * NONE
- #
- *ENDIF
- ABHABT = 2;
- ABHADR = ACN;
- ABHACT = 4;
- ABHNFE = 1;
- ABHTLC = 30;
- NETPUT(ABH,TESTCOM);
- TTST[ABHADR] = 0;
- TFLAG2[ACN] =0;
- LOFFMSG;
- END
- CONTROL EJECT;
- PROC LOFFMSG;
- BEGIN
- *IF,DEF,IMS
- #
- *1DC LOFFMSG
- * 1. PROC NAME AUTHOR DATE
- * LOFFMSG P.WARBURTON 77/06/01
- *
- * 2. FUNCTIONAL DESCRIPTION
- * ISSUES LST/OFF/SM WHEN CALLED
- *
- * 3. METHOD USED
- * FORMATS HEADER AND SM
- *
- * 4. ENTRY CONDITIONS
- * ACN IS IN LOC "ACN"
- *
- * 5. EXIT CONDITIONS
- * NONE - EXITS TO MAINLOOP
- *
- * 6. COMMON DECKS CALLED
- * NONE
- *
- * 7. PROCEDURES CALLED
- * NETPUT
- *
- * 8. DAYFILE MSG
- * NONE
- *
- #
- *ENDIF
- PFCSFC = LSTOFF;
- LSTACN = ACN;
- ABHABT = 3;
- ABHADR = 0;
- ABHACT = 1;
- ABHTLC = 1;
- NETPUT (ABH,BUFFER);
- TFLAG[ACN] = 1;
- GOTO NEXT;
- END
- END #END OF TVF PROG #
- TERM
cdc/nos2.source/nam5871/tvf.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator