User Tools

Site Tools


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
  1. *DECK TVF
  2. PRGM TVF1;
  3. BEGIN
  4. # COPYRIGHT CONTROL DATA SYSTEMS INC. 1994. #
  5. *IF,DEF,IMS
  6. #
  7.  * TVF (TERMINAL VERIFICATION FACILITY) PAGE 1
  8.  * IMS (INTERNAL MAINTENANCE SPECIFICATION) DATE.
  9.  #
  10. #
  11. *1DC TVF IMS
  12. *
  13. * PROG NAME AUTHOR DATE
  14. * TVF P. WARBURTON 77/05/16
  15. *
  16. *
  17. * CONTENTS
  18. *
  19. * 1. INTERFACES
  20. * 2. DATA ARRAYS
  21. *
  22. * 3. DESIGN APPROACH
  23. *
  24. * 4. PROGRAM STRUCTURE
  25. *
  26. * 1.0 INTERFACES
  27. * INTERFACES ARE DESCRIBED AS TVF RESPONSE TO INPUT.
  28. *
  29. * FOR AN OVERVIEW OF THE USER INTERFACE, SEE THE NAM ERS
  30. * APPENDIX E OR NAM REFERENCE MANUAL. FOR EXPLANATION OF
  31. * TABLE FLAGS, SEE SECTION 2.0 BELOW.
  32. *
  33. * 1.1 USER (TERMINAL OPERATION) INTERFACE
  34. *
  35. * 1.1.1 BANNER - RESPONSE TO FC/INIT/SM
  36. *
  37. *
  38. * 1.1.2 TESTLIST - RESPONSE TO COMMAND "TEST"
  39. *
  40. * 1.1.3 COMLIST - RESPONSE TO COMMAND "HELP"
  41. *
  42. * 1.1.4 LOOPBACK TEST MSG-S
  43. * (A) BEGIN - RESPONSE TO COMMAND "1"
  44. * (B) MSG - RESPONSE TO USER INPUT FOR TEST = 1
  45. * (C) COMPLETE - RESPONSE TO COMMAND "ENDL" FOR TEST = 1
  46. *
  47. * 1.1.5 LINE TEST MSG-S
  48. * (A) BEGIN - RESPONSE TO COMMAND "2"
  49. * (B) MSG - RESPONSE TO USER INPUT FOR TEST = 2
  50. * (C) COMPLETE - SEND FOLLOWING MSG
  51. *
  52. * 1.1.6 SCREEN TEST MSG-S
  53. * (A) BEGIN - RESPONSE TO COMMAND "3"
  54. * (B) MSG - RESPONSE TO USER INPUT FOR TEST = 3
  55. * (C) (THERE IS NO COMPLETE MSG FOR SCREEN TEST)
  56. *
  57. * 1.1.7 AUTO-END - RESPONSE TO SHUT/INDS/SM WITH SHUTF = 1
  58. *
  59. * 1.1.8 UNRECOGNIZED - RESPONSE TO UNIDENTIFIABLE COMMAND
  60. *
  61. * 1.1.9 PARITY - RESPONSE TO INPUT MSG WITH PARITY ERROR FLAG
  62. *
  63. * 1.1.10READY - SEND WHEN TVF CLEARS INTERNAL TTST FLAG
  64. *
  65. * 1.2 DAYFILE MSG-S
  66. *
  67. * 1.2.1 NETON ATTEMPT - RESPONSE WHEN TVF CALLED
  68. *
  69. * 1.2.2 NETON SUCCESSFUL - RESPONSE WHEN NETON ACCEPTED
  70. *
  71. * 1.2.3 TVF ERC -RESPONSE TO ERR/LGL/SM
  72. *
  73. * 1.2.4 TVF ERRMSG -RESPONSE TO SM OR TERM DATA MSG TVF
  74. * CANNOT PROCESS
  75. * -PFCSFC NOT APPROPRIATE FOR TVF
  76. * -PFCSFC OUT-OF-SEQUENCE FOR NAM PROTOCOL
  77. * -ABT OUT-OF-RANGE
  78. * -ADR OUT-OF-RANGE
  79. *
  80. * 1.3 TVF CALLS TO NAM
  81. * -NETON
  82. * -NETWAIT
  83. * -NETGETL
  84. * -NETPUT
  85. * -NETOFF
  86. *
  87. * 1.4 TVF-TO-NAM SUPERVISORY MSG-S
  88. *
  89. * 1.4.1 CON/REQ/N-RESPONSE TO CON/REQ/SM
  90. *
  91. * 1.4.2 CON/REQ/A-RESPONSE TO CON/REQ/SM IF ACN OUT-OF-RANGE,
  92. * OR IF DEVICE TYPE NOT CONSOLE
  93. * OR IF FROM APPLICATION
  94. *
  95. * 1.4.3 FC/INIT/N-RESPONSE TO FC/INIT/SM
  96. *
  97. * 1.4.4 CON/END/SM-RESPONSE TO USER COMMAND"END",
  98. * TO CON/CB/SM, TO FC/STP/SM, TO FC/NAK/SM,
  99. * TO SHUT/INSD/SM SHUTF = 1
  100. *
  101. * 1.4.5 FC/RST/SM-RESPONSE TO FC/BRK/SM, TO FC/STP/SM
  102. *
  103. * 1.4.6 LST/OFF/SM - SENT FOLLOWING MESSAGE TO TERMINAL
  104. *
  105. * 1.4.7 LST/ON/SM - RESPONSE TO FC/ACK/SM
  106. *
  107. * 1.5 TABLE UPDATES
  108. *
  109. * 1.5.1 CLEAR TABLE -RESPONSE TO NETON SUCCESSFUL
  110. *
  111. * 1.5.2 SET WORD0,WORD1 -RESPONSE TO CON/REQ/SM IS TO SET
  112. * (PER TERMINAL) WORD0,WORD1 = CON/REQ WORD1,
  113. * -SET TEST=0,TFLAG=0
  114. *
  115. * 1.5.3 TTST=N -RESPONSE TO USER COMMAND "N"
  116. *
  117. * 1.5.4 TTST=0 -WHEN TEST "COMPLETE" SENT
  118. *
  119. * 1.5.5 TFLAG=1 -WHEN DATA MSG SENT
  120. *
  121. * 1.5.6 TFLAG=0 -WHEN FC/ACK/SM RECEIVED
  122. *
  123. * 1.5.7 CLEAR TABLE -RESPONSE TO CON/END/N
  124. * ENTRY
  125. *
  126. * 1.5.8 TPFCSFC=FCINIT -RESPONSE TO FC/INIT/SM
  127. *
  128. * 1.5.9 TPFCSFC=CONEND -WHEN CONEND SENT
  129. *
  130. * 1.5.10 SET PW,PL -RESPONSE TO TCH/TCHAR/SM
  131. *
  132. * 1.5.1.11 SET FLAG2 RESPONSE IN TEST 2 WHEN LINE SENT
  133. *
  134. * 1.6 SYSTEM MACREL CALLS
  135. * -DATE (FOR BANNER)
  136. * -CLOCK (FOR BANNER)
  137. * -XCOD (CONVERT OCTAL-TO-DISPLAY)
  138. * -XCDD (CONVERT OCTAL-TO-DECIMAL-TO-DISPLAY)
  139. * -XCHD (CONVERT HEX-TO-DISPLAY
  140. * -MESSAGE (FOR OUTPUT DAYFILE MSG-S)
  141. *
  142. * 2.0 DATA STRUCTURE: ARRAYS.
  143. *
  144. * 2.1 ABH - APPLICATION BLOCK HEADER - LENGTH: 1 WORD.
  145. * HOLDS THE HEADER FOR CALLS TO/FROM NAM.
  146. *
  147. * 2.2 BUFFER - LENGTH: BUFFERSIZE = 280 WORDS.
  148. * HOLDS INPUT/OUTPUT FOR NAM CALLS, DAYFILE
  149. * MESSAGES AND TERMINAL MESSAGES.
  150. *
  151. * 2.3 TABLE - LENGTH: TERMCOUNT (=20) * 2 WORDS.
  152. * HOLDS DATA FOR EACH TERMINAL CONNECTED.
  153. * - FORMAT SAME AS WORDS 0 AND 1 OF CON/REQ/SM
  154. * - UNUSED BIT FIELDS OF CON/REQ/SM USED AS FLAGS
  155. * - TTST INDICATES WHICH TVF TEST IN EXECUTION
  156. * - TFLAG INDICATES A CURRENT TEST WILL CONTINUE
  157. * WHEN CURRENT OUTPUT BLOCK IS ACK (FC/ACK/SM)
  158. *
  159. * 2.4 BANNER - LENGTH: 15 WORDS.
  160. * HOLDS BANNER FORMAT
  161. *
  162. * 2.5 MODELS - LENGTH: 15 WORDS.
  163. * HOLDS MODEL NUMBERS FOR TERMINAL DEVICE TYPES
  164. * (USED BY BANNER)
  165. *
  166. * 2.6 ASCII - LENGTH: 14 WORDS
  167. * HOLDS ASCII 95 CHARACTER SUBSET, DIGITS 0-9 REPEATED
  168. * TO FILL 105 8-BIT CHARACTER IN 14 WORDS (PACKED
  169. * 7.5 CHARACTERS PER WORD)
  170. *
  171. * 2.7 COMLIST - TVF COMMAND LIST - LENGTH: 4 WORDS
  172. * HOLDS TVF COMMANDS, RESPONSE TO HELP COMMAND
  173. *
  174. * 2.8 TESTLIST - TVL TEST LIST - LENGTH: 10 WORDS
  175. * HOLDS DISPLAY TESTLIST, RESPONSE TO TEST COMMAND
  176. *
  177. * 3.0 DESIGN APPROACH AND CONVENTIONS
  178. * -TVF CONSISTS OF A MAINLOOP AND CALLED PROCEDURES.
  179. * -THE MAINLOOP DOES NETON AND NETGETL.
  180. * -NO OTHER PROCEDURE READS DATA FROM NAM (NETGETL).
  181. * -CALLED PROCEDURES FORMAT TERMINAL AND DAYFILE
  182. * MESSAGE RESPONSES TO INPUT MESSAGES.
  183. * -AS PROCESSING PROCEEDS, ONE PROCEDURE MAY CALL ANOTHER.
  184. * -BUT NO PROCEDURE IS USED AS A RETURN JUMP, I.E., NO
  185. * PROCEDURE RETURNS CONTROL TO ITS CALLER.
  186. * -PROCESSING OF AN INPUT TERMINATES WITH A GOTO
  187. * NEXT, WHICH RETURNS CONTROL TO MAINLOOP NETGET CALL.
  188. * -IF NETON FAILS, CHECK STATUS BIT TO DETERMINE IF
  189. * SHOULD LOOP ON NETON CALL, OR SIMPLY ABORT TVF.
  190. * -IF NETGETL FINDS NO INPUT (ABT=0), NETWAIT IS
  191. * ENTERED.
  192. * -THERE IS NO PARAMETER PASSING BETWEEN PROCEDURES,
  193. * SINCE DATA NEEDED BY A CALLED PROCEDURE IS HELD
  194. * IN EITHER:
  195. * (A) TABLE ARRAY - STATUS OF CONNECTED TERMINAL
  196. * (B) BUFFER - INPUT SM OR TERMINAL MSG
  197. * -RESPONSES TO INCOMING SM (OUTPUT SM, DF MSG) AND
  198. * FIRST RESPONSE TO TERMINAL COMMANDS ARE GENERATED
  199. * IMMEDIATELY FOLLOWING IF-CONDITIONAL IDENTIFYING
  200. * SM
  201. * -FOR A TVF TEST, THERE ARE THREE RESPONSES
  202. * (A) TEST BEGIN MSG
  203. * (B) TEST MSG
  204. * (C) TEST COMPLETE MSG
  205. * -TEST BEGIN RESPONSE IS GENERATED IMMEDIATELY, BUT
  206. * (B) AND (C) MAY BE GENERATED SEPARATELY, DEPENDING
  207. * UPON THE COMPLEXITY OF THE TEST.
  208. * -NETPUT CALLS ARE SPREAD THRU CODE, OTHER NAM CALLS
  209. * (NETON,NETWAIT,NETGETL,NETOFF) OCCUR AT ONLY ONE
  210. * PLACE IN CODE.
  211. * -TFLAG SET/CLEARED SO THAT WHEN SHUTDOWN OCCURS, MAY
  212. * HAVE TO WAIT FOR FC/ACK/SM BEFORE SENDING AUTO
  213. * END MESSAGE
  214. * -ONLY ONE MSG AT A TIME IS SENT TO A TERMINAL.
  215. * LIST OFF IS SENT FOLLOWING THE MSG.
  216. * LIST ON IS SENT WHEN FC/ACK/SM IS RECEIVED.
  217. * THIS AVOIDS POTENTIAL TYPE-AHEAD BY TERMINAL OPERATOR.
  218. *
  219. * 4.0 PROGRAM STRUCTURE
  220. *
  221. * 4.1 MAIN LOOP
  222. * -NETON (INITIALIZE TVF)
  223. * -NETGETL FOR NEXT MSG
  224. * -AFTER EACH MSG IS PROCESSED, CONTROL RETURNS TO THIS
  225. * POINT OF THE MAINLOOP, BY A "GOTO NEXT"
  226. * -NETWAIT, IF NO INPUT AVAILABLE
  227. * -ROUTE SHUT/INSD/SM TO PROC SHUTDOWN
  228. * -ROUTE ALL MSGS TO PROC SHUTDOWND, IF THE SHUTDOWNF FLAG
  229. * IS SET.
  230. * -ROUTE ERR/LGL/SM TO PROC ERRMSG
  231. * -IF ACN (DATA MSG) OR ADR (SM) OUT-OF-RANGE, ROUTE TO
  232. * ERRMSG
  233. * -ROUTE SM TO PROC SMTREE
  234. * -ROUTE DM TO PROC TERMSG
  235. * -ROUTE ANYTHING ELSE TO ERRMSG
  236. * -IF SHUTDOWNF FLAG SET, ROUTE SM AND DM TO SHUTDD
  237. *
  238. * 4.2 SHUTDOWN
  239. * -IF SHUTYPE"1, NETOFF IMMEDIATELY
  240. * -IF SHUTYPE=1, INITIATE SHUTDOWN
  241. * -IF NO CONNECTIONS, NETOFF
  242. * -SET SHUTDOWN = 1
  243. * -SEND AUTO END MSG, IF POSSIBLE
  244. *
  245. * 4.3 SHUTDD
  246. * -IF REDUNDANT SHUTF=1, IGNORE
  247. * -IF TERMINAL DATA INPUT, IGNORE
  248. * -IF FC/INIT/SM AND TFLAG=1, SEND AUTO END, TFLAG=0
  249. * -IF FC/INIT/SM AND TFLAG=0, SEND CON/END/SM
  250. * -IF CON/END/N, CLEAR TABLE ENTRY
  251. * -WHEN ALL TABLE ENTRIES CLEARED, NETOFF
  252. *
  253. * 4.3 ERRMSG
  254. * -FORMAT DAYFILE MSG: "TVF ERRMSG" FOR SPURIOUS SM-S
  255. * "TVF ERC=NN" FOR ERR/LGL/SM
  256. *
  257. * 4.5 SMTREE: PROCESS SUPERVISORY MSG-S
  258. * -PROCESSING CONTROLLED BY ENTRY FOR TERMINAL IN TABLE
  259. * -ENTRY CLEARED: LOOK FOR CON/REQ/SM, NOTHING ELSE
  260. * IF IT COMES, SET TABLE
  261. * -CONREQ: LOOK FOR FC/INIT/SM, NOTHING ELSE
  262. * IF IT COMES, SET FCINIT
  263. * -FCINIT: LOOK FOR VARIOUS MSGS AND RESPOND ACCORDINGLY
  264. * IF A CON/END/SM IS SENT, UPDATE TABLE
  265. * -CONEND: LOOK FOR CON/END/N, IGNORE OTHER MSGS
  266. * IF IT COMES, CALL CONEND
  267. *
  268. * 4.6 ENDCON
  269. * -SEND END/CON/SM
  270. * -EXIT TO MAINLOOP
  271. * -CALLED BY SHUTDD, SMTREE, TERMSG TO END A CONNECTION
  272. *
  273. * 4.7 TERMSG: PROCESS DATA MSGS
  274. * -PROCESSING CONTROLLED BY ITEM "TTST" IN TERM TABLE ENTRY
  275. * -TTST=0: LOOK FOR TVF USER COMMANDS, INCLUDING TEST NUMBER
  276. * -FORMAT APPROPRIATE REPLY
  277. * -FOR TEST NUMBER, UPDATE TEST=N
  278. * -TTST=1: DO LOOPBACK TEST
  279. * -CHECK FOR "ENDL" TO END TEST
  280. * -TTST=2: SET I FOR NUMBER OF CHAR IN LINE,
  281. * CALL GENDATA TO GENERATE OUTPUT
  282. * -TTST=3: SET I FOR NUMBER OF CHAR IN SCREEN,
  283. * CALL GENDATA TO GENERATE OUTPUT
  284. * -TTST"1,2,3: SEND MSG TO TERMINAL, RESET TTST=0
  285. *
  286. * 4.8 GENDATA: GENERATE DATA (USED BY LINE AND SCREEN TESTS)
  287. * -IF USER INPUT, USE IT
  288. * -IF NULL INPUT, USE ASCII CODES
  289. * -EXIT TO LOFFMSG
  290. *
  291. * 4.9 ENDTEST: CALLED TO SEND TEST COMPLETE MSG
  292. * -CALLED BY TERMSG WHEN TEST=1 AND "ENDL" RECEIVED
  293. * -CALLED BY SMTREE TO END TEST 2
  294. * -EXIT TO LOFFMSG
  295. *
  296. * 4.10 LOFFMSG
  297. * -SEND LST/OFF/SM, SET TFLAG = 1.
  298. * -EXIT TO MAINLOOP
  299. * -CALLED BY SMTREE WHEN BANNER SEND
  300. * -CALLED BY TERMSG AND GENDATA WHEN MSG SENT
  301. *
  302. * SEE SECTIONS BELOW FOR PROC DESCRIPTIONS
  303. *
  304.  #
  305. *ENDIF
  306.  
  307. XREF
  308. BEGIN
  309. PROC ABORT;
  310. PROC NETON;
  311. PROC NETOFF;
  312. PROC NETGETL;
  313. PROC NETWAIT;
  314. PROC NETPUT;
  315. PROC MESSAGE;
  316. PROC CLOCK;
  317. PROC RECALL;
  318. PROC TVFRECV ;
  319. PROC DATE;
  320. FUNC XCDD C(10);
  321. FUNC XCHD C(10);
  322. END
  323.  
  324. DEF BUFFERSIZE # 280 #;# I/O BUFFER SIZE #
  325. DEF TERMCOUNT # 20 #;# NUMBER OF TERMINALS #
  326. DEF DFOPTION # 3 #;# OPTION FOR DESTINATION OF DAYFILE MSG-S#
  327. DEF BDOPTION # 1 #;# OPTION FOR DISPLAY MSG AT CONTROL-POINT#
  328. DEF WAIT #4095 #;# NETWAIT TIME LIMIT #
  329. DEF NUMTC # 31#;# NUMBER OF TERMINAL CLASSES #
  330. ITEM I;
  331. ITEM J;
  332. ITEM K;
  333. ITEM TEMP C(10);
  334. ITEM SHUTDOWNF = 0;
  335. ITEM ACN;
  336. ITEM NETFLG I = 0; # FIRST UNSUCCESSFUL NETON FLAG #
  337. ITEM MSGFLG I = 0; # PUT MSG ON DAY-FILE ONCE FLAG #
  338. # COMDECKS: USERDEFS, CONDEF, CTRLDEF, DCDEF, ERRDEF, FCDEF, FILEDEF,#
  339. # LOUTDEF, LSTDEF, MSGDEF, SHUTDEF, TCHDEF, HEADER, #
  340. # USERITMS, SUPMSG, CON, CTRL, DC, ERR, FC, FILE, LOUT, #
  341. # LST, MSG, SHUT, TCH, NAMLEV. #
  342. CONTROL NOLIST;
  343. *CALL USERDEFS
  344.  
  345. ARRAY ABH;
  346. BEGIN
  347. *CALL HEADER
  348. END
  349.  
  350. BASED ARRAY SMESSAGE;
  351. BEGIN
  352. *CALL USERITMS
  353. END
  354.  
  355. *CALL NAMLEV
  356. CONTROL LIST;
  357.  
  358. ARRAY BUFFER [0:BUFFERSIZE] S(1);
  359. BEGIN
  360. ITEM BUF U(0,0,60);
  361. ITEM BUC C(0,0,10);
  362. END
  363.  
  364. ARRAY NSUP[0:0] S(1);
  365. ITEM NSUPN B(0,2,1);
  366.  
  367. BASED ARRAY BUFFOUT;
  368. ITEM BUFMSG U;
  369.  
  370. ARRAY TABLE [1:TERMCOUNT] S(2);
  371. ITEM
  372. TWORD0 U(0,0,60),
  373. TWORD1 U(1,0,60),
  374. TPFCSFC U(0,0,16),
  375. TRC U(0,16,8),
  376. TACN U(0,24,12),
  377. TABL U(0,36,3),
  378. TTST U(0,39,4),
  379. THW U(0,43,1),
  380. TDT U(0,44,3),
  381. TTC U(0,47,5),
  382. TORD U(0,52,8),
  383. TNAME C(1,0,7),
  384. TFLAG U(1,42,1),
  385. TFLAG2 U(1,43,1),
  386. TPW U(1,44,8),
  387. TPL U(1,52,8);
  388.  
  389. ARRAY MODELS [1:NUMTC] S(1);
  390. ITEM MODEL C(0,0,10) =["M33",
  391. "713",
  392. "721",
  393. "2741",
  394. "M40",
  395. "H2000",
  396. "X364",
  397. "T4014X",
  398. "HASP-POST",
  399. "200UT",
  400. "714-30",
  401. "711-10",
  402. "714-10",
  403. "HASP-PRE",
  404. "734",
  405. "2780-BSC",
  406. "3780-BSC",
  407. "3270",
  408. "UNKNOWN",
  409. "UNKNOWN",
  410. "UNKNOWN",
  411. "UNKNOWN",
  412. "UNKNOWN",
  413. "UNKNOWN",
  414. "UNKNOWN",
  415. "UNKNOWN",
  416. "UNKNOWN",
  417. "TC28-USER",
  418. "TC29-USER",
  419. "TC30-USER",
  420. "TC31-USER"];
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433. ARRAY [0:13] S(1);
  434. ITEM ASCII U(0,0,60) =[X"202122232425262",
  435. X"728292A2B2C2D2E",
  436. X"2F3031323334353",
  437. X"63738393A3B3C3D",
  438. X"3E3F40414243444",
  439. X"5464748494A4B4C",
  440. X"4D4E4F505152535",
  441. X"455565758595A5B",
  442. X"5C5D5E5F6061626",
  443. X"36465666768696A",
  444. X"6B6C6D6E6F70717",
  445. X"273747576777879",
  446. X"7A7B7C7D7E30313",
  447. X"233343536373839"];
  448.  
  449. ARRAY COMLIST S(9);
  450. ITEM
  451. C1 C(0,00,16) = ["TVF COMMAND LIST"],
  452. C2 U(1,36,24) = [0],
  453. C3 C(2,00,06) = [" HELP"],
  454. C4 U(2,36,24) = [0],
  455. C5 C(3,00,06) = [" TEST"],
  456. C6 U(3,36,24) = [0],
  457. C7 C(4,00,05) = [" END"],
  458. C8 U(4,30,30) = [0],
  459. C9 C(5,00,20) = [" ENDL (END TEST 1)"],
  460. C10 U(7,00,60) = [0],
  461. C11 C(8,00,02) = [".."],
  462. C12 U(8,12,48) = [0];
  463.  
  464. ARRAY TESTLIST S(11);
  465. ITEM
  466. T1 C(0,00,30) = ["PLEASE ENTER TEST LIST DESIRED"],
  467. T2 U(3,00,60) = [0],
  468. T3 C(4,00,17) = [" 1-LOOPBACK TEST"],
  469. T4 U(5,42,18) = [0],
  470. T5 C(6,00,13) = [" 2-LINE TEST"],
  471. T6 U(7,18,42) = [0],
  472. T7 C(8,00,15) = [" 3-SCREEN TEST"],
  473. T8 U(9,30,30) = [0],
  474. T9 C(10,0,02) = [".."],
  475. T10 U(10,12,48)= [0];
  476.  
  477. ARRAY PR [0:0] S(1);
  478. ITEM
  479. PROMPTC C(0,0,2) = [".."],
  480. PROMPTB U(0,12,48)= [0],
  481. PROMPT U(0,0,60);
  482.  
  483. ARRAY AUTERM S(3);
  484. ITEM
  485. AUTERMA C(0,0,24) = [ "AUTO END -TVF TERMINATES"],
  486. AUTERMB U(2,24,36) = [0];
  487.  
  488. ARRAY TVFERR S(3);
  489. ITEM
  490. TVFERRA C(0,0,15) = ["ERROR TVF READY"],
  491. TVFERRB U(1,30,30) = [0],
  492. TVFERRC C(2,0,2) = [".."],
  493. TVFERRD U(2,12,48) = [0];
  494.  
  495. ARRAY TESTCOM S(3);
  496. ITEM
  497. TESTCOMA C(0,0,17) = ["TVF TEST COMPLETE"],
  498. TESTCOMB U(1,42,18) = [0],
  499. TESTCOMC C(2,0,2) = [".."],
  500. TESTCOMD U(2,12,48) = [0];
  501.  
  502. CONTROL EJECT;
  503. # MAIN LOOP #
  504.  
  505. *IF,DEF,IMS
  506. #
  507. *1DC TVF MAINLOOP
  508. *
  509. * 1. TFV PRGM AUTHOR DATE
  510. * MAINLOOP P.WARBURTON 77/05/16
  511. *
  512. * 2. FUNCTIONAL DESCRIPTION
  513. * WHEN TVF CALLED, DOES NETON. MAINLOOP CONTAINS:
  514. * -NETGETL CALL, LABELED "NEXT". CONTROL RETURNS HERE IN
  515. * MAINLOOP.
  516. * -NETWAIT, IF NO INPUT (ABT=0), LOOP TO "NEXT".
  517. * -JUMP ON ABT VALUE IN ABH HEADER FOR SUPERVISORY OR DATA
  518. * MSG
  519. * -TESTS FOR ADR AND ABT IN RANGE, ERROR IF NOT.
  520. * -FOR SHUTDOWN, CALLS SHUTDOWN OR SHUTDD.
  521. * -FOR SM OR DATA MSG, PUT ACN IN LOC "ACN".
  522. *
  523. * 3. METHOD USED
  524. * IF-THEN CONDITIONAL TESTS TO CALL OTHER TVF PROCEDURES,
  525. * FALL THROUGH TO PROCESS ERROR MSG WHEN CONDITIONS FAIL.
  526. *
  527. * 4. ENTRY CONDIIONS
  528. * NONE
  529. *
  530. * 5. EXIT CONDITIONS
  531. * EXITS WITH MSG READ BY NETGETL IN BUFFER (FOR FURTHER
  532. * PROCESSING)
  533. * EXITS TO PROCS: TERMSG,SMTREE,SHUTDOWN,ERRMSG,SHUTDD
  534. * -ACN FROM HEADER OR MSG IS IN LOC "ACN"
  535. *
  536. * 6. COMMON DECKS CALLED
  537. * HEADER-ABH ITEM DEFS
  538. * USERIMS-SUPERVISORY MSG ITEM DEFS
  539. *
  540. * 7. PROCEDURES/FUNCTIONS CALLED
  541. * NETON
  542. * NETGETL - GET NEXT INPUT, (LIST=0) SUPERVISORY OR DATA MSG
  543. * NETWAIT - FOR ABT=0, NETWAIT AND LOOP BACK TO "NEXT" NETGETL
  544. * TERMSG - EXIT FOR TERMINAL INPUT MSG (ABT=2) WITH ADR IN RANGE
  545. * SHUTDOWN - EXIT FOR SHUT/INSD/SM
  546. * SHUTDD - FOR ORDERLY SHUTDOWN
  547. * ERRMSG - EXIT FOR ERR/LGL/SM
  548. * SMTREE - EXIT TO PROCESS SUP MSG (ABT=3) WITH ACN IN RANGE
  549. * ERRMSG - FALL THRU EXIT FOR ABT, ADR, OR ACN OUT-OF-RANGE
  550. *
  551. * 8. DAYFILE MSG
  552. * -TVF ATTEMPTING NETON
  553. * -TVF NETON SUCCESSFUL
  554. *
  555.  #
  556. *ENDIF
  557.  
  558. TVFRECV ;
  559. BUC[0] = "TVF ATTEMP";
  560. BUC[1] = "TING NETON";
  561. BUF[2] = 0;
  562. MESSAGE (BUFFER,DFOPTION);
  563. FOR I = 1 WHILE I NQ 0 DO
  564. BEGIN
  565. NETON("TVF",NSUP,I,1,TERMCOUNT);
  566. IF I EQ 2 THEN
  567. BEGIN #TVF ALRDY PRESENT, ABORT#
  568. BUC[0] = "NETON REJE";
  569. BUC[1] = "CTED, TVF ";
  570. BUC[2] = "ALREADY PR";
  571. BUC[3] = "ESENT";
  572. BUF[4] = 0;
  573. MESSAGE(BUFFER,DFOPTION);
  574. ABORT;
  575. END
  576. ELSE
  577. BEGIN
  578. IF I EQ 3 THEN
  579. BEGIN #WAITING FOR TVF TO ENABLE#
  580. BUC[0] = "WAITING FO";
  581. BUC[1] = "R TVF TO B";
  582. BUC[2] = "E ENABLED";
  583. BUF[3] = 0;
  584. IF MSGFLG EQ 0 THEN
  585. BEGIN #PUT MSG ON DF ONCE ONLY #
  586. MESSAGE(BUFFER,DFOPTION);
  587. MSGFLG = 1;
  588. END
  589. ELSE #PUT MSG ON B-DISPLAY #
  590. MESSAGE(BUFFER,BDOPTION);
  591. END
  592. END
  593. RECALL(0);
  594. END
  595. BUC[0] = "TVF NETON ";
  596. BUC[1] = "SUCCESSFUL";
  597. BUF[2] = 0;
  598. MESSAGE (BUFFER,DFOPTION);
  599. SHUTDOWNF = 0;
  600. FOR I = 1 STEP 1 WHILE I LQ TERMCOUNT DO
  601. BEGIN
  602. TWORD0[I] = 0;
  603. TWORD1[I] = 0;
  604. END
  605. P<SMESSAGE> = LOC(BUFFER);
  606. P<BUFFOUT> = LOC(BUF[10]);
  607.  
  608. NEXT:
  609. BUF[0] = 0;
  610. BUF[1] = 0;
  611. NETGETL (0,ABH,BUFFER,BUFFERSIZE);
  612. IF ABHABT EQ 0 THEN
  613. BEGIN
  614. NETWAIT (WAIT,0);
  615. GOTO NEXT;
  616. END
  617. IF ABHABT EQ 3 AND ABHADR NQ 0 THEN GOTO NEXT;
  618. IF ABHABT EQ 3 THEN ACN = CONACN[0];
  619. IF ABHABT EQ 1 OR ABHABT EQ 2 THEN ACN = ABHADR;
  620. IF ABHABT EQ 3 AND PFC EQ ERR THEN ERMMSG;
  621. IF ABHABT EQ 3 AND PFCSFC EQ SHUINS THEN SHUTDOWN;
  622. IF ACN EQ 0 OR ACN GR TERMCOUNT THEN ERMMSG;
  623. IF SHUTDOWNF EQ 1 THEN SHUTDD;
  624. IF ABHABT EQ 1 OR ABHABT EQ 2 THEN TERMSG;
  625. IF ABHABT EQ 3 THEN SMTREE;
  626. ERMMSG;
  627.  
  628. # END OF MAINLOOP #
  629.  
  630.  
  631. PROC NETOF;
  632. BEGIN
  633. NETOFF;
  634. ABORT;
  635. END
  636. CONTROL EJECT;
  637.  
  638. PROC SHUTDOWN;
  639. BEGIN
  640. *IF,DEF,IMS
  641. #
  642. *1DC SHUTDOWN
  643. *
  644. * 1. PROC NAME AUTHOR DATE
  645. * SHUTDOWN P.WARBURTON 77/05/16
  646. *
  647. * 2. FUNCTIONAL DESCRIPTION
  648. * PROCESSES SHUT/INSD/SM, TERMINATING TVF WITH A NETOFF.
  649. *
  650. * 3. METHOD USED
  651. * IF SHUTF EQ 1, THEN "TVF TERMINATE" MESSAGE SENT TO EACH
  652. * CONNECTED TERMINAL AND CON/END/SM SENT FOR EACH TERMINAL,
  653. * THEN NETOFF AND STOP.
  654. * IF SHUTF EQ 0, THEN NETOFF AND STOP IMMEDIATELY.
  655. * IF ORDERLY SHUTDOWN CANNOT BE DONE IMMEDIATELY, SET SHUTDOWNF
  656. * FLAG FOR SHUTDD PROCEDURE, WHICH FINISHES SHUTDOWN.
  657. *
  658. * 4. ENTRY CONDITIONS
  659. * SHUT/INSD/SM IS IN BUFFER,
  660. * TABLE HAS NON-ZERO ENTRY FOR EACH TERMINAL CONNECTED.
  661. *
  662. * 5. EXIT CONDITIONS
  663. * IF NO NETOFF, THEN SET SHUTDOWNF = 1.
  664. *
  665. * 6. COMMON DECKS CALLED
  666. * IF NO NETOFF, THEN SET SHUTDOWNF = 1, AND EXIT TO NEXT
  667. *
  668. * NONE
  669. *
  670. * 7. PROCEDURES/FUNCTIONS CALLED
  671. * NETPUT-SEND MSG TO TERMINALS, SEND CON/END/SM MSG-S
  672. * NETOFF-TVF TERMINATES
  673. *
  674. * 8. DAYFILE DIAGNOSTIC MESSAGES
  675. * NONE
  676. *
  677.  #
  678. *ENDIF
  679.  
  680. K = 0;
  681. FOR I = 1 STEP 1 WHILE I LQ TERMCOUNT DO
  682. IF TWORD0[I] NQ 0 THEN K = 1;
  683. IF SHUTF OR K EQ 0 THEN
  684. BEGIN
  685. NETOFF;
  686. STOP;
  687. END
  688. IF SHUTDOWNF EQ 1 THEN GOTO NEXT;
  689. SHUTDOWNF = 1;
  690. FOR I = 1 STEP 1 WHILE I LQ TERMCOUNT DO
  691. IF TPFCSFC[I] EQ CONREQ THEN
  692. BEGIN
  693. ABHTLC = 2;
  694. PFCSFC = CONEND;
  695. CONACN = TACN[I];
  696. BUF[1] = 0;
  697. NETPUT (ABH,BUFFER);
  698. END
  699. ABHABT = 1;
  700. ABHTLC = 30;
  701. ABHACT = 4;
  702. ABHNFE = 1;
  703. FOR I = 1 STEP 1 WHILE I LQ TERMCOUNT DO
  704. IF TPFCSFC[I] EQ FCINIT AND TFLAG[I] EQ 0 THEN
  705. BEGIN
  706. ABHADR = TACN[I];
  707. NETPUT(ABH,AUTERM);
  708. END
  709. GOTO NEXT;
  710. END
  711. CONTROL EJECT;
  712.  
  713. PROC SHUTDD;
  714. BEGIN
  715. *IF,DEF,IMS
  716. #
  717. *1DC SHUTDD
  718. *
  719. * 1. PROC NAME AUTHOR DATE
  720. * SHUTDD P.WARBURTON 77/06/01
  721. *
  722. * 2. FUNCTIONAL DESCRIPTION
  723. * PROCESS INCOMING MESSAGES DURING SHUTDOWN, WHEN SHUTDOWNF = 1.
  724. *
  725. * 3. METHOD USED
  726. * -IGNORE TERMINAL INPUT
  727. * -TRACK TFLAG AND FC/ACK/SM TO INSURE THAT
  728. * A. AUTO END MSG SENT
  729. * B. CON/END/SM SENT EITHER BY SHUTDOWN OR BY SHUTDD
  730. * -NETOFF WHEN CON/END/N RECEIVED FOR ALL CONNECTIONS
  731. * -UPDATE FLAGS
  732. *
  733. * 4. ENTRY CONDITIONS
  734. * MESSAGE IN BUFFER
  735. * TFLAG SET IF AUTO END NOT YET SENT
  736. *
  737. * 5. EXIT CONDITIONS
  738. * RETURN TO MAIN LOOP, OR NETOFF
  739. *
  740. * 6. COMMON DECKS CALLED
  741. * NONE
  742. *
  743. * 7. PROCEDURES CALLED
  744. * GOTO NEXT (RETURN TO MAINLOOP)
  745. *
  746. * 8. DAYFILE/DIAGNOSTIC MESSAGES
  747. * NONE
  748. *
  749.  #
  750. *ENDIF
  751.  
  752. IF ABHABT NQ 3 THEN GOTO NEXT;
  753. IF PFCSFC EQ CONREQ THEN
  754. BEGIN
  755. ABHTLC = 1;
  756. EB = TRUE;
  757. NETPUT (ABH,BUFFER);
  758. GOTO NEXT;
  759. END
  760. IF PFCSFC EQ FCNAK OR (PFCSFC EQ FCACK AND TFLAG[ACN] EQ 0) THEN
  761. ENDCON;
  762.  
  763. IF PFCSFC EQ FCACK AND TFLAG[ACN] NQ 0 THEN
  764. BEGIN
  765. TFLAG[ACN] = 0;
  766. ABHABT = 1;
  767. ABHADR = ACN;
  768. ABHACT = 4;
  769. ABHNFE = 1;
  770. ABHTLC = 30;
  771. NETPUT(ABH,AUTERM);
  772. GOTO NEXT;
  773. END
  774.  
  775. IF PFC EQ CON AND SFC EQ ENDD AND RB THEN
  776. BEGIN
  777. TWORD0[ACN] = 0;
  778. TWORD1[ACN] = 0;
  779. END
  780. K = 0;
  781. FOR I = 1 STEP 1 WHILE I LQ TERMCOUNT DO
  782. IF TWORD0[I] NQ 0 THEN K = 1;
  783. IF K EQ 0 THEN
  784. BEGIN
  785. NETOFF;
  786. STOP;
  787. END
  788. GOTO NEXT;
  789. END
  790. CONTROL EJECT;
  791.  
  792. PROC ERMMSG;
  793. BEGIN
  794. *IF,DEF,IMS
  795. #
  796. *1DC ERRMSG
  797. *
  798. * 1. PROC NAME AUTHOR DATE
  799. * ERRMSG P.WARBURTON 77/05/16
  800. *
  801. * 2. FUNCTIONAL DESCRIPTION
  802. * GENERATE DAYFILE MSG-S "TVF ERRMSG" AND "TVF ERC", FILLING IN
  803. * VALUES FOR ABT, ADR, TEXT, AND TERMINAL
  804. *
  805. * 3. METHOD USED
  806. * SET UP FOR ERRMSG OR ERR/LGL/SM.
  807. * IF ERR/LGL/SM, FILL IN VALUE FOR RC, THEN MOVE HEADER OF
  808. * MSG THAT CAUSED ERR FROM BUF[1] TO HEADER, AND FIRST WORD OF
  809. * MSG THAT CAUSED ERR FROM BUF[2] TO BUF[0].
  810. * NOW FILL IN VALUES FOR VARIABLES. USE ACT OF HEADER TO
  811. * DETERMINE WHETHER HEX OR OCTAL SOURCE TO DISPLAY CODE.
  812. * THEN DETERMINE IF TABLE CONTAINS A RELEVANT TERMINAL NAME.
  813. *
  814. * 4. ENTRY CONDITIONS
  815. * MSG IN BUFFER, EITHER ERR/LGL/SM, SUPERVISORY, OR DATA MSG.
  816. * TABLE HAS ENTRY FOR CONNECTED TERMINAL.
  817. *
  818. * 5. EXIT CONDITIONS
  819. * GOTO NEXT, FOR NEXT INPUT.
  820. *
  821. * 6. COMONDECKS CALLED: NONE
  822. *
  823. * 7. PROCEDURES/FUNCTIONS CALLED
  824. * XCHD, HEX TO DISPLAY CONVERSION
  825. * XCDD, OCTAL TO DECIMAL TO DISPLAY CONVERSION
  826. * MESSAGE, TO OUTPUT DAYFILE MSG
  827. *
  828. * 8. DAYFILE/DIAGNOSTIC MESSAGES
  829. * (SEE ABOVE, 2 THRU 7)
  830.  #
  831. *ENDIF
  832.  
  833.  
  834. IF PFC EQ ERR THEN
  835. BEGIN
  836. BUC[10] = "TVF ERC=NN";
  837. TEMP = XCDD(RC);
  838. C<8,2> BUC[10] = C<8,2> TEMP;
  839. ABHWORD = BUF[1];
  840. BUF[0] = BUF[2];
  841. END
  842. ELSE BUC[10] = "TVF ERRMSG";
  843. BUC[11] = ", ABT=NN, ";
  844. BUC[12] = "ADR=NNNN, ";
  845. BUC[13] = "TEXT=NNNN ";
  846. TEMP = XCDD(ABHABT);
  847. C<6,2> BUC[11] = C<8,2> TEMP;
  848. TEMP = XCDD(ABHADR);
  849. C<4,4> BUC[12] = C<6,4> TEMP;
  850. IF ABHACT EQ 1 OR ABHACT EQ 2 OR ABHACT EQ 3 THEN
  851. BEGIN
  852. TEMP = XCHD(PFCSFC);
  853. C<5,4> BUC[13] = C<6,4> TEMP;
  854. END
  855. ELSE C<5,4> BUC[13] = C<0,4> BUC[0];
  856.  
  857. IF ACN NQ 0 AND ACN LQ TERMCOUNT AND TPFCSFC[ACN] NQ 0 THEN
  858. BEGIN
  859. BUC[14] = ",TERMINAL =";
  860. C<0,7> BUC[15] = C<0,7> TNAME[ACN];
  861. B<42,18> BUF[15] = 0;
  862. BUF[16] = 0;
  863. END
  864. ELSE BUF[14] = 0;
  865. MESSAGE (BUFFOUT,DFOPTION);
  866. IF TPFCSFC [ABHADR] EQ FCINIT THEN CLEANUP;
  867. ELSE GOTO NEXT;
  868. END
  869. CONTROL EJECT;
  870.  
  871. PROC SMTREE;
  872. BEGIN
  873. *IF,DEF,IMS
  874. #
  875. *1DC SMTREE
  876. *
  877. * 1. PROC NAME AUTHOR DATE
  878. * SMTREE P.WARBURTON 77/05/16
  879. *
  880. * 2. FUNCTIONAL DESCRIPTION
  881. * ANALYZE SUPERVISORY MESSAGE AND DO APPROPRIATE ACTION (REPLY
  882. * UPDATE TABLE, MSG TO TERMINAL, OR GOTO ERRMSG TO PROCESS
  883. * ERROR)
  884. *
  885. * 3. METHOD USED
  886. * DECISION TREE TESTS SM IN AN ORDERLY SEQUENCE BY TABLE
  887. * VALUES:
  888. * -TABLE ENTRY CLEAR, LOOKING FOR CON/REQ/SM
  889. * -TABLE ENTRY HAS CONREQ, LOOKING FOR FC/INIT/SM
  890. * -TABLE ENTRY HAS FCINIT, LOOKING FOR LEGAL SM
  891. * -TABLE ENTRY HAS CONEND, LOOKING FOR CON/END/N
  892. * IF NOT LEGAL, GOTO ERRMSG TO PROCESS ERROR.
  893. *
  894. * 4. ENTRY CONDITIONS
  895. * MSG IN BUFFER, HEADER IN ABH
  896. * TABLE HAS ENTRY FOR TERMINALS
  897. *
  898. * 5. EXIT CONDITIONS
  899. * GOTO NEXT, IF MSG PROCESSED OR DELIBERATELY IGNORED.
  900. * ENDTEST, IF ENDTEST CONDITION DETECTED.
  901. * ERRMSG, IF FALLTHRU DECISION TREE, MSG IN BUFFER FOR ERRMSG.
  902. * ENDCON, TO END A CONNECTION.
  903. * LOFFMSG, AFTER SENDING BANNER.
  904. * TABLE ENTRY UPDATED.
  905. *
  906. * 6. COMMON DECKS CALLED
  907. * NONE
  908. *
  909. * 7. PROCEDURES/FUNCTIONS CALLED
  910. * GOTO NEXT - CONTROL PASSES BACK TO MAINLOOP
  911. * NETPUT - MSG TO TERMINAL
  912. * ENDTEST - EXIT TO PROC ENDTEST
  913. * ERRMSG - EXIT TO PROC ERRMSG
  914. * ENDCON - EXIT TO END A CONNECTION
  915. * LOFFMSG - AFTER SENDING A BANNER
  916. * DATE - FOR BANNER DISPLAY TO TERMINAL
  917. * CLOCK - BANNER
  918. * XCDD - BANNER, OCTAL TO DECIMAL TO DISPLAY CODE
  919. *
  920. * 8. DAYFILE MSG
  921. * NONE - EXIT TO ERRMSG TO PROCESS ERROR
  922. *
  923.  #
  924. *ENDIF
  925.  
  926. IF TPFCSFC[ACN] EQ 0 AND PFCSFC EQ CONREQ THEN
  927. BEGIN
  928. IF COND EQ 0 # ALLOW CONSOLE DEVICE CONNECTION ONLY #
  929. THEN
  930. BEGIN
  931. TWORD0[ACN] = BUF[0];
  932. TWORD1[ACN] = BUF[1];
  933. TTST[ACN] = 0;
  934. TFLAG[ACN] = 0;
  935. RB = TRUE;
  936. CONACT = 2;
  937. CONALN = 0;
  938. END
  939. ELSE EB = TRUE;
  940. ABHTLC = 1;
  941. NETPUT (ABH,BUFFER);
  942. GOTO NEXT;
  943. END
  944.  
  945. IF TPFCSFC[ACN] EQ CONREQ AND PFCSFC EQ CONCB THEN ENDCON;
  946. IF TPFCSFC[ACN] EQ CONREQ AND PFCSFC EQ FCINIT THEN
  947. BEGIN
  948. TPFCSFC[ACN] = PFCSFC; # FC/INIT/N #
  949. RB = TRUE;
  950. NETPUT (ABH,BUFFER);
  951. DATE (TEMP); #NOW CONSTRUCT BANNER #
  952. BUC[10] = TEMP;
  953. CLOCK (TEMP);
  954. BUC[11] = TEMP;
  955. BUF[12] = 0;
  956. BUC[13] = "TVF ";
  957. B<18,42>BUF[13] = 0;
  958. BUC[14] = "TERMINAL N";
  959. BUC[15] = "AME = ";
  960. C<6,4> BUC[15] = C<0,4>TNAME[ACN];
  961. C<0,3> BUC[16] = C<4,3>TNAME[ACN];
  962. B<18,42>BUF[16]= 0;
  963. BUC[17] = "TERMINAL C";
  964. BUC[18] = "LASS=NN/MO";
  965. TEMP = XCDD(TTC[ACN]);
  966. C<5,2> BUC[18] = C<8,2>TEMP;
  967. BUC[19] = "DEL XXXXXX";
  968. C<4,6> BUC[19] = MODEL[TTC[ACN]];
  969. BUC[20] = C<6,4>MODEL[TTC[ACN]];
  970. B<24,36>BUF[20] = 0;
  971. BUC[21] = "LINE WIDTH";
  972. BUC[22] = " = XXX ";
  973. TEMP = XCDD(TPW[ACN]);
  974. C<3,3> BUC[22] = C<7,3>TEMP;
  975. B<36,24>BUF[22] = 0;
  976. BUC[23] = "PAGE LENGTH";
  977. BUC[24] = "H = XXX ";
  978. B<42,18>BUF[24] = 0;
  979. TEMP = XCDD(TPL[ACN]);
  980. C<4,3> BUC[24] = C<7,3>TEMP;
  981. BUF[25] = 0;
  982. C<00,10> BUC[26] = C<00,10> NAMVER;
  983. C<00,03> BUC[27] = C<10,03> NAMVER;
  984. C<3,05> BUC[27] = NAMLV;
  985. B<48,12> BUF[27] = 0;
  986. BUF[28] = PROMPT;
  987. ABHABT = 2;
  988. ABHADR = ACN;
  989. ABHACT = 4;
  990. ABHNFE = 1;
  991. ABHTLC = 190;
  992. NETPUT (ABH,BUFFOUT);
  993. LOFFMSG;
  994. END
  995.  
  996. IF TPFCSFC[ACN] EQ FCINIT THEN
  997. BEGIN
  998. IF PFCSFC EQ CONCB OR PFCSFC EQ FCSTP OR PFCSFC EQ FCNAK
  999. THEN ENDCON;
  1000. IF PFCSFC EQ INTRUSR
  1001. AND (INTRCHR EQ RIR"UB1"
  1002. OR INTRCHR EQ RIR"UB2")
  1003. THEN # USER BREAK 1 OR 2 OCCURRED #
  1004. BEGIN
  1005. ABHWORD = 0;
  1006. ABHABT = 3;
  1007. ABHACT = ACINTR;
  1008. ABHTLC = LINTR;
  1009. SPMSG0 = 0;
  1010. PFCSFC = INTRRSP;
  1011. INTRACN = ACN;
  1012. NETPUT(ABH,BUFFER); # SEND INTR/RSP #
  1013. ABHWORD = 0;
  1014. ABHABT = 3;
  1015. ABHADR = ACN;
  1016. ABHACT = 2;
  1017. ABHTLC = LROMARK;
  1018. SPMSG0 = 0;
  1019. PFCSFC = ROMARK;
  1020. NETPUT(ABH,BUFFER); # SEND SYN CMD RO/MARK #
  1021. ENDTEST;
  1022. END
  1023. IF PFCSFC EQ TCHTCH THEN
  1024. BEGIN
  1025. TPW[ACN] = TCHPW;
  1026. TPL[ACN] = TCHPL;
  1027. GOTO NEXT;
  1028. END
  1029. IF PFCSFC EQ FCACK AND TFLAG2[ACN] EQ 1 THEN ENDTEST;
  1030. IF PFCSFC EQ FCACK THEN
  1031. BEGIN
  1032. TFLAG[ACN] = 0;
  1033. PFCSFC = LSTON;
  1034. NETPUT (ABH,BUFFER);
  1035. GOTO NEXT;
  1036. END
  1037. IF PFCSFC EQ FCINA THEN GOTO NEXT;
  1038. END
  1039. IF TPFCSFC[ACN] EQ CONEND THEN
  1040. IF PFC EQ CON AND SFC EQ ENDD AND RB THEN
  1041. BEGIN
  1042. TWORD0[ACN] = 0;
  1043. TWORD1[ACN] = 0;
  1044. GOTO NEXT;
  1045. END
  1046. ELSE GOTO NEXT;
  1047. ERMMSG;
  1048. END
  1049. CONTROL EJECT;
  1050.  
  1051. PROC ENDCON;
  1052. BEGIN
  1053. *IF,DEF,IMS
  1054. #
  1055. *1DC ENDCON
  1056.  
  1057. * 1. PROC NAME AUTHOR DATE
  1058. * ENDCON P.WARBURTON 77/06/01
  1059. *
  1060. * 2. FUNCTIONAL DESCRIPTION
  1061. * ISSUES CON/END/SM WHEN CALLED
  1062. *
  1063. * 3. METHOD USED
  1064. * FORMATS HEADER AND SM
  1065. *
  1066. * 4. ENTRY CONDITIONS
  1067. * LOC "ACN" CONTAINS ACN
  1068. *
  1069. * 5. EXIT CONDITIONS
  1070. * NONE - EXITS TO MAINLOOP
  1071. *
  1072. * 6. COMMON DECKS CALLED
  1073. * NONE
  1074. *
  1075. * 7. PROCEDURES CALLED
  1076. * NETPUT
  1077. *
  1078. * 8. DAYFILE MSG
  1079. * NONE
  1080. *
  1081.  #
  1082. *ENDIF
  1083.  
  1084. ABHABT = 3;
  1085. ABHADR = 0;
  1086. ABHACT = 1;
  1087. ABHTLC = 2;
  1088. PFCSFC = CONEND;
  1089. CONACN = ACN;
  1090. RC = 0;
  1091. BUF[1] = 0;
  1092. TPFCSFC[ACN] = CONEND;
  1093. NETPUT (ABH,BUFFER);
  1094. GOTO NEXT;
  1095. END
  1096. CONTROL EJECT;
  1097.  
  1098. PROC TERMSG;
  1099. BEGIN
  1100. *IF,DEF,IMS
  1101. #
  1102. *1DC TERMSG
  1103. *
  1104. * 1. PROC NAME AUTHOR DATE
  1105. * TERMSG P.WARBURTON 77/05/16
  1106. *
  1107. * 2. FUNCTIONAL DESCRIPTION
  1108. * ANALYZE INPUT DATA MSG TO DETERMINE APPROPRIATE OUTPUT,
  1109. * GENERATE OUTPUT, PASS CONTROL TO MAINLOOP (GOTO NEXT) OR
  1110. * CALL PROCEDURE TO PROCESS NEXT OUTPUT STEP
  1111. *
  1112. * 3. METHOD USED
  1113. * DECISION TREE TESTS INPUT MSG IN AN ORDERLY SEQUENCE BY
  1114. * TABLE:
  1115. * -TTST[ADR] EQ 0, LOOK FOR VARIOUS TVF COMMANDS - IF FALLTHRU,
  1116. * ISSUE UNREG ENTRY MSG
  1117. * -TTST[ADR] EQ 1, PROCESS INPUT FOR TEST 1
  1118. * -TTST[ADR] EQ 2 OR 3, SET UP FOR CALL TO PROC GENDATA
  1119. * -TTST[ADR] EQ OTHER, SET TEST = 0, SEND "TVF READY" MSG
  1120. *
  1121. * 4. ENTRY CONDITIONS
  1122. * DATA MSG IN BUFFER, HEADER IN ABH
  1123. * TABLE ENTRIES FOR CONNECTED TERMINALS
  1124. *
  1125. * 5. EXIT CONDITIONS
  1126. * GOTO NEXT, IF MSG PROCESSED
  1127. * GENDATA, IF READY TO GENERATE DATA FOR TEST 2 AND 3
  1128. * ERRMSG, IF ADR FOR TERMINAL NOT CONNECTED
  1129. * TABLE UPDATED, AND FOR TEST 2 SET TFLAG2
  1130. * ENDTEST, IF TEST 1 "ENDL" MSG
  1131. * LOFFMSG, IF MSG SENT TO TERMINAL
  1132. *
  1133. * 6. COMMON DECKS CALLED
  1134. * NONE
  1135. *
  1136. * 7. PROCEDURES/FUNCTIONS CALLED
  1137. * NETPUT - OUTPUT MSG TO TERMINAL
  1138. * GOTO NEXT - EXIT TO MAINLOOP
  1139. * ERRMSG - EXIT FOR ERROR PROCESSING
  1140. * GENDATA - EXIT TO GENERATE DATA FOR TESTS 2 AND 3,
  1141. * I = NUMBER OF CHAR TO BE GENERATED
  1142. * ENDTEST - EXIT FOR TEST 1 "ENDL" COMMAND
  1143. * LOFFMSG - EXIT AFTER SENDING MESSAGE
  1144.  #
  1145. *ENDIF
  1146.  
  1147.  
  1148. IF TPFCSFC[ABHADR] EQ CONEND THEN GOTO NEXT;
  1149. IF TPFCSFC[ABHADR] NQ FCINIT THEN ERMMSG;
  1150. IF ABHBIT EQ 1 THEN
  1151. BEGIN
  1152. BUF [10] = X"4552524F52202D2"; #PARITY ERR MSG TO TERMINAL #
  1153. BUF [11] = X"050415249545920";
  1154. BUF [12] = 0;
  1155. BUF [13] = 0;
  1156. K = ABHTLC*8;
  1157. IF K GR 40 THEN K = 40;
  1158. FOR J = 0 STEP 8 WHILE J LQ K DO
  1159. B<J,8> BUF[12] = B<J,8> BUF[0];
  1160. ABHABT = 2;
  1161. BUF[14] = X"1F2E2E1F0000000";
  1162. ABHNFE = 1;
  1163. ABHBIT = 0;
  1164. ABHTLC = 34;
  1165. NETPUT (ABH,BUFFOUT);
  1166. TTST[ABHADR] = 0;
  1167. LOFFMSG;
  1168. END
  1169.  
  1170. IF TTST[ABHADR] EQ 0 THEN
  1171. BEGIN
  1172. IF ABHTLC EQ 4 AND
  1173. B<0,32>BUF[0] EQ X"48454C50" OR #TEST FOR HELP COMMAND #
  1174. ABHTLC EQ 4 AND
  1175. B<0,32>BUF[0] EQ X"68656C70" THEN
  1176. BEGIN
  1177. ABHABT = 2;
  1178. ABHACT = 4;
  1179. ABHNFE = 1;
  1180. ABHTLC = 90;
  1181. NETPUT (ABH,COMLIST);
  1182. LOFFMSG;
  1183. END
  1184. IF ABHTLC EQ 4 AND
  1185. B<0,32>BUF[0] EQ X"54455354" OR #TEST FOR TESTLIST COMMAND#
  1186. ABHTLC EQ 4 AND
  1187. B<0,32>BUF[0] EQ X"74657374" THEN
  1188. BEGIN
  1189. ABHABT = 2;
  1190. ABHACT = 4;
  1191. ABHNFE = 1;
  1192. ABHTLC = 110;
  1193. NETPUT (ABH,TESTLIST);
  1194. LOFFMSG;
  1195. END
  1196. IF ABHTLC EQ 3 AND
  1197. B<0,24>BUF[0] EQ X"454E44" OR #TEST FOR END #
  1198. ABHTLC EQ 3 AND
  1199. B<0,24>BUF[0] EQ X"656E64" THEN ENDCON;
  1200. IF ABHTLC EQ 1 AND PFC EQ X"31" THEN
  1201. BEGIN
  1202. BUC[10] = "LOOPBACK T";
  1203. BUC[11] = "EST BEGINS";
  1204. TTST[ACN] = 1;
  1205. END
  1206. IF ABHTLC EQ 1 AND PFC EQ X"32" THEN
  1207. BEGIN
  1208. BUC[10] = "LINETEST B";
  1209. BUC[11] = "EGINS ";
  1210. B<30,30>BUF[11] =0;
  1211. TTST[ACN] = 2;
  1212. END
  1213. IF ABHTLC EQ 1 AND PFC EQ X"33" THEN
  1214. BEGIN
  1215. BUC[10] = "SCREEN TES";
  1216. BUC[11] = "T BEGINS ";
  1217. B<48,12>BUF[11] = 0;
  1218. TTST[ACN] = 3;
  1219. END
  1220.  
  1221. IF TTST[ACN] NQ 0 THEN
  1222. BEGIN
  1223. BUF[12] =0;
  1224. BUF[13] = PROMPT[0];
  1225. ABHABT = 2;
  1226. ABHACT = 4;
  1227. ABHNFE = 1;
  1228. ABHTLC = 40;
  1229. NETPUT (ABH,BUFFOUT);
  1230. LOFFMSG;
  1231. END
  1232.  
  1233. BUF [10] = X"4552524F52202D2"; #MSG TO TERMINAL #
  1234. BUF [11] = X"0454E5452592020"; #UNRECOGNIZED ENTRY #
  1235. BUF [12] = 0;
  1236. BUF [13] = 0;
  1237. K = ABHTLC*8;
  1238. IF K GR 40 THEN K = 40;
  1239. FOR J = 0 STEP 8 WHILE J LQ K DO
  1240. B<J,8> BUF[12] = B<J,8> BUF[0];
  1241. BUF [14] = X"1F2E2E1F0000000";
  1242. ABHACT = 2;
  1243. ABHABT = 2;
  1244. ABHNFE = 1;
  1245. ABHTLC = 34;
  1246. NETPUT (ABH,BUFFOUT);
  1247. TTST[ABHADR] = 0;
  1248. LOFFMSG;
  1249. END
  1250.  
  1251. IF TTST[ABHADR] EQ 1 THEN
  1252. BEGIN
  1253. IF ABHTLC EQ 4 AND B<0,32> BUF[0] EQ X"454E444C" OR
  1254. ABHTLC EQ 4 AND B<0,32>BUF[0] EQ X"656E646C" THEN ENDTEST;
  1255. ABHNFE = 1;
  1256. I = ABHTLC;
  1257. COMPUTEUS;
  1258. IF ABHABT EQ 2
  1259. THEN
  1260. BEGIN
  1261. I = ABHTLC;
  1262. COMPUTEUS; # SECOND UNIT SEPARATOR FOR ASYCH TERMINAL #
  1263. END
  1264. NETPUT (ABH,BUFFER);
  1265. LOFFMSG;
  1266. END
  1267.  
  1268. IF TTST[ABHADR] EQ 2 THEN
  1269. BEGIN
  1270. TFLAG2[ACN] = 1;
  1271. I = TPW[ABHADR];
  1272. IF I EQ 0 THEN ENDTEST;
  1273. ABHABT = 1;
  1274. ABHNFE = 1;
  1275. GENDATA;
  1276. END
  1277.  
  1278. IF TTST[ABHADR] EQ 3 THEN
  1279. BEGIN
  1280. I = TPW[ACN]*(TPL[ACN]-1);
  1281. IF I LS 96 THEN I =96;
  1282. IF I GR 2000 THEN I = 2000;
  1283. ABHABT = 2;
  1284. ABHNFE = 0;
  1285. GENDATA;
  1286. END
  1287. CLEANUP;
  1288. END
  1289. CONTROL EJECT;
  1290.  
  1291. PROC COMPUTEUS; # COMPUTE AND POSITION <US>, INCREMENT ABHTLC #
  1292. BEGIN # I = COUNT OF ASCI CHARACTERS #
  1293. J = (I/15)*2; # COMPUTE WD ADR OF LAST WD PAIR OF ASCI CHAR #
  1294. K = I-(15*(I/15));# COMPUTE NUMBER OF CHAR IN LAST WORD PAIR #
  1295. IF K LS 7 THEN
  1296. BEGIN
  1297. K=K*8;
  1298. B<K,8>BUF[J] = X"1F";
  1299. END
  1300. IF K EQ 7 THEN
  1301. BEGIN
  1302. B<56,4>BUF[J] = X"1";
  1303. B<0,4> BUF[J+1] = X"F";
  1304. END
  1305. ELSE
  1306. BEGIN
  1307. K =((K-8)*8)+4;
  1308. B<K,8> BUF[J+1] = X"1F";
  1309. END
  1310. ABHTLC = I + 1;
  1311. END
  1312. CONTROL EJECT;
  1313.  
  1314. PROC CLEANUP;
  1315. BEGIN
  1316. ABHABT = 2;
  1317. ABHACT = 4;
  1318. ABHTLC = 30;
  1319. TTST[ABHADR] = 0;
  1320. NETPUT(ABH,TVFERR);
  1321. LOFFMSG;
  1322. END
  1323. CONTROL EJECT;
  1324.  
  1325. PROC GENDATA;
  1326. BEGIN
  1327. *IF,DEF,IMS
  1328. #
  1329. *1DC GENDATA
  1330. *
  1331. * 1. PROC NAME AUTHOR DATE
  1332. * GENDATA P.WARBURTON 77/05/16
  1333. *
  1334. * 2. FUNCTIONAL DESCRIPTION
  1335. * FOR TESTS 2 AND 3, TVF USER MAY RETURN A CHARACTER TO BE USED
  1336. * IN THE LINE OR SCREEN TESTS, OR A NULL INPUT, IN WHICH CASE
  1337. * TVF GENERATES OUTPUT FROM THE 95 CHAR ASCII SUBSET.
  1338. *
  1339. * 3. METHOD USED
  1340. * IF NULL INPUT, 14 WORDS (110 ASCII CHARACTERS) ARE MOVED FROM
  1341. * THE ARRAY "ASCII" TO THE BUFFER REPEATEDLY UNTIL BUFFER
  1342. * CONTAINS MORE THAN ENOUGH CHARACTERS FOR LINE OR SCREEN
  1343. * OUTPUT. IF CHAR INPUT, CHAR IS PACKED IN WORD PAIR (15
  1344. * CHARACTERS) AND THE BUFFER FILLED WITH ENOUGH WORD PAIRS
  1345. * FOR OUTPUT. FOR TEST 3, FIRST WORD PAIR CONTAINS A FORMAT
  1346. * EFFECTOR TO CLEAR SCREEN: FE IS FIRST CHAR, REST IS NULL
  1347. * FILLED. FOR TEST 2, FIRST WORD PAIR IS NULL FILLED.
  1348. *
  1349. * 4. ENTRY CONDITIONS
  1350. * ITEM I CONTAINS NUMBER OF CHAR TO BE GENERATED.
  1351. * BUFFER CONTAINS INPUT MSG, IF ANY.
  1352. * ABH CONTAINS HEADER, TLC=0 FOR NULL INPUT.
  1353. * TABLE CONTAINS ENTRY FOR TERMINAL.
  1354. *
  1355. * 5. EXIT CONDITIONS
  1356. * EXIT TO LOFFMSG.
  1357. *
  1358. * 6. COMMON DECKS CALLED
  1359. * NONE
  1360. *
  1361. * 7. PROCEDURES/FUNCTIONS CALLED
  1362. * LOFFMSG - EXIT AFTER SENDING MESSAGE.
  1363. * NETPUT - OUTPUT MSG TO TERMINAL.
  1364. *
  1365. * 8. DAYFILE MSG
  1366. * NONE
  1367. *
  1368.  #
  1369. *ENDIF
  1370.  
  1371. IF ABHTLC EQ 0 THEN
  1372. BEGIN
  1373. FOR J = 0 STEP 14 WHILE (J*15) LS (I*2) DO
  1374. FOR K = 0 STEP 1 UNTIL 13 DO
  1375. BUF[J+K] = ASCII[K];
  1376. END
  1377. ELSE
  1378. BEGIN
  1379. FOR J = 8 STEP 8 WHILE J LS 56 DO
  1380. B<J,8> BUF [0] = PFC;
  1381. B<56,4> BUF [0] = B<0,4> PFC;
  1382. B<0,4> BUF [1] = B<4,4> PFC;
  1383. FOR J = 4 STEP 8 WHILE J LS 60 DO
  1384. B<J,8> BUF [1] = PFC;
  1385. FOR J = 2 STEP 2 WHILE (J/2) LS ((I+15)/15) DO
  1386. BEGIN
  1387. BUF [J] = BUF [0];
  1388. BUF [J+1] = BUF [1];
  1389. END
  1390. END
  1391. IF TTST[ACN] EQ 3 THEN
  1392. BEGIN
  1393. PFC = X"31";
  1394. TTST[ACN] = 0;
  1395. END
  1396. COMPUTEUS;
  1397. NETPUT (ABH,BUFFER);
  1398. LOFFMSG;
  1399. END
  1400. CONTROL EJECT;
  1401.  
  1402. PROC ENDTEST; # TEST 1, 2 COMPLETE #
  1403. BEGIN
  1404. *IF,DEF,IMS
  1405. #
  1406. *1DC ENDTEST
  1407. *
  1408. * 1. PROC NAME AUTHOR DATE
  1409. * ENDTEST P.WARBURTON 77/05/16
  1410. *
  1411. * 2. FUNCTIONAL DESCRIPTION
  1412. * SEND TO TERMINAL "TEST COMPLETE" MSG.
  1413. * -CALLED FROM PROC GENDATA.
  1414. * -CALLED FROM PROC SMTREE WHEN FC/ACK/SM RECEIVED.
  1415. * -CALLED FROM PROC TERMSG DN TEST 1 "ENDL" COMMAND.
  1416. *
  1417. * 3. METHOD USED
  1418. * FORMAT MSG, NETPUT IT, AND CLEAR TEST AND TFLAG.
  1419. *
  1420. * 4. ENTRY CONDITIONS
  1421. * ABHABT SET FOR DATA MSG
  1422. * ABHADR SET FOR ACN
  1423. * TFLAG2 SET (FOR TEST 2 ONLY)
  1424. *
  1425. *
  1426. * 5. EXIT CONDITIONS
  1427. * EXIT TO LOFFMSG.
  1428. *
  1429. * 6. COMMON DECKS CALLED
  1430. * NONE
  1431. *
  1432. * 7. PROCEDURES/FUNCTIONS CALLED
  1433. * NETPUT - SEND MSG TO TERMINAL
  1434. * LOFFMSG - EXIT AFTER SENDING MESSAGE.
  1435. *
  1436. * 8. DAYFILE MSG
  1437. * NONE
  1438.  #
  1439. *ENDIF
  1440. ABHABT = 2;
  1441. ABHADR = ACN;
  1442. ABHACT = 4;
  1443. ABHNFE = 1;
  1444. ABHTLC = 30;
  1445. NETPUT(ABH,TESTCOM);
  1446. TTST[ABHADR] = 0;
  1447. TFLAG2[ACN] =0;
  1448. LOFFMSG;
  1449. END
  1450. CONTROL EJECT;
  1451.  
  1452. PROC LOFFMSG;
  1453. BEGIN
  1454. *IF,DEF,IMS
  1455. #
  1456. *1DC LOFFMSG
  1457. * 1. PROC NAME AUTHOR DATE
  1458. * LOFFMSG P.WARBURTON 77/06/01
  1459. *
  1460. * 2. FUNCTIONAL DESCRIPTION
  1461. * ISSUES LST/OFF/SM WHEN CALLED
  1462. *
  1463. * 3. METHOD USED
  1464. * FORMATS HEADER AND SM
  1465. *
  1466. * 4. ENTRY CONDITIONS
  1467. * ACN IS IN LOC "ACN"
  1468. *
  1469. * 5. EXIT CONDITIONS
  1470. * NONE - EXITS TO MAINLOOP
  1471. *
  1472. * 6. COMMON DECKS CALLED
  1473. * NONE
  1474. *
  1475. * 7. PROCEDURES CALLED
  1476. * NETPUT
  1477. *
  1478. * 8. DAYFILE MSG
  1479. * NONE
  1480. *
  1481.  #
  1482. *ENDIF
  1483.  
  1484. PFCSFC = LSTOFF;
  1485. LSTACN = ACN;
  1486. ABHABT = 3;
  1487. ABHADR = 0;
  1488. ABHACT = 1;
  1489. ABHTLC = 1;
  1490. NETPUT (ABH,BUFFER);
  1491. TFLAG[ACN] = 1;
  1492. GOTO NEXT;
  1493. END
  1494.  
  1495. END #END OF TVF PROG #
  1496. TERM
cdc/nos2.source/nam5871/tvf.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator