Table of Contents

SXKD

Table Of Contents

  • [00001] PROC K
  • [00003] K - *K* DISPLAY DOCUMENTATION.
  • [00158] PROC KCLR1)
  • [00160] KCLR - CLEAR CURRENT ENTRY ON *K* DISPLAY.
  • [00165] KCLR - CLEAR CURRENT ENTRY ON *K* DISPLAY.
  • [00217] PROC KDISPLY
  • [00219] KDISPLY - *K* DISPLAY OVERLAY.
  • [00224] KDISPLY - *K* DISPLAY OVERLAY.
  • [00263] PROC KDSM
  • [00264] PROC KINPUT
  • [00265] PROC KPFILL
  • [00266] PROC KREQ
  • [00267] PROC MESSAGE
  • [00268] FUNC XCOD C(10)
  • [00521] PROC KDSM
  • [00523] KDSM - DISPLAY *SM* INFORMATION ON *K* DISPLAY.
  • [00529] KDSM - PAINT *SM* INFORMATION ON K-DISPLAY.
  • [00579] PROC KPFILL
  • [00580] PROC ZFILL
  • [00888] PROC KFILES(REJECT)
  • [00890] KFILES - PROCESS *K* DISPLAY *FILES* COMMAND.
  • [00895] KFILES - PROCESS *K* DISPLAY *FILES* COMMAND.
  • [00924] FUNC XCDD I
  • [00925] FUNC XDXB I
  • [01003] PROC KINIT
  • [01005] KINIT - *K* DISPLAY INITIALIZATION.
  • [01010] KINIT - *K* DISPLAY INTIALIZATION.
  • [01035] PROC CONSOLE
  • [01036] PROC MESSAGE
  • [01099] PROC KINPUT
  • [01101] KINPUT - KEYBOARD INPUT.
  • [01106] KINPUT - KEYBOARD INPUT.
  • [01145] PROC ADD$LNK
  • [01146] PROC DEL$LNK
  • [01147] PROC KCLR
  • [01148] PROC KFILES
  • [01149] PROC KREQ
  • [01150] PROC KSM
  • [01151] FUNC XDXB I
  • [01153] PROC ZFILL
  • [01426] PROC KPFILL(TEXT,(PADDR))
  • [01428] KPFILL - *K* PARAMETER FILL ROUTINE.
  • [01433] KPFILL - PARAMETER FILL ROUTINE.
  • [01458] PROC BZFILL
  • [01459] FUNC XCDD C(10)
  • [01460] FUNC XCOD C(10)
  • [01796] PROC KPROC
  • [01798] KPROC - *K* DISPLAY PROCESSOR.
  • [01803] KPROC - *K* DISPLAY PROCESSOR.
  • [01848] FUNC XCDD C(10)
  • [01849] PROC SSOVL
  • [01850] PROC MESSAGE
  • [01851] PROC RTIME
  • [01956] PROC KREQ2)
  • [01958] KREQ - *K* DISPLAY REQUEST.
  • [01963] KREQ - *K* DISPLAY REQUEST.
  • [02011] PROC KCLR
  • [02012] PROC MESSAGE
  • [02148] PROC KSM(REJECT)
  • [02150] KSM - PROCESS *SMI* COMMAND.
  • [02155] KSM - PROCESS *SMI* COMMAND.
  • [02195] PROC KDSM
  • [02196] FUNC XDXB I

Source Code

SXKD.txt
  1. PROC K;
  2.  
  3. # TITLE K - *K* DISPLAY DOCUMENTATION. #
  4.  
  5. BEGIN # K #
  6.  
  7. #
  8. ***** *K* DISPLAY ROUTINES.
  9. *
  10. * THE *K* DISPLAY ROUTINES ARE TO PROVIDE ACCESS TO THE
  11. * *K* DISPLAY FOR THE SSEXEC. THE FUNCTIONS ARE TO
  12. * FORMAT THE LEFT SCREEN DISPLAY AND TO PROCESS THE KEYBOARD
  13. * RESPONSES FROM THE OPERATOR.
  14.  
  15.  
  16.  
  17.  
  18. *** OVERVIEW OF *K* DISPLAY ROUTINES.
  19. *
  20. * THE *K* DISPLAY ROUTINES ARE -
  21. *
  22. * KCLR - CLEAR CURRENT ENTRY ON *K* DISPLAY.
  23. * KDISPLY - *K* DISPLAY OVERLAY PROCESSOR.
  24. * KDSM - DISPLAY SM INFORMATION.
  25. * KFILES - PROCESS *FILES* COMMAND.
  26. * KINIT - *K* DISPLAY INITIALIZATION.
  27. * KINPUT - KEYBOARD INPUT PROCESSOR.
  28. * KPFILL - PARAMETER FILL ROUTINE.
  29. * KPROC - *K* DISPLAY PROCESSOR.
  30. * KREQ - *K* DISPLAY REQUEST.
  31. * KSM - PROCESS *SMI* COMMAND.
  32. *
  33. * *KINIT* MUST BE CALLED ONCE INITIALLY TO ISSUE THE
  34. * *CONSOLE* MACRO.
  35. *
  36. * *KREQ* PROCESSES REQUESTS TO PLACE A GROUP OF MESSAGES
  37. * ON THE LEFT SCREEN OR TO COMPLETE/CLEAR A GROUP OF MESSAGES
  38. * FROM THE LEFT SCREEN.
  39. *
  40. * THE CALLER CAN SPECIFY UP TO THREE MESSAGES IN EACH REQUEST,
  41. * INDICATE WHAT OPERATOR RESPONSES ARE VALID, REQUEST THAT THE
  42. * MESSAGE(S) BE ISSUED TO THE DAYFILE/ERROR LOG, AND INCLUDE
  43. * PARAMETER VALUES TO BE INSERTED INTO THE MESSAGE TEXTS.
  44. *
  45. * NEW REQUESTS ARE PLACED IN A QUEUE FOR LATER PROCESSING.
  46. * THEY REMAIN IN THE QUEUE UNTIL THEY ARE COMPLETED BY
  47. * SOME EVENT. THE EVENTS ARE -
  48. * . CALL TO *KREQ* TO CLEAR THE MESSAGES (DELINK).
  49. * . OPERATOR RESPONSE.
  50. * . "IMMEDIATE-COMPLETE" OPTION SET IN THE REQUEST.
  51. *
  52. * THE QUEUE IS FORMED BY LINKING THRU A FIELD IN THE
  53. * REQUEST. THEREFORE, THE REQUEST WORDS MUST REMAIN
  54. * AVAILABLE WHILE THE REQUEST IS NOT COMPLETE.
  55. *
  56. * THE "IMMEDIATE-COMPLETE" OPTION IN THE REQUEST WORDS MEANS
  57. * THE *K* PROCESSING WILL SET THE COMPLETE BIT AND DELINK THE
  58. * REQUEST FROM THE QUEUE AS SOON AS IT HAS PLACED THE MESSAGES
  59. * ON THE LEFT SCREEN. THEN THE ONLY WAY TO CLEAR THOSE
  60. * MESSAGES ON THE SCREEN IS BY AN OPERATOR RESPONSE.
  61. *
  62. * TO REQUEST MESSAGES TO BE PLACED ON THE LEFT SCREEN,
  63. * THE CALLER MUST FORMAT THE REQUEST BY USING THE
  64. * *KWORD* BASED ARRAY IN *COMBKDD* AND THEN CALL
  65. * *KREQ* SPECIFYING THE PROPER PARAMETERS..
  66. * - ADDRESS OF THE *KWORD* ARRAY, AND
  67. * - *KLINK*, WHICH ADDS A NEW REQUEST.
  68. * THE CALLER MUST SPECIFY IN THE *KWORD* ARRAY
  69. * THE CALLER CONTROLLED FLAGS AND THE MESSAGE
  70. * ORDINALS FOR LINES 1, 2, 3. ALSO, THE
  71. * PARAMETER WORD IN *KWORD* MUST BE SET
  72. * IF PARAMETERS ARE USED IN THE MESSAGE TEXT.
  73. *
  74. * THE MESSAGE ORDINALS ARE DEFINED IN THE *KM*
  75. * STATUS LIST IN *COMBKDD* (MESSAGE ORDINAL ZERO
  76. * SPECIFIES A BLANK LINE). THE MESSAGE TEXTS
  77. * AND PARAMETER DEFINITIONS ARE ALSO DEFINED
  78. * IN *COMBKDD*.
  79. *
  80. * TO CLEAR A REQUEST THAT IS QUEUED WAITING
  81. * TO BE DISPLAYED OR IS ALREADY ON THE LEFT SCREEN
  82. * DISPLAY, THE PROC *KREQ* CAN BE CALLED
  83. * SPECIFYING THE ADDRESS OF THE *KWORD* ARRAY
  84. * AND THE VALUE *KDELINK*.
  85. *
  86. * *KPROC* CONTROLS THE PROCESSING OF THE LEFT SCREEN AND
  87. * OPERATOR RESPONSES. IT SHOULD BE CALLED PERIODICALLY.
  88. * WHEN IT DETECTS WORK TO BE DONE, IT CALLS THE
  89. * OVERLAY *KDISPLY* TO PROCESS THE WORK.
  90.  
  91.  
  92.  
  93.  
  94. *** THE LEFT SCREEN FORMAT IS -
  95. *
  96. * LINE -
  97. * TYPE - DESCRIPTION
  98. * ---- - -----------
  99. *
  100. *
  101. * - --------------------------
  102. * TITLE - - MASS STORAGE SUBSYSTEM -
  103. * - --------------------------
  104. * -
  105. * -
  106. * BODY - 1. LINE 1 OF THE *K* REQUEST 1.
  107. * - LINE 2 OF THE *K* REQUEST 1.
  108. * - LINE 3 OF THE *K* REQUEST 1.
  109. * -
  110. * -
  111. * - 2. LINE 1 OF THE *K* REQUEST 2. ...
  112. * - LINE 2 OF ...
  113. * - LINE 3 OF THE *K* REQUEST 2. ...
  114. * -
  115. * -
  116. * - (UP TO 2 ORDINALS)
  117. *
  118. * REJECT - *** REJECT ***
  119. * -
  120. * -
  121. * ECHO - (KEYBOARD TYPE-IN)
  122. * -
  123. *
  124. * THE BODY CONSISTS OF AN ORDINAL REPRESENTING A SPECIFIC *K*
  125. * REQUEST AND THE TEXT AS SPECIFIED IN THAT REQUEST.
  126. * A MAXIMUM OF 3 LINES MAY BE SPECIFIED PER REQUEST.
  127.  
  128.  
  129.  
  130.  
  131. *** OPERATOR RESPONSES.
  132. *
  133. * RESPONSES TO MESSAGES IN THE LEFT SCREEN BODY HAVE THE FORM -
  134. *
  135. * N.COMMAND. WHERE N IS THE ORDINAL
  136. * AND COMMAND = *GO* OR *DROP*.
  137. *
  138. * OTHER OPERATOR COMMANDS DEFINED ARE -
  139. *
  140. * FILES,N. WHERE N IS THE AUTHORIZED DATA BUFFER COUNT.
  141. *
  142. * SMI. WHERE I IS THE SM ORDINAL FOR WHICH
  143. * INFORMATION IS DISPLAYED.
  144. *
  145. * SMI,DRD=ST=N. WHERE I IS THE SM ORDINAL
  146. * SMI,DRD=DS=N. AND N IS THE MAXIMUM NUMBER OF DRD-S
  147. * PERMITTED FOR STAGING OR DESTAGING FILES.
  148. * (ST IF STAGING, DS IF DESTAGING)
  149. *
  150. * STAGE. TOGGLE OPEN/CLOSE STATUS.
  151. * DESTAGE.
  152. *
  153. #
  154.  
  155. END # K #
  156.  
  157. TERM
  158. PROC KCLR((ORD));
  159.  
  160. # TITLE KCLR - CLEAR CURRENT ENTRY ON *K* DISPLAY. #
  161.  
  162. BEGIN # KCLR #
  163.  
  164. #
  165. ** KCLR - CLEAR CURRENT ENTRY ON *K* DISPLAY.
  166. *
  167. * *KCLR* CLEARS THE LEFT SCREEN AREA FOR THE SPECIFIED
  168. * ORDINAL, DECREMENTS THE *KACTCOUNT* AND CLEARS THE
  169. * *KCURRENT* ENTRY FOR THE ORDINAL.
  170. *
  171. * PROC KCLR((ORD))
  172. *
  173. * ENTRY (ORD) - ORDINAL OF CURRENT ENTRY TO CLEAR.
  174. *
  175. * EXIT (KACTCOUNT) - DECREMENTED.
  176. * (KCUR$WD) - ENTRY FOR SPECIFIED ORDINAL IS CLEARED.
  177. *
  178. * LINES IN THE BODY OF LEFT SCREEN FOR THE SPECIFIED
  179. * ORDINAL ARE CLEARED.
  180. *
  181. #
  182.  
  183. ITEM ORD I; # ORDINAL OF CURRENT ENTRY #
  184.  
  185. DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
  186. *CALL,COMBFAS
  187. *CALL COMBKDA
  188.  
  189. ITEM LINES I; # TEMPORARY CELL #
  190.  
  191. CONTROL EJECT;
  192.  
  193. P<KLBODY> = LOC(KL$LINE[LF$BODY]);
  194.  
  195. #
  196. * CLEAR LEFT SCREEN LINES FOR THE GIVEN ORDINAL, ONLY IF
  197. * THE MESSAGE DISPLAY IS ON THE SCREEN.
  198. #
  199.  
  200. IF NOT KSMDISP
  201. THEN # REMOVE MESSAGES #
  202. BEGIN # MSG #
  203. FASTFOR LINES = 1 STEP 1 UNTIL 3
  204. DO # CLEAR EACH LINE #
  205. BEGIN # BLANK #
  206. KLB$LINCLR[LINES,ORD] = " ";
  207. END # BLANK #
  208.  
  209. END # MSG #
  210.  
  211. KCUR$WD[ORD] = 0; # CLEAR *KCURRENT* ENTRY #
  212. KACTCOUNT = KACTCOUNT - 1; # DECREMENT ACTIVE COUNT #
  213. RETURN;
  214. END # KCLR #
  215.  
  216. TERM
  217. PROC KDISPLY;
  218.  
  219. # TITLE KDISPLY - *K* DISPLAY OVERLAY. #
  220.  
  221. BEGIN # KDISPLY #
  222.  
  223. #
  224. ** KDISPLY - *K* DISPLAY OVERLAY.
  225. *
  226. * *KDISPLY* CALLS *KINPUT* IF THERE IS AN OPERATOR TYPE-IN
  227. * IN THE *KBINPUT* BUFFER, BUILDS THE LEFT SCREEN BUFFER
  228. * FOR NEW REQUESTS AND CONTAINS THE ARRAY OF DEFINED *K*
  229. * MESSAGES.
  230. *
  231. * PROC KDISPLY.
  232. *
  233. * ENTRY (KACTCOUNT) - NUMBER OF ACTIVE REQUESTS IN BODY
  234. * OF THE LEFT SCREEN.
  235. * (KLINKQ) - HEAD OF K-QUEUE.
  236. * = 0 IF EMPTY.
  237. * ARRAY KBINPUT - KEYBOARD INPUT BUFFER.
  238. * ARRAY KCURRENT - CURRENT ENTRIES ON LEFT SCREEN.
  239. * = 0 IF ENTRY AVAILABLE.
  240. *
  241. * EXIT FOR EACH NEW *KWORD* REQUEST THAT IS PROCESSED -
  242. * - LINES ARE FORMATTED FOR THE LEFT SCREEN BODY.
  243. * - LINES ARE ISSUED TO THE DAYFILE IF SPECIFIED.
  244. * - LINES ARE ISSUED TO THE ERROR LOG IF SPECIFIED.
  245. * - IF THE *KW$IC* IS SET, THE COMPLETE BIT IS SET AND
  246. * THE *KWORD* REQUEST IS DELINKED FROM THE K-QUEUE.
  247. * (KW$ACT) - SET IN *KWORD* REQUEST.
  248. * (KACTCOUNT) - INCREMENTED FOR REQUESTS PROCESSED.
  249. * ARRAY KCURRENT - ENTRIES SET FOR REQUESTS PROCESSED.
  250. * KNEWREQ - SET FALSE WHEN NO NEW REQUESTS
  251. * ARE FOUND.
  252. *
  253. * NOTES THE DEFINED MESSAGE SIZE IS 40 CHARACTERS.
  254. *
  255. #
  256.  
  257. #
  258. **** PROC KDISPLY - XREF LIST BEGIN.
  259. #
  260.  
  261. XREF
  262. BEGIN
  263. PROC KDSM; # DISPLAY *SM* INFORMATION #
  264. PROC KINPUT; # KEYBOARD INPUT #
  265. PROC KPFILL; # *K* PARAMETER FILL #
  266. PROC KREQ; # *K* DISPLAY REQUEST #
  267. PROC MESSAGE; # ISSUE *MESSAGE* MACRO #
  268. FUNC XCOD C(10); # CONVERT INTEGER TO OCTAL DISPLAY
  269.   CODE #
  270. END
  271.  
  272. #
  273. **** PROC KDISPLY - XREF LIST END.
  274. #
  275.  
  276. DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
  277. *CALL COMBFAS
  278. *CALL COMBKDA
  279. *CALL COMBKDD
  280.  
  281.  
  282. ITEM CURRKW I; # *KWORD* ADDRESS #
  283. ITEM CURRORD I; # ORDINAL #
  284. ITEM I I; # TEMPORARY CELL #
  285. ITEM LINE I; # LINE NUMBER #
  286. ITEM MSGORD I; # MESSAGE ORDINAL #
  287. ITEM TEMP C(10); # TEMPORARY CELL #
  288.  
  289.  
  290. ITEM DSPLORD C(10) = " N. "; # DISPLAY ORDINAL #
  291.  
  292.  
  293. #
  294. * ARRAY OF MESSAGES DEFINED FOR THE *K* DISPLAY.
  295. #
  296.  
  297. ARRAY KMESSAGES [0:KMNUM] S(4);
  298. BEGIN
  299. ITEM KM$TEXT C(00,00,40) = [ "NO-ONE",
  300. KM1,
  301. KM2,
  302. KM3,
  303. KM4,
  304. KM5,
  305. KM6,
  306. KM7,
  307. KM8,
  308. KM9,
  309. KM10,
  310. KM11,
  311. KM12,
  312. KM13,
  313. KM14,
  314. KM15,
  315. KM16,
  316. KM17,
  317. KM18,
  318. KM19,
  319. KM20,
  320. KM21,
  321. KM22,
  322. KM23,
  323. KM24,
  324. KM25,
  325. KM26,
  326. KM27,
  327. KM28,
  328. KM29,
  329. KM30 ];
  330. END
  331.  
  332.  
  333. #
  334. * ARRAY TO DEVELOP THE MESSAGE TEXT FOR THE *K* LINE.
  335. #
  336.  
  337. ARRAY TEXT [0:0] S(7);
  338. BEGIN
  339. ITEM TEXT$WDS C(00,00,60);
  340. ITEM TEXT$ALL C(00,00,40);
  341. ITEM TEXT$ZER U(06,00,60) = [0];
  342. END
  343.  
  344. #
  345. * ARRAY TO SET UP MESSAGES FOR DAYFILES.
  346. #
  347.  
  348. ARRAY DAYTEXT [0:0] S(5);
  349. BEGIN
  350. ITEM DAYT$ALL C(00,00,40);
  351. ITEM DAYT$ZER C(04,00,60) = [0];
  352. END
  353.  
  354. CONTROL EJECT;
  355.  
  356. #
  357. * CALL *KINPUT* IF THERE IS A RESPONSE IN THE KEYBOARD BUFFER.
  358. #
  359.  
  360. IF KB$CLEAR[0] NQ 0
  361. THEN
  362. BEGIN
  363. KINPUT;
  364. END
  365.  
  366. #
  367. * REFRESH *SM* DISPLAY.
  368. #
  369.  
  370. IF KSMDISP # SM DISPLAY IN BUFFER #
  371. AND KLINKQ EQ 0 # NO MESSAGES TO DISPLAY #
  372. THEN # *SM* DISPLAY CAN BE REFRESHED #
  373. BEGIN # SM #
  374. IF KL$COMP[0]
  375. THEN # SM DISPLAY ON SCREEN #
  376. BEGIN # UPDATE #
  377. KDSM; # REFRESH SM DISPLAY #
  378. END # UPDATE #
  379.  
  380. RETURN; # DO NOT DISPLAY MESSAGES #
  381. END # SM #
  382.  
  383. #
  384. * PROCESS ALL POSSIBLE MESSAGES FOR THE LEFT SCREEN.
  385. #
  386.  
  387. IF KSMDISP
  388. THEN # SM DISPLAY IN BUFFER #
  389. BEGIN # CLEAR #
  390. SLOWFOR I = (LF$TITLEDIS+1) STEP 1 UNTIL (LF$VALCMD-1)
  391. DO # CLEAR BUFFER FOR MESSAGES #
  392. BEGIN # BLANK #
  393. KL$LINE[I] = " ";
  394. END # BLANK #
  395.  
  396. KSMDISP = FALSE; # NOTE SM DISPLAY NO LONGER UP #
  397. END # CLEAR #
  398.  
  399. REPEAT
  400. DO
  401. BEGIN # PROCESS LEFT SCREEN DISPLAYS #
  402.  
  403. #
  404. * RETURN IF THERE IS NO AVAILABLE SPACE ON THE LEFT SCREEN.
  405. #
  406.  
  407. IF KACTCOUNT EQ KORD
  408. THEN
  409. BEGIN
  410. RETURN;
  411. END
  412.  
  413. #
  414. * SEARCH THE K-QUEUE TO FIND A NEW REQUEST.
  415. * SETS - *CURRKW* = *KWORD* ADDRESS OR ZERO (IF END OF THE QUEUE).
  416. #
  417.  
  418. CURRKW = KLINKQ;
  419. P<KWORD> = CURRKW;
  420. REPEAT WHILE CURRKW NQ 0 AND KW$ACT[0]
  421. DO
  422. BEGIN
  423. CURRKW = KW$LINK[0];
  424. P<KWORD> = CURRKW;
  425. END
  426.  
  427. #
  428. * RETURN IF THERE IS NO NEW REQUEST.
  429. #
  430.  
  431. IF CURRKW EQ 0
  432. THEN
  433. BEGIN
  434. KNEWREQ = FALSE;
  435. RETURN; # NO NEW REQUEST #
  436. END
  437.  
  438. #
  439. * LOCATE THE ORDINAL FOR AVAILABLE SPACE ON THE LEFT SCREEN.
  440. #
  441.  
  442. FASTFOR I = KORD STEP -1 UNTIL 1
  443. DO
  444. BEGIN
  445. IF KCUR$WD[I] EQ 0
  446. THEN
  447. BEGIN
  448. CURRORD = I;
  449. END
  450.  
  451. END
  452.  
  453. #
  454. * BUILD THE LINES FOR THE LEFT SCREEN BODY.
  455. #
  456.  
  457. P<KLBODY> = LOC(KL$LINE[LF$BODY]);
  458. TEMP = XCOD(CURRORD);
  459. C<5,1>DSPLORD = C<9,1>TEMP;
  460. KLB$ORD[1,CURRORD] = DSPLORD;
  461.  
  462. FOR LINE = 1 STEP 1 UNTIL 3
  463. DO
  464. BEGIN # BUILD DISPLAY LINE #
  465. MSGORD = KW$MSGORD(LINE); # GET MESSAGE ORDINAL #
  466. IF MSGORD EQ 0
  467. THEN # NO MESSAGE FOR THIS LINE #
  468. BEGIN
  469. TEST LINE;
  470. END
  471.  
  472. TEXT$WDS[0] = KM$TEXT[MSGORD]; # GET MESSAGE TEXT #
  473. KPFILL(TEXT[0],LOC(KW$PAR[0])); # SET PARAMETERS #
  474. KLB$TEXT[LINE,CURRORD] = TEXT$WDS[0]; # TEXT TO LEFT SCREEN
  475.   #
  476. IF KW$DF[0]
  477. THEN # TEXT TO DAYFILE #
  478. BEGIN
  479. DAYT$ALL[0] = TEXT$ALL[0]; # SEND FEWER CHARACTERS #
  480. MESSAGE(DAYTEXT,UDFL1);
  481. END
  482.  
  483. IF KW$ELOG[0]
  484. THEN # TEXT TO ERROR LOG #
  485. BEGIN
  486. DAYT$ALL[0] = TEXT$ALL[0]; # SEND FEWER CHARACTERS #
  487. MESSAGE(DAYTEXT,ERRLOG);
  488. END
  489.  
  490. END # BUILD DISPLAY LINE #
  491.  
  492. #
  493. * SET *KWORD* ACTIVE AND SET *KCURRENT* FOR THE ORDINAL.
  494. #
  495.  
  496. KW$ACT[0] = TRUE; # ACTIVE FLAG #
  497. KCUR$CW[CURRORD] = KW$CW[0]; # CONTROL FLAGS #
  498. KCUR$ADDR[CURRORD] = CURRKW; # *KWORD* ADDRESS #
  499. KACTCOUNT = KACTCOUNT + 1; # ACTIVE COUNTER #
  500.  
  501. #
  502. * IF THE REQUEST SPECIFIED AN *IMMEDIATE-COMPLETE*, SET THE
  503. * *KWORD* COMPLETE AND DELINK IT. THE CONTROL FLAGS
  504. * REMAIN IN *KCURRENT* TO KEEP THAT ORDINAL MARKED ACTIVE,
  505. * AND THE MESSAGES (LINE 1-3) REMAIN UP.
  506. #
  507.  
  508. IF KW$IC[0]
  509. THEN
  510. BEGIN
  511. KW$COMP[0] = TRUE; # COMPLETE #
  512. KCUR$ADDR[CURRORD] = 0; # CLEAR *KWORD* ADDRESS #
  513. KREQ(CURRKW,KDELINK); # DELINK FROM *K* QUEUE #
  514. END
  515.  
  516. END # PROCESS LEFT SCREEN DISPLAYS #
  517.  
  518. END # KDISPLY #
  519.  
  520. TERM
  521. PROC KDSM;
  522.  
  523. # TITLE KDSM - DISPLAY *SM* INFORMATION ON *K* DISPLAY. #
  524.  
  525.  
  526. BEGIN # KDSM#
  527.  
  528. #
  529. ** KDSM - PAINT *SM* INFORMATION ON K-DISPLAY.
  530. *
  531. * *KDSM* DISPLAYS STORAGE MODULE INFORMATION FROM THE UDT ON THE
  532. * K-DISPLAY IN RESPONSE TO AN *SMI* COMMAND INPUT FROM THE
  533. * KEYBOARD.
  534. *
  535. * PROC KDSM
  536. *
  537. * ENTRY ARRAY KBINPUT (DEFINED IN *COMBKDD*) CONTAINS THE
  538. * IMAGE OF THE *SMI* COMMAND.
  539. *
  540. * EXIT *SM* PORTION OF *K* DISPLAY HAS BEEN UPDATED.
  541. *
  542. * MESSAGES
  543. *
  544. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  545. * 1 2 3 4 5 6 7
  546. *1234567890123456789012345678901234567890123456789012345678901234567890
  547. * - MSE SUBSYSTEM - 1
  548. * - OPEN STAGE RTRQ= 0 OPEN DESTAGE- 2
  549. * 3
  550. * 4
  551. * SMI STATUS ON 5
  552. * X MAX DRDS FOR STAGING 6
  553. * Y MAX DRDS FOR DESTAGING 7
  554. * 8
  555. * JSN FILE UI PRU-S 9
  556. * DRD0 STAGE - WXYZ FILENAM USRIDX PRUCNT 10
  557. * DRD1 DESTAGE - ABCD FILENAM USRIDX PRUCNT 11
  558. * 12
  559. * 13
  560. * VALID COMMANDS 14
  561. * K.X.GO. CLEARS ORDINAL *X* 15
  562. * K.STAGE OR K.DESTAGE TOGGLES OPEN/CLOSE 16
  563. * K.SMI SELECTS SM *I* INFORMATION 17
  564. * K.SMI,DRD=ST=X SETS MAX *X* STAGE DRDS 18
  565. * K.SMI,DRD=DS=Y SETS MAX *Y* DESTAGE DRDS 19
  566. *
  567. *
  568. *
  569. *
  570. #
  571.  
  572.  
  573. #
  574. **** PROC KDSM - XREF LIST BEGIN.
  575. #
  576.  
  577. XREF
  578. BEGIN
  579. PROC KPFILL; # *K* PARAMTER FILL #
  580. PROC ZFILL; # ZERO-FILL PARAMETER BLOCK #
  581. END
  582.  
  583. #
  584. **** PROC KDSM - XREF LIST END.
  585. #
  586.  
  587. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  588. *CALL COMBFAS
  589. *CALL COMBCPR
  590. *CALL COMBFET
  591. *CALL COMBHFC
  592. *CALL COMBKDA
  593. *CALL COMBKDD
  594. *CALL COMBLRQ
  595. *CALL COMBUCR
  596. *CALL COMBTDM
  597. *CALL COMBUDT
  598. *CALL COMXCTF
  599. *CALL COMXHLR
  600. *CALL COMXIPR
  601. *CALL COMXLTC
  602. *CALL COMXMSC
  603.  
  604. ITEM INTSM I; # INTEGER SM ID #
  605.  
  606. #
  607. * ARRAY TO HOLD MESSAGE TEXT FOR LEFT SCREEN LINE.
  608. #
  609.  
  610. ARRAY TEXT [0:0] S(7); # HOLDS MESSAGE FOR LEFT SCREEN #
  611. BEGIN
  612. ITEM TEXT$WDS C(00,00,60);
  613. ITEM TEXT$ZER C(06,00,60) = [0]; # ZERO-BYTE TERMINATOR #
  614. END
  615.  
  616. #
  617. * ARRAY TO BUFFER JSN HEADER TO STOP FLICKER.
  618. #
  619.  
  620. ARRAY HEADERBUF [0:0] S(6); # HOLDS BLANKS OR HEADER #
  621. BEGIN
  622. ITEM HB$LINE C(00,00,52);
  623. END
  624.  
  625. CONTROL EJECT;
  626.  
  627. ZFILL(KSMPARMS,SMPARMLEN); # CLEAR SM PARAMETER BLOCK #
  628. KSMDISP = TRUE; # CONSIDER SM DISPLAY IN BUFFER #
  629.  
  630. #
  631. * BUILD *KSM1* MESSAGE LINE (LINE 5 IN K-DISPLAY SHOWN ABOVE)
  632. * TO REFLECT THE STATUS OF THE SM.
  633. *
  634. * THE SM MAY BE ON, OFF, OR IN MAINTENANCE MODE.
  635. #
  636.  
  637. P<KWORD> = LOC(KSM$WORD[0]) - 1; # POINT TO PARAMETER BLOCK #
  638. KP$SM = KSMID; # SET SM IDENTIFIER #
  639. KP$NF = "OFF "; # DEFAULT SM STATUS #
  640. KP$MA = " "; # IN CASE "E" FROM "MAINT" #
  641. INTSM = KUDTIND; # SET UDT INDEX FOR PROCESSING #
  642. IF SM$ON[INTSM] ##
  643. AND NOT SM$ON$ACK[INTSM] # NOT CHANGING STATUS #
  644. THEN # SM MAY BE ON #
  645. BEGIN # CHECK #
  646. IF NOT INITIALIZE
  647. THEN # SM IS ON AND IDLE #
  648. BEGIN # ON #
  649. KP$NF = "ON ";
  650. END # ON #
  651.  
  652. ELSE # SM MAY NOT YET BE ON #
  653. BEGIN # INIT #
  654. IF SM$CUO0[INTSM] NQ 0
  655. THEN # FIRST CU CONNECTED TO SM #
  656. BEGIN # 1ST #
  657. P<UDT$MSG> = LOC(UD$MSG[SM$CUO0[INTSM]]);
  658. IF MS$MSG[0] GQ HFC$CHSCIF ##
  659. AND MS$MSG[0] LQ HFC$CHSDIO
  660. THEN # SM TURNED ON IN INIT #
  661. BEGIN # ON #
  662. KP$NF = "ON ";
  663. END # ON #
  664.  
  665. END # 1ST #
  666.  
  667. IF SM$CUO1[INTSM] NQ 0
  668. THEN # SECOND CU CONNECTED TO SM #
  669. BEGIN # 2ND #
  670. P<UDT$MSG> = LOC(UD$MSG[SM$CUO1[INTSM]]);
  671. IF MS$MSG[0] GQ HFC$CHSCIF ##
  672. AND MS$MSG[0] LQ HFC$CHSDIO
  673. THEN # SM TURNED ON IN INIT #
  674. BEGIN # ON #
  675. KP$NF = "ON ";
  676. END # ON #
  677.  
  678. END # 2ND #
  679.  
  680. END # INIT #
  681.  
  682. END # CHECK #
  683.  
  684. IF SM$DIAG[INTSM] ##
  685. AND NOT SM$DAG$ACK[INTSM] # NOT CHANGING STATUS #
  686. THEN # SM IS IN MAINTENANCE MODE #
  687. BEGIN # MAINT #
  688. KP$NF = "MAINTENANC";
  689. KP$MA = "E"; # REQUIRES 2 PARAMETERS #
  690. END # MAINT #
  691.  
  692. TEXT$WDS[0] = KSM1;
  693. KPFILL(TEXT[0], LOC(KSM$WORD[0]));
  694. KL$LINE[LF$SMINFO] = TEXT$WDS[0]; # MSG --> DISPLAY BUFFER #
  695.  
  696. #
  697. * BUILD *KSM2* AND *KSM3* MESSAGES (LINES 6 AND 7 IN K-DISPLAY)
  698. #
  699.  
  700. KP$ND = SM$STNUM[INTSM];
  701. TEXT$WDS[0] = KSM2;
  702. KPFILL(TEXT[0], LOC(KSM$WORD[0]));
  703. KL$LINE[LF$SMINFO+1] = TEXT$WDS[0]; # MSG --> DISPLAY BUFFER#
  704.  
  705. KP$ND = SM$DSNUM[INTSM];
  706. TEXT$WDS[0] = KSM3;
  707. KPFILL(TEXT[0], LOC(KSM$WORD[0]));
  708. KL$LINE[LF$SMINFO+2] = TEXT$WDS[0]; # MSG --> DISPLAY BUFFER#
  709.  
  710. KL$LINE[LF$SMINFO+3] = " "; # BLANK LINE --> BUFFER #
  711. HB$LINE[0] = " "; # ASSUME NO STAGING OR DESTAGING #
  712.  
  713. #
  714. * BUILD TEXT LINE TO REFLECT STATUS OF UPPER DRD.
  715. *
  716. * THE DRD MAY BE OFF, IDLE, ACTIVE WITH A STAGE OR DESTAGE,
  717. * IN USE BY A UTILITY, OR IN MAINTENANCE MODE.
  718. *
  719. * IF ACTIVE, PROCESSING INFORMATION SUCH AS FILE NAME, PRU COUNT,
  720. * USER INDEX, AND JOB NAME, IS RETRIEVED FROM THE HLRQ,
  721. * TDAM ENTRY, AND DISK FET.
  722. #
  723.  
  724. KP$DD = D0$SUN[INTSM]; # SET DRD NUMBER FOR NEXT MESSAGE #
  725. IF D0$ON$ACK[INTSM] # DRD CHANGING STATUS #
  726. OR D0$LLADR[INTSM] EQ 0 # DRD NOT YET ACCESSED #
  727. OR NOT D0$ON[INTSM]
  728. THEN # DRD IS OFF OR IN MAINT MODE #
  729. BEGIN # NOT ON #
  730. IF D0$DIAG[INTSM] ##
  731. AND NOT D0$DAG$ACK[INTSM]
  732. THEN # DRD IN MAINTENANCE MODE #
  733. BEGIN # MAINT #
  734. TEXT$WDS[0] = KSM10;
  735. END # MAINT #
  736.  
  737. ELSE # DRD IS OFF #
  738. BEGIN # OFF #
  739. TEXT$WDS[0] = KSM8;
  740. END # OFF #
  741.  
  742. END # NOT ON #
  743.  
  744. ELSE
  745. BEGIN # DRD0 IS ON #
  746. P<LLRQ> = D0$LLADR[INTSM];
  747. IF LLR$PRCNME[0] EQ REQTYP4"INITHW" # DRD TURNING ON #
  748. OR LLR$RQI[0] EQ REQNAME"RQIAUCP" # ABORTED UCP #
  749. OR NOT D0$FULL[INTSM]
  750. THEN # DRD NOT IN USE #
  751. BEGIN # DRD0 IS IDLE #
  752. TEXT$WDS[0] = KSM9;
  753. END
  754.  
  755. ELSE
  756. BEGIN # DRD0 IS ACTIVE - BUILD STATUS LINE #
  757. IF LLR$RQI[0] NQ REQNAME"RQIINT" # NOT STAGE OR DESTAGE #
  758. THEN
  759. BEGIN # DRD0 PROCESSING UTILITY REQUEST #
  760. TEXT$WDS[0] = KSM7;
  761. END
  762.  
  763. ELSE # DRD0 PROCESSING STAGE/DESTAGE REQUEST #
  764. BEGIN # GET HLRQ AND TDAM VALUES FOR K-DISPLAY#
  765. HB$LINE[0] = KSM4; # MOVE HEADER TO BUFFER #
  766. P<HLRQ> = LLR$UCPRA;
  767. P<TDAM> = LOC(HLR$TDAM);
  768. P<FETSET> = LLR$DSKFET[0];
  769. KP$FN = TDAMPFN;
  770. KP$UI = TDAMUI;
  771. IF HLR$HPN EQ HLRPN"STAGE"
  772. THEN
  773. BEGIN # STAGE MESSAGE NEEDED #
  774. TEXT$WDS[0] = KSM5;
  775. KP$PU = FET$CRI[0] + HLR$PRU[0]; # STAGING DIFFERENT #
  776. KP$JN = TDAMJSN;
  777. END
  778.  
  779. ELSE
  780. BEGIN # DESTAGE MESSAGE NEEDED #
  781. TEXT$WDS[0] = KSM6;
  782. KP$PU = FET$CRI[0];
  783. KP$JN = LTC$SFJBSN[DSC$LTCT];
  784. END
  785.  
  786. IF P<FETSET> EQ 0
  787. THEN # GET SAVED PRU COUNT #
  788. BEGIN # SAVED #
  789. KP$PU = HLR$PRU[0];
  790. END # SAVED #
  791.  
  792. END # GET HLRQ AND TDAM VALUES FOR K-DISPLAY #
  793.  
  794. END # DRD0 IS ACTIVE - BUILD STATUS LINE #
  795.  
  796. END # DRD0 IS ON #
  797.  
  798. KPFILL(TEXT[0],LOC(KSM$WORD[0]));
  799. KL$LINE[LF$SMDRD0] = TEXT$WDS[0];
  800.  
  801. #
  802. * BUILD TEXT LINE TO REFLECT STATUS OF LOWER DRD.
  803. *
  804. #
  805.  
  806. KP$DD = D1$SUN[INTSM]; # SET DRD NUMBER FOR NEXT MESSAGE #
  807. IF D1$ON$ACK[INTSM] # DRD CHANGING STATUS #
  808. OR D1$LLADR[INTSM] EQ 0 # DRD NOT YET ACCESSED #
  809. OR NOT D1$ON[INTSM]
  810. THEN # DRD IS OFF OR IN MAINT MODE #
  811. BEGIN # NOT ON #
  812. IF D1$DIAG[INTSM] ##
  813. AND NOT D1$DAG$ACK[INTSM]
  814. THEN # DRD IN MAINTENANCE MODE #
  815. BEGIN # MAINT #
  816. TEXT$WDS[0] = KSM10;
  817. END # MAINT #
  818.  
  819. ELSE # DRD IS OFF #
  820. BEGIN # OFF #
  821. TEXT$WDS[0] = KSM8;
  822. END # OFF #
  823.  
  824. END # NOT ON #
  825.  
  826. ELSE
  827. BEGIN # DRD1 IS ON #
  828. P<LLRQ> = D1$LLADR[INTSM];
  829. IF LLR$PRCNME[0] EQ REQTYP4"INITHW" # DRD TURNING ON #
  830. OR LLR$RQI[0] EQ REQNAME"RQIAUCP" # ABORTED UCP #
  831. OR NOT D1$FULL[INTSM]
  832. THEN # DRD NOT IN USE #
  833. BEGIN # DRD1 IS IDLE #
  834. TEXT$WDS[0] = KSM9;
  835. END
  836.  
  837. ELSE
  838. BEGIN # DRD1 IS ACTIVE - BUILD STATUS LINE #
  839. IF LLR$RQI[0] NQ REQNAME"RQIINT" # NOT STAGE OR DESTAGE #
  840. THEN
  841. BEGIN # DRD1 PROCESSING UTILITY REQUEST #
  842. TEXT$WDS[0] = KSM7;
  843. END
  844.  
  845. ELSE # DRD1 PROCESSING STAGE/DESTAGE REQUEST #
  846. BEGIN # GET HLRQ AND TDAM VALUES FOR K-DISPLAY#
  847. HB$LINE[0] = KSM4; # MOVE HEADER TO BUFFER #
  848. P<HLRQ> = LLR$UCPRA;
  849. P<TDAM> = LOC(HLR$TDAM);
  850. P<FETSET> = LLR$DSKFET[0];
  851. KP$FN = TDAMPFN;
  852. KP$UI = TDAMUI;
  853. IF HLR$HPN EQ HLRPN"STAGE"
  854. THEN
  855. BEGIN # STAGE MESSAGE NEEDED #
  856. TEXT$WDS[0] = KSM5;
  857. KP$PU = FET$CRI[0] + HLR$PRU[0]; # STAGING DIFFERENT #
  858. KP$JN = TDAMJSN;
  859. END
  860.  
  861. ELSE
  862. BEGIN # DESTAGE MESSAGE NEEDED #
  863. TEXT$WDS[0] = KSM6;
  864. KP$PU = FET$CRI[0];
  865. KP$JN = LTC$SFJBSN[DSC$LTCT];
  866. END
  867.  
  868. IF P<FETSET> EQ 0
  869. THEN # GET SAVED PRU COUNT #
  870. BEGIN # SAVED #
  871. KP$PU = HLR$PRU[0];
  872. END # SAVED #
  873.  
  874. END # GET HLRQ AND TDAM VALUES FOR K-DISPLAY #
  875.  
  876. END # DRD1 IS ACTIVE - BUILD STATUS LINE #
  877.  
  878. END # DRD1 IS ON #
  879.  
  880. KPFILL(TEXT[0],LOC(KSM$WORD[0]));
  881. KL$LINE[LF$SMDRD1] = TEXT$WDS[0];
  882. KL$LINE[LF$SMINFO+4] = HB$LINE[0]; # DISPLAY BUFFER CONTENTS #
  883. RETURN;
  884.  
  885. END # KDSM #
  886.  
  887. TERM
  888. PROC KFILES(REJECT);
  889.  
  890. # TITLE KFILES - PROCESS *K* DISPLAY *FILES* COMMAND. #
  891.  
  892. BEGIN # KFILES #
  893.  
  894. #
  895. ** KFILES - PROCESS *K* DISPLAY *FILES* COMMAND.
  896. *
  897. * *KFILES* PROCESSES THE OPERATOR COMMAND, *FILES,N*, WHERE
  898. * *N* IS THE REQUESTED NUMBER OF LARGE STREAMING BUFFERS TO
  899. * BE AUTHORIZED.
  900. *
  901. * PROC KFILES(REJECT)
  902. *
  903. * ENTRY ARRAY KBINPUT (DEFINED IN *COMBKDA*) CONTAINS THE
  904. * IMAGE OF THE *FILES* REQUEST.
  905. *
  906. * EXIT (REJECT) - REJECT OPERATOR RESPONSE FLAG.
  907. * = TRUE, INCORRECT REPONSE OR COMMAND.
  908. * = FALSE, VALID RESPONSE OR COMMAND.
  909. *
  910. * MESSAGES * VALUE OF X USED ON *FILES* COMMAND.*.
  911. * (DISPLAYED ON *K* DISPLAY REJECT LINE, IF THE
  912. * ORDINAL SPECIFIED WAS OUT OF RANGE AND A VALUE
  913. * OF *X* WAS ASSUMED.)
  914. #
  915.  
  916. ITEM REJECT B; # REJECT OPERATOR RESPONSE FLAG #
  917.  
  918. #
  919. **** PROC KFILES - XREF LIST BEGIN.
  920. #
  921.  
  922. XREF
  923. BEGIN
  924. FUNC XCDD I; # CONVERT TO DECIMAL DISPLAY #
  925. FUNC XDXB I; # CONVERT DISPLAY TO INTEGER #
  926. END
  927.  
  928. #
  929. **** PROC KFILES - XREF LIST END.
  930. #
  931.  
  932. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  933. *CALL COMBFAS
  934. *CALL COMBKDA
  935. *CALL COMBKDD
  936. *CALL COMBUDT
  937. *CALL COMXBST
  938. *CALL COMXCTF
  939.  
  940. ITEM I U; # INDUCTION VARIABLE #
  941. ITEM ORDINAL I; # REQUESTED *FILES* ORDINAL #
  942. ITEM STAT I; # CONVERSION STATUS VALUE #
  943.  
  944. ARRAY MSG [0:0] S(4); # HOLDS INFORMATIVE MESSAGE #
  945. BEGIN
  946. ITEM MSG$LINE C(00,00,40) # FULL MESSAGE LINE #
  947. = [" VALUE OF X USED ON *FILES* COMMAND."];
  948. ITEM MSG$ORD C(01,00,01); # ORDINAL DISPLAYED #
  949. END
  950.  
  951. CONTROL EJECT;
  952.  
  953. #
  954. * CHECK FOR VALID NUMERIC ORDINAL.
  955. #
  956.  
  957. REJECT = FALSE;
  958. STAT = XDXB(KB$FILEORD[0],1,ORDINAL);
  959. IF STAT NQ 0
  960. THEN
  961. BEGIN
  962. REJECT = TRUE;
  963. RETURN;
  964. END
  965.  
  966. #
  967. * CHECK FOR AN OUT OF RANGE ORDINAL. IF THE SPECIFIED ORDINAL
  968. * IS LESS THAN 1, ASSUME 1. IF IT IS GREATER THAN THE NUMBER
  969. * OF *MASSTOR CONTROLLERS* TIMES CHANNELS ON EACH CONTROLLER,
  970. * A VALUE OF *MAX$ACHN* IS USED.
  971. #
  972.  
  973. IF ORDINAL LS 1
  974. THEN # USE MINIMUM VALUE #
  975. BEGIN
  976. ORDINAL = 1;
  977. MSG$ORD[0] = "1";
  978. KL$LINE[LF$KBREJ] = MSG$LINE[0]; # INFORMATIVE MESSAGE #
  979. END
  980.  
  981. IF ORDINAL GR MAX$ACHN
  982. THEN # USE MAXIMUM VALUE #
  983. BEGIN
  984. ORDINAL = MAX$ACHN;
  985. MSG$ORD[0] = XCDD(MAX$ACHN);
  986. KL$LINE[LF$KBREJ] = MSG$LINE[0]; # INFORMATIVE MESSAGE #
  987. END
  988.  
  989. #
  990. * CHANGE THE NUMBER OF AUTHORIZED BUFFERS, AS REQUIRED, SO THAT
  991. * *ORDINAL* BUFFERS ARE NOW AUTHORIZED.
  992. #
  993.  
  994. FASTFOR I = 1 STEP 1 UNTIL BSTL
  995. DO
  996. BEGIN
  997. BST$AUTH[I] = I LQ ORDINAL;
  998. END
  999.  
  1000. END # KFILES #
  1001.  
  1002. TERM
  1003. PROC KINIT;
  1004.  
  1005. # TITLE KINIT - *K* DISPLAY INITIALIZATION. #
  1006.  
  1007. BEGIN # KINIT #
  1008.  
  1009. #
  1010. ** KINIT - *K* DISPLAY INTIALIZATION.
  1011. *
  1012. * *KINIT* ISSUES THE *CONSOLE* MACRO TO ACTIVATE THE
  1013. * *K* DISPLAY AND INITIALIZES THE *K* DISPLAY BUFFERS.
  1014. *
  1015. * PROC KINIT.
  1016. *
  1017. * EXIT THE *CONSOLE* MACRO IS ISSUED.
  1018. * THE TITLE IS PLACED IN THE LEFT SCREEN BUFFER.
  1019. * THE *B* DISPLAY LINE 2 IS CLEARED.
  1020. *
  1021. * MESSAGES * REQUEST *K* DISPLAY * (FROM *CONSOLE* MACRO).
  1022. *
  1023. * NOTES CLEARS LINE 2 OF THE *B* DISPLAY AFTER ISSUING
  1024. * THE *CONSOLE* MACRO TO ERASE THE "REQUEST *K* DISPLAY"
  1025. * MESSAGE. THE *KPROC* AND *KREQ* ROUTINES ISSUE THE
  1026. * REQUEST-K MESSAGE AS NEEDED.
  1027. #
  1028.  
  1029. #
  1030. **** PROC KINIT - XREF LIST BEGIN.
  1031. #
  1032.  
  1033. XREF
  1034. BEGIN
  1035. PROC CONSOLE; # ISSUE *CONSOLE* MACRO #
  1036. PROC MESSAGE; # ISSUE *MESSAGE* MACRO #
  1037. END
  1038.  
  1039. #
  1040. **** PROC KINIT - XREF LIST END.
  1041. #
  1042.  
  1043. DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
  1044. *CALL COMBFAS
  1045. *CALL COMBKDA
  1046. *CALL COMBKDD
  1047.  
  1048. #
  1049. * CONSOLE MACRO PARAMETER ARRAY.
  1050. #
  1051.  
  1052. ARRAY CPARAM [0:0] S(1); # CONSOLE PARAMETER #
  1053. BEGIN
  1054. ITEM CP$KBADDR U(00,00,24); # KEYBOARD ADDRESS #
  1055. ITEM CP$KLADDR U(00,42,18); # LEFT SCREEN ADDRESS #
  1056. END
  1057.  
  1058. CONTROL EJECT;
  1059.  
  1060. #
  1061. * SET UP AND ISSUE THE CONSOLE MACRO.
  1062. #
  1063.  
  1064. CP$KBADDR[0] = LOC(KBINPUT[0]);
  1065. CP$KLADDR[0] = LOC(KLEFTSCRN[0]);
  1066. CONSOLE(CPARAM[0]);
  1067.  
  1068. #
  1069. * CLEAR REQUEST-K MESSAGE ON *B* DISPLAY.
  1070. #
  1071.  
  1072. MESSAGE(BZEROES,LINE2);
  1073. KL$COMP[0] = FALSE;
  1074. KREQCLEAR = TRUE;
  1075.  
  1076. #
  1077. * SET UP TITLE LINE IN LEFT SCREEN BUFFER.
  1078. #
  1079.  
  1080. KL$LINE[LF$TITLE] = TITLELINE;
  1081. KL$LINE[LF$TITLEDIS] = DISPSIT;
  1082.  
  1083. #
  1084. * SET UP *VALID COMMANDS* MENU IN LEFT SCREEN BUFFER.
  1085. #
  1086. KL$LINE[LF$VALCMD] = VALIDCMD;
  1087. KL$LINE[LF$VALCMD+1] = KXGOLINE;
  1088. KL$LINE[LF$VALCMD+2] = STDSLINE;
  1089.  
  1090. KL$LINE[LF$VALCMD+3] = SMLINE;
  1091. KL$LINE[LF$VALCMD+4] = STLINE;
  1092. KL$LINE[LF$VALCMD+5] = DSLINE;
  1093.  
  1094. KSMDISP = FALSE; # *SM* DISPLAY NOT ON LEFT SCREEN #
  1095. KSMID = "A"; # PRESET DEFAULT FOR SM DISPLAY #
  1096. END # KINIT #
  1097.  
  1098. TERM
  1099. PROC KINPUT;
  1100.  
  1101. # TITLE KINPUT - KEYBOARD INPUT. #
  1102.  
  1103. BEGIN # KINPUT #
  1104.  
  1105. #
  1106. ** KINPUT - KEYBOARD INPUT.
  1107. *
  1108. * *KINPUT* PROCESSES THE OPERATOR RESPONSES OR COMMANDS.
  1109. *
  1110. * PROC KINPUT.
  1111. *
  1112. * ENTRY ARRAY KBINPUT - KEYBOARD BUFFER.
  1113. *
  1114. * EXIT FOR A VALID OPERATOR RESPONSE -
  1115. * THE *KWORD* REQUEST (IF IT IS STILL AVAILABLE)
  1116. * IS COMPLETED AND DELINKED.
  1117. * THE LEFT SCREEN AREA FOR THE RESPONSE IS CLEARED.
  1118. *
  1119. * FOR A VALID OPERATOR COMMAND -
  1120. * THE DEFINED PROCESSING IS DONE.
  1121. *
  1122. * FOR AN INCORRECT OPERATOR TYPE-IN -
  1123. * THE TYPE-IN IS DISPLAYED IN THE ECHO LINE OF THE
  1124. * LEFT SCREEN.
  1125. * THE *** REJECT *** IS DISPLAYED IN THE REJECT LINE.
  1126. *
  1127. * ARRAY KBINPUT - KEYBOARD BUFFER CLEARED.
  1128. *
  1129. * NOTES RESPONSES ARE IN THE FORM - N.WORD
  1130. * WHERE N IS AN ORDINAL ON THE LEFT SCREEN,
  1131. * AND WORD IS *GO* OR *DROP*.
  1132. *
  1133. * COMMANDS ARE - *FILES,NN*.
  1134. *
  1135. * A BLANK IS ACCEPTED AND CLEARS ANY OUTSTANDING
  1136. * REJECT MESSAGE.
  1137. #
  1138.  
  1139. #
  1140. **** PROC KINPUT - XREF LIST BEGIN.
  1141. #
  1142.  
  1143. XREF
  1144. BEGIN
  1145. PROC ADD$LNK; # ADD ENTRY TO LINK #
  1146. PROC DEL$LNK; # DELETE ENTRY FROM LINK #
  1147. PROC KCLR; # CLEAR CURRENT REQUEST #
  1148. PROC KFILES; # PROCESS *FILES* COMMAND #
  1149. PROC KREQ; # *K* DISPLAY REQUEST #
  1150. PROC KSM; # PROCESS *SMI* COMMAND #
  1151. FUNC XDXB I; # CONVERT DISPLAY CODE TO INTEGER
  1152.   #
  1153. PROC ZFILL; # ZERO FILL BUFFER #
  1154. END
  1155.  
  1156. #
  1157. **** PROC KINPUT - XREF LIST END.
  1158. #
  1159.  
  1160. DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
  1161. *CALL COMBFAS
  1162. *CALL COMBCHN
  1163. *CALL COMBKDA
  1164. *CALL COMBKDD
  1165. *CALL COMBTDM
  1166. *CALL COMXCTF
  1167.  
  1168. ITEM CH I; # CHARACTER INDEX #
  1169. ITEM CHAR C(1); # CHARACTER #
  1170. ITEM COMMAND C(10); # OPERATOR COMMAND #
  1171. ITEM I I; # TEMPORARY CELL #
  1172. ITEM LINK U; # ADDRESS OF NEW CHAIN ENTRY #
  1173. ITEM ORD I; # ORDINAL #
  1174. ITEM REJECT B; # REJECT RESPONSE FLAG #
  1175. ITEM RTDADR U; # *RTRQ* ADDRESS #
  1176.  
  1177. CONTROL EJECT;
  1178.  
  1179. KL$LINE[LF$KBREJ] = " "; # CLEAR REJECT LINE #
  1180. KL$LINE[LF$KBECHO] = " "; # CLEAR ECHO LINE #
  1181.  
  1182. #
  1183. * CRACK THE KEYBOARD INPUT. DETERMINE IF INPUT IS -
  1184. * . AN OPERATOR RESPONSE - N.COMMAND.
  1185. * . AN OPERATOR COMMAND - COMMAND,PARAMETER.
  1186. #
  1187.  
  1188. REJECT = FALSE; # INITIALIZE #
  1189. COMMAND = " ";
  1190. CH = 0;
  1191.  
  1192. CHAR = C<0,1>KB$SCAN[0]; # GET FIRST CHARACTER #
  1193. I = XDXB(CHAR,0,ORD);
  1194. IF I EQ 0 AND ORD GQ 1 AND ORD LQ 9
  1195. THEN # ORDINAL #
  1196. BEGIN # CHECK ORDINAL #
  1197. IF C<1,1>KB$SCAN[0] NQ "."
  1198. THEN # NO PERIOD FOLLOWS #
  1199. BEGIN
  1200. ORD = 0; # REJECT THE ORDINAL #
  1201. END
  1202.  
  1203. IF ORD GR KORD
  1204. THEN # INCORRECT ORDINAL #
  1205. BEGIN
  1206. ORD = 0; # REJECT THE ORDINAL #
  1207. END
  1208.  
  1209. END # CHECK ORDINAL #
  1210.  
  1211. IF ORD NQ 0
  1212. THEN # ORDINAL DETECTED AND GOOD #
  1213. BEGIN
  1214. CH = 2; # ADVANCE SCAN PAST ORDINAL #
  1215. END
  1216.  
  1217. #
  1218. * GET COMMAND ( MAXIMUM OF 10 CHARACTERS ).
  1219. * SCAN TO FIRST NON-ALPHANUMERIC.
  1220. #
  1221.  
  1222. C<0,1>COMMAND = C<CH,1>KB$SCAN[0]; # PRESET WITH FIRST CHAR #
  1223. SLOWFOR I = 1 STEP 1 WHILE I LQ 9 ##
  1224. AND C<I+CH,1>KB$SCAN[0] GQ "A" # VALID CHARACTER FOUND #
  1225. AND C<I+CH,1>KB$SCAN[0] LQ "9"
  1226. DO
  1227. BEGIN
  1228. C<I,1>COMMAND = C<I+CH,1>KB$SCAN[0];
  1229. END
  1230.  
  1231. #
  1232. * PROCESS THE OPERATOR RESPONSE.
  1233. #
  1234.  
  1235. IF ORD NQ 0
  1236. THEN # FORM IS N.COMMAND #
  1237. BEGIN # PROCESS OPERATOR RESPONSE #
  1238.  
  1239. #
  1240. * GET *KCURRENT* FOR THE ORDINAL.
  1241. #
  1242.  
  1243. P<KWORD> = LOC(KCUR$WD[ORD]); # *KCURRENT* ENTRY #
  1244. IF KCUR$WD[ORD] EQ 0
  1245. THEN # NO REQUEST ACTIVE #
  1246. BEGIN
  1247. REJECT = TRUE; # REJECT RESPONSE #
  1248. END
  1249.  
  1250. IF KCUR$ADDR[ORD] NQ 0
  1251. THEN # PLACE REPLY IN *KWORD* OF THE
  1252.   CALLER #
  1253. BEGIN
  1254. P<KWORD> = KCUR$ADDR[ORD]; # *KWORD* REQUEST #
  1255. END
  1256.  
  1257. #
  1258. * COMMAND IS "GO" AND GO IS VALID.
  1259. #
  1260.  
  1261. IF COMMAND EQ "GO" AND KW$RPGO[0]
  1262. THEN
  1263. BEGIN
  1264. KW$OPGO[0] = TRUE;
  1265. END
  1266.  
  1267. #
  1268. * COMMAND IS "DROP" AND DROP IS VALID.
  1269. #
  1270.  
  1271. IF COMMAND EQ "DROP" AND KW$RPDROP[0]
  1272. THEN
  1273. BEGIN
  1274. KW$OPDROP[0] = TRUE;
  1275. END
  1276.  
  1277. #
  1278. * IF NO VALID RESPONSE, REJECT IT.
  1279. #
  1280.  
  1281. IF KW$OP[0] EQ 0
  1282. THEN
  1283. BEGIN
  1284. REJECT = TRUE; # REJECT #
  1285. END
  1286.  
  1287. #
  1288. * IF RESPONSE WAS VALID, CLEAR THE MESSAGES FOR THAT ORDINAL
  1289. * FROM THE LEFT SCREEN BUFFER AND DELINK THE REQUEST.
  1290. #
  1291.  
  1292. IF NOT REJECT
  1293. THEN
  1294. BEGIN
  1295. KCLR(ORD); # CLEAR FROM DISPLAY #
  1296.  
  1297. KREQ(P<KWORD>,KDELINK); # DELINK FROM QUEUE #
  1298. END
  1299.  
  1300. END # PROCESS OPERATOR RESPONSE #
  1301.  
  1302. #
  1303. * PROCESS THE OPERATOR COMMAND.
  1304. #
  1305.  
  1306. ELSE
  1307. BEGIN # PROCESS OPERATOR COMMAND #
  1308.  
  1309. REJECT = TRUE; # ASSUME WRONG #
  1310.  
  1311. #
  1312. * COMMAND IS "FILES".
  1313. #
  1314.  
  1315. IF COMMAND EQ "FILES"
  1316. THEN
  1317. BEGIN
  1318. KFILES(REJECT);
  1319. END
  1320. #
  1321. * COMMAND IS "SMI" OR
  1322. * "SMI,DRD=ST=N " OR
  1323. * "SMI,DRD=DS=N"
  1324. #
  1325.  
  1326. IF C<0,2>COMMAND EQ "SM"
  1327. THEN
  1328. BEGIN # PROCESS *SMI* COMMAND #
  1329. KSM(REJECT);
  1330. END
  1331.  
  1332. #
  1333. * COMMAND IS *STAGE* OR *DESTAGE*.
  1334. * TOGGLE DISPLAY AND SET FLAGS.
  1335. #
  1336.  
  1337. P<DISPOS> = LOC(KL$LINE[LF$TITLE + 1]);
  1338. IF COMMAND EQ "STAGE"
  1339. THEN
  1340. BEGIN
  1341. IF GLBSTFL
  1342. THEN
  1343. BEGIN
  1344. GLBSTFL = FALSE;
  1345. DISPOS$ST[0] = "CLOSE";
  1346. LINK = CHN$BOC[LCHN"RTD$ACT"];
  1347. REPEAT WHILE LINK NQ 0
  1348. DO
  1349. BEGIN # SEARCH *RTRQ* CHAIN #
  1350. P<TDAM> = LINK + 1;
  1351. RTDADR = LINK;
  1352. P<LINKWRD> = LINK;
  1353. LINK = LINK$ADR[0];
  1354.  
  1355. IF TDAMFC[0] EQ TDAMFCODE"STAGE"
  1356. THEN
  1357. BEGIN # REMOVE STAGE *RTRQ* ENTRY #
  1358. DEL$LNK(RTDADR,LCHN"RTD$ACT",0);
  1359. ZFILL(TDAM,TDAMLEN);
  1360. ADD$LNK(RTDADR,LCHN"RTD$FRSPC",0);
  1361. END
  1362. END # SEARCH *RTRQ* CHAIN #
  1363. RTRQ$CT = 0;
  1364. END
  1365.  
  1366. ELSE
  1367.  
  1368. BEGIN
  1369. GLBSTFL = TRUE;
  1370. DISPOS$ST[0] = " OPEN";
  1371. END
  1372.  
  1373. REJECT = FALSE;
  1374. END
  1375.  
  1376. IF COMMAND EQ "DESTAGE"
  1377. THEN
  1378. BEGIN
  1379. IF GLBDSFL
  1380. THEN
  1381. BEGIN
  1382. GLBDSFL = FALSE;
  1383. DISPOS$DT[0] = "CLOSE";
  1384. END
  1385.  
  1386. ELSE
  1387.  
  1388. BEGIN
  1389. GLBDSFL = TRUE;
  1390. DISPOS$DT[0] = " OPEN";
  1391. END
  1392.  
  1393. REJECT = FALSE;
  1394. END
  1395.  
  1396. #
  1397. * COMMAND IS BLANKS. ALLOWED TO CLEAR THE REJECT LINE (CLEAN UP).
  1398. #
  1399.  
  1400. IF COMMAND EQ " "
  1401. THEN # CLEAR #
  1402. BEGIN
  1403. REJECT = FALSE;
  1404. END
  1405.  
  1406. END # PROCESS OPERATOR COMMAND #
  1407.  
  1408.  
  1409. #
  1410. * IF RESPONSE WAS INCORRECT, ISSUE REJECT LINE.
  1411. #
  1412.  
  1413. IF REJECT
  1414. THEN # ISSUE REJECT #
  1415. BEGIN
  1416. KL$SUBL1[LF$KBREJ] = "*** REJECT ***";
  1417. KL$SUBL1[LF$KBECHO] = KB$SCAN[0]; # ISSUE ECHO #
  1418. END
  1419.  
  1420. KB$SCAN[0] = " "; # CLEAR KEYBOARD INPUT #
  1421. KB$CLEAR[0] = 0;
  1422. RETURN;
  1423. END # KINPUT #
  1424.  
  1425. TERM
  1426. PROC KPFILL(TEXT,(PADDR));
  1427.  
  1428. # TITLE KPFILL - *K* PARAMETER FILL ROUTINE. #
  1429.  
  1430. BEGIN # KPFILL #
  1431.  
  1432. #
  1433. ** KPFILL - PARAMETER FILL ROUTINE.
  1434. *
  1435. * *KPFILL* INSERTS DEFINED PARAMETERS INTO THE *K* DISPLAY TEXT.
  1436. *
  1437. * PROC KPFILL(TEXT,(PADDR))
  1438. *
  1439. * ENTRY (TEXT) - THE *K* DISPLAY TEXT TO SCAN.
  1440. * (PADDR) - ADDRESS OF THE PARAMETER VALUES.
  1441. *
  1442. * EXIT (TEXT) - THE TEXT WITH PARAMETERS INSERTED.
  1443. *
  1444. * NOTES THE MAXIMUM SIZE OF A RESULTANT PARAMETER TO INSERT
  1445. * IN THE TEXT IS 10 CHARACTERS.
  1446. * THE MAXIMUM SIZE OF THE SCANNED TEXT IS 60 CHARACTERS.
  1447. #
  1448.  
  1449. ITEM TEXT C(60); # TEXT #
  1450. ITEM PADDR I; # ADDRESS OF PARAMETER #
  1451.  
  1452. #
  1453. **** PROC KPFILL - XREF LIST BEGIN.
  1454. #
  1455.  
  1456. XREF
  1457. BEGIN
  1458. PROC BZFILL; # BLANK OR ZERO FILL #
  1459. FUNC XCDD C(10); # CONVERT TO DECIMAL DISPLAY #
  1460. FUNC XCOD C(10); # CONVERT TO OCTAL DISPLAY #
  1461. END
  1462.  
  1463. #
  1464. **** PROC KPFILL - XREF LIST END.
  1465. #
  1466.  
  1467. DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
  1468. *CALL COMBFAS
  1469. *CALL,COMBBZF
  1470. *CALL COMBKDD
  1471.  
  1472.  
  1473. ITEM CHAR C(1); # CHARACTER FIELD #
  1474. ITEM FR I; # FROM INDEX #
  1475. ITEM I I; # TEMPORARY #
  1476. ITEM PCODE C(2); # PARAMETER CODE #
  1477. ITEM PI I; # PARAMETER INDEX #
  1478. ITEM PRESULT C(10); # PARAMETER RESULT #
  1479. ITEM TCOPY C(60); # COPY OF TEXT #
  1480. ITEM TO I; # TO INDEX #
  1481.  
  1482.  
  1483. #
  1484. * PARAMETER WORK AREA.
  1485. #
  1486.  
  1487. ARRAY PARWK [0:0] S(1);
  1488. BEGIN
  1489. ITEM PFIELDI I(00,00,60); # PARAMETER DEFINED AS INTEGER #
  1490. ITEM PFIELDC C(00,00,10); # PARAMETER REDEFINED CHARACTER #
  1491. END
  1492.  
  1493.  
  1494. #
  1495. * TO ACCESS THE CALLERS PARAMETER WORD(S).
  1496. #
  1497.  
  1498. BASED
  1499. ARRAY PARAMETER [0:0] S(1);
  1500. BEGIN
  1501. ITEM PARAM$WD U(00,00,60);
  1502. END
  1503.  
  1504.  
  1505. #
  1506. * ARRAY OF DEFINED PARAMETERS FOR *K* DISPLAY MESSAGE TEXTS.
  1507. * PARAMETERS ARE DEFINED IN *COMBKDD*.
  1508. #
  1509.  
  1510. ARRAY KPAR [1:1] S(KPNUM);
  1511. BEGIN
  1512. ITEM P1 C(00,00,02) = [ P1C ];
  1513. ITEM P1FW U(00,12,06) = [ P1W ];
  1514. ITEM P1FB U(00,18,06) = [ P1B ];
  1515. ITEM P1FL U(00,24,06) = [ P1L ];
  1516. ITEM P1CT U(00,30,06) = [ P1T ];
  1517. ITEM P1TS U(00,36,06) = [ P1S ];
  1518.  
  1519. ITEM P2 C(01,00,02) = [ P2C ];
  1520. ITEM P2FW U(01,12,06) = [ P2W ];
  1521. ITEM P2FB U(01,18,06) = [ P2B ];
  1522. ITEM P2FL U(01,24,06) = [ P2L ];
  1523. ITEM P2CT U(01,30,06) = [ P2T ];
  1524. ITEM P2TS U(01,36,06) = [ P2S ];
  1525.  
  1526. ITEM P3 C(02,00,02) = [ P3C ];
  1527. ITEM P3FW U(02,12,06) = [ P3W ];
  1528. ITEM P3FB U(02,18,06) = [ P3B ];
  1529. ITEM P3FL U(02,24,06) = [ P3L ];
  1530. ITEM P3CT U(02,30,06) = [ P3T ];
  1531. ITEM P3TS U(02,36,06) = [ P3S ];
  1532.  
  1533. ITEM P4 C(03,00,02) = [ P4C ];
  1534. ITEM P4FW U(03,12,06) = [ P4W ];
  1535. ITEM P4FB U(03,18,06) = [ P4B ];
  1536. ITEM P4FL U(03,24,06) = [ P4L ];
  1537. ITEM P4CT U(03,30,06) = [ P4T ];
  1538. ITEM P4TS U(03,36,06) = [ P4S ];
  1539.  
  1540. ITEM P5 C(04,00,02) = [ P5C ];
  1541. ITEM P5FW U(04,12,06) = [ P5W ];
  1542. ITEM P5FB U(04,18,06) = [ P5B ];
  1543. ITEM P5FL U(04,24,06) = [ P5L ];
  1544. ITEM P5CT U(04,30,06) = [ P5T ];
  1545. ITEM P5TS U(04,36,06) = [ P5S ];
  1546.  
  1547. ITEM P6 C(05,00,02) = [ P6C ];
  1548. ITEM P6FW U(05,12,06) = [ P6W ];
  1549. ITEM P6FB U(05,18,06) = [ P6B ];
  1550. ITEM P6FL U(05,24,06) = [ P6L ];
  1551. ITEM P6CT U(05,30,06) = [ P6T ];
  1552. ITEM P6TS U(05,36,06) = [ P6S ];
  1553.  
  1554. ITEM P7 C(06,00,02) = [ P7C ];
  1555. ITEM P7FW U(06,12,06) = [ P7W ];
  1556. ITEM P7FB U(06,18,06) = [ P7B ];
  1557. ITEM P7FL U(06,24,06) = [ P7L ];
  1558. ITEM P7CT U(06,30,06) = [ P7T ];
  1559. ITEM P7TS U(06,36,06) = [ P7S ];
  1560.  
  1561. ITEM P8 C(07,00,02) = [ P8C ];
  1562. ITEM P8FW U(07,12,06) = [ P8W ];
  1563. ITEM P8FB U(07,18,06) = [ P8B ];
  1564. ITEM P8FL U(07,24,06) = [ P8L ];
  1565. ITEM P8CT U(07,30,06) = [ P8T ];
  1566. ITEM P8TS U(07,36,06) = [ P8S ];
  1567.  
  1568. ITEM P9 C(08,00,02) = [ P9C ];
  1569. ITEM P9FW U(08,12,06) = [ P9W ];
  1570. ITEM P9FB U(08,18,06) = [ P9B ];
  1571. ITEM P9FL U(08,24,06) = [ P9L ];
  1572. ITEM P9CT U(08,30,06) = [ P9T ];
  1573. ITEM P9TS U(08,36,06) = [ P9S ];
  1574.  
  1575. ITEM P10 C(09,00,02) = [ P10C ];
  1576. ITEM P10FW U(09,12,06) = [ P10W ];
  1577. ITEM P10FB U(09,18,06) = [ P10B ];
  1578. ITEM P10FL U(09,24,06) = [ P10L ];
  1579. ITEM P10CT U(09,30,06) = [ P10T ];
  1580. ITEM P10TS U(09,36,06) = [ P10S ];
  1581.  
  1582. ITEM P11 C(10,00,02) = [ P11C ];
  1583. ITEM P11FW U(10,12,06) = [ P11W ];
  1584. ITEM P11FB U(10,18,06) = [ P11B ];
  1585. ITEM P11FL U(10,24,06) = [ P11L ];
  1586. ITEM P11CT U(10,30,06) = [ P11T ];
  1587. ITEM P11TS U(10,36,06) = [ P11S ];
  1588.  
  1589. ITEM P12 C(11,00,02) = [ P12C ];
  1590. ITEM P12FW U(11,12,06) = [ P12W ];
  1591. ITEM P12FB U(11,18,06) = [ P12B ];
  1592. ITEM P12FL U(11,24,06) = [ P12L ];
  1593. ITEM P12CT U(11,30,06) = [ P12T ];
  1594. ITEM P12TS U(11,36,06) = [ P12S ];
  1595.  
  1596. ITEM P13 C(12,00,02) = [ P13C ];
  1597. ITEM P13FW U(12,12,06) = [ P13W ];
  1598. ITEM P13FB U(12,18,06) = [ P13B ];
  1599. ITEM P13FL U(12,24,06) = [ P13L ];
  1600. ITEM P13CT U(12,30,06) = [ P13T ];
  1601. ITEM P13TS U(12,36,06) = [ P13S ];
  1602.  
  1603. ITEM P14 C(13,00,02) = [ P14C ];
  1604. ITEM P14FW U(13,12,06) = [ P14W ];
  1605. ITEM P14FB U(13,18,06) = [ P14B ];
  1606. ITEM P14FL U(13,24,06) = [ P14L ];
  1607. ITEM P14CT U(13,30,06) = [ P14T ];
  1608. ITEM P14TS U(13,36,06) = [ P14S ];
  1609.  
  1610. ITEM P15 C(14,00,02) = [ P15C ];
  1611. ITEM P15FW U(14,12,06) = [ P15W ];
  1612. ITEM P15FB U(14,18,06) = [ P15B ];
  1613. ITEM P15FL U(14,24,06) = [ P15L ];
  1614. ITEM P15CT U(14,30,06) = [ P15T ];
  1615. ITEM P15TS U(14,36,06) = [ P15S ];
  1616.  
  1617. ITEM P16 C(15,00,02) = [ P16C ];
  1618. ITEM P16FW U(15,12,06) = [ P16W ];
  1619. ITEM P16FB U(15,18,06) = [ P16B ];
  1620. ITEM P16FL U(15,24,06) = [ P16L ];
  1621. ITEM P16CT U(15,30,06) = [ P16T ];
  1622. ITEM P16TS U(15,36,06) = [ P16S ];
  1623.  
  1624. ITEM P17 C(16,00,02) = [ P17C ];
  1625. ITEM P17FW U(16,12,06) = [ P17W ];
  1626. ITEM P17FB U(16,18,06) = [ P17B ];
  1627. ITEM P17FL U(16,24,06) = [ P17L ];
  1628. ITEM P17CT U(16,30,06) = [ P17T ];
  1629. ITEM P17TS U(16,36,06) = [ P17S ];
  1630.  
  1631. ITEM P18 C(17,00,02) = [ P18C ];
  1632. ITEM P18FW U(17,12,06) = [ P18W ];
  1633. ITEM P18FB U(17,18,06) = [ P18B ];
  1634. ITEM P18FL U(17,24,06) = [ P18L ];
  1635. ITEM P18CT U(17,30,06) = [ P18T ];
  1636. ITEM P18TS U(17,36,06) = [ P18S ];
  1637.  
  1638. ITEM P19 C(18,00,02) = [ P19C ];
  1639. ITEM P19FW U(18,12,06) = [ P19W ];
  1640. ITEM P19FB U(18,18,06) = [ P19B ];
  1641. ITEM P19FL U(18,24,06) = [ P19L ];
  1642. ITEM P19CT U(18,30,06) = [ P19T ];
  1643. ITEM P19TS U(18,36,06) = [ P19S ];
  1644.  
  1645. ITEM P20 C(19,00,02) = [ P20C ];
  1646. ITEM P20FW U(19,12,06) = [ P20W ];
  1647. ITEM P20FB U(19,18,06) = [ P20B ];
  1648. ITEM P20FL U(19,24,06) = [ P20L ];
  1649. ITEM P20CT U(19,30,06) = [ P20T ];
  1650. ITEM P20TS U(19,36,06) = [ P20S ];
  1651.  
  1652. ITEM P21 C(20,00,02) = [ P21C ];
  1653. ITEM P21FW U(20,12,06) = [ P21W ];
  1654. ITEM P21FB U(20,18,06) = [ P21B ];
  1655. ITEM P21FL U(20,24,06) = [ P21L ];
  1656. ITEM P21CT U(20,30,06) = [ P21T ];
  1657. ITEM P21TS U(20,36,06) = [ P21S ];
  1658.  
  1659. ITEM P22 C(21,00,02) = [ P22C ];
  1660. ITEM P22FW U(21,12,06) = [ P22W ];
  1661. ITEM P22FB U(21,18,06) = [ P22B ];
  1662. ITEM P22FL U(21,24,06) = [ P22L ];
  1663. ITEM P22CT U(21,30,06) = [ P22T ];
  1664. ITEM P22TS U(21,36,06) = [ P22S ];
  1665.  
  1666. ITEM P23 C(22,00,02) = [ P23C ];
  1667. ITEM P23FW U(22,12,06) = [ P23W ];
  1668. ITEM P23FB U(22,18,06) = [ P23B ];
  1669. ITEM P23FL U(22,24,06) = [ P23L ];
  1670. ITEM P23CT U(22,30,06) = [ P23T ];
  1671. ITEM P23TS U(22,36,06) = [ P23S ];
  1672.  
  1673.  
  1674. END
  1675.  
  1676.  
  1677. #
  1678. * TO ACCESS THE PARAMETERS DEFINED IN THE ARRAY *KPAR*.
  1679. #
  1680.  
  1681. BASED
  1682. ARRAY PARTABLE [0:0] S(1); # PARAMETER TABLE #
  1683. BEGIN
  1684. ITEM PAR$CDE C(00,00,02); # CODE #
  1685. ITEM PAR$FWD U(00,12,06); # FROM WORD OFFSET #
  1686. ITEM PAR$FBIT U(00,18,06); # FROM STARTING BIT #
  1687. ITEM PAR$FLEN U(00,24,06); # FROM LENGTH IN BITS #
  1688. ITEM PAR$CONV U(00,30,06); # CONVERSION TYPE #
  1689. ITEM PAR$TSIZ U(00,36,06); # TO SIZE IN CHARACTERS #
  1690. END
  1691.  
  1692.  
  1693. CONTROL EJECT;
  1694.  
  1695. P<PARTABLE> = LOC(KPAR); # TABLE OF DEFINED PARAMETERS #
  1696. P<PARAMETER> = PADDR; # PARAMETER VALUES #
  1697.  
  1698. TCOPY = " "; # CLEAR TCOPY #
  1699. TO = 0; # TO INDEX #
  1700. FR = 0; # FROM INDEX #
  1701.  
  1702. #
  1703. * MOVE FROM *TEXT* TO *TCOPY* ONE CHARACTER AT A TIME. IF
  1704. * A PARAMETER CODE (*CODE*) IS DETECTED, MOVE THE PARAMETER
  1705. * AS DEFINED IN *PARTABLE* INTO THE *TCOPY*.
  1706. #
  1707.  
  1708. REPEAT WHILE TO LS 60 AND FR LS 60
  1709. DO
  1710. BEGIN # TRANSFER *K* DISPLAY TEXT #
  1711.  
  1712. CHAR = C<FR,1>TEXT; # GET CHARACTER #
  1713. IF CHAR NQ "*"
  1714. THEN # MOVE CHARACTER INTO TEXT #
  1715. BEGIN
  1716. C<TO,1>TCOPY = CHAR;
  1717. TO = TO + 1; # ADVANCE *TO* #
  1718. FR = FR + 1; # ADVANCE *FROM* #
  1719. TEST DUMMY;
  1720. END
  1721.  
  1722. PCODE = C<FR+1,2>TEXT; # GET PARAMETER CODE #
  1723.  
  1724. #
  1725. * SEARCH PARAMETER TABLE FOR MATCH ON PARAMETER CODE.
  1726. * DO SPECIFIED CONVERSION, IF ANY, AND MOVE
  1727. * PARAMETER INTO MESSAGE TEXT.
  1728. #
  1729.  
  1730. FOR PI = 0 STEP 1 WHILE PI LS KPNUM
  1731. DO
  1732. BEGIN # PROCESS PARAMETER #
  1733. IF PAR$CDE[PI] NQ PCODE
  1734. THEN
  1735. BEGIN
  1736. TEST PI;
  1737. END
  1738.  
  1739. #
  1740. * GET PARAMETER VALUE.
  1741. #
  1742.  
  1743. I = PAR$FWD[PI]; # WORD OFFSET #
  1744. PFIELDI[0] = B<PAR$FBIT[PI],PAR$FLEN[PI]>PARAM$WD[I];
  1745. #
  1746. * CONVERT TO CHARACTER DISPLAY IF SPECIFIED.
  1747. #
  1748.  
  1749. IF PAR$CONV[PI] EQ ALF
  1750. THEN
  1751. BEGIN # ALF #
  1752. PRESULT = PFIELDC[0];
  1753. BZFILL(PRESULT,TYPFILL"BFILL",10); # BLANK FILL PARAM #
  1754. END # ALF #
  1755.  
  1756. #
  1757. * CONVERT TO DECIMAL DISPLAY IF SPECIFIED.
  1758. #
  1759.  
  1760. IF PAR$CONV[PI] EQ DEC
  1761. THEN
  1762. BEGIN
  1763. PRESULT = XCDD(PFIELDI[0]);
  1764. END
  1765.  
  1766. #
  1767. * CONVERT TO OCTAL DISPLAY IF SPECIFIED.
  1768. #
  1769.  
  1770. IF PAR$CONV[PI] EQ OCTL
  1771. THEN
  1772. BEGIN
  1773. PRESULT = XCOD(PFIELDI[0]);
  1774. END
  1775.  
  1776.  
  1777. #
  1778. * MOVE PARAMETER VALUE INTO TEXT.
  1779. #
  1780.  
  1781. C<TO,PAR$TSIZ[PI]>TCOPY = ##
  1782. C<10-PAR$TSIZ[PI],PAR$TSIZ[PI]>PRESULT;
  1783. TO = TO + PAR$TSIZ[PI];
  1784.  
  1785. FR = FR + 3; # ADVANCE PAST PARAMETER CODE #
  1786. TEST DUMMY;
  1787. END # PROCESS PARAMETER #
  1788.  
  1789. END # TRANSFER *K* DISPLAY TEXT #
  1790.  
  1791. TEXT = TCOPY; # RETURN NEW TEXT #
  1792.  
  1793. END # KPFILL #
  1794.  
  1795. TERM
  1796. PROC KPROC;
  1797.  
  1798. # TITLE KPROC - *K* DISPLAY PROCESSOR. #
  1799.  
  1800. BEGIN # KPROC #
  1801.  
  1802. #
  1803. ** KPROC - *K* DISPLAY PROCESSOR.
  1804. *
  1805. * *KPROC* DETERMINES IF THERE IS ANY WORK TO DO FOR THE
  1806. * *K* DISPLAY AND IF SO, CALLS THE *K* DISPLAY OVERLAY.
  1807. * IT ALSO UPDATES THE *B* DISPLAY REQUEST-K MESSAGE
  1808. * AS NECESSARY.
  1809. *
  1810. * PROC KPROC.
  1811. *
  1812. * ENTRY (KACTCOUNT) - NUMBER OF REQUESTS CURRENTLY
  1813. * IN THE BODY OF THE LEFT SCREEN.
  1814. * (KLINKQ) - HEAD OF K-QUEUE.
  1815. * = 0 IF EMPTY.
  1816. * (KNEWREQ) - FLAG INDICATES NEW REQUESTS EXIST.
  1817. * (KREQCLEAR) - FLAG TO INDICATE THE REQUEST-K
  1818. * MESSAGE IS NOT ON THE *B* DISPLAY.
  1819. * ARRAY KBINPUT - KEYBOARD INPUT BUFFER.
  1820. * ARRAY KLEFTSCRN - LEFT SCREEN BUFFER.
  1821. * (KL$COMP) - COMPLETE FLAG IN LEFT SCREEN BUFFER.
  1822. * = 0 IF *DSD* IS NOT PROCESSING *K*.
  1823. * = 1 IF *DSD* IS PROCESSING *K*.
  1824. *
  1825. * EXIT (KREQCLEAR) - REQUEST-K FLAG.
  1826. * (KTIMER) - COUNTER TO REFRESH REQUEST-K MESSAGE.
  1827. *
  1828. * MESSAGES * REQUEST *K* DISPLAY *.
  1829. *
  1830. * NOTES CALLS *K* DISPLAY OVERLAY ONLY IF THERE IS
  1831. * WORK TO PROCESS.
  1832. *
  1833. * REFRESHES THE REQUEST-K MESSAGE ON THE *B* DISPLAY
  1834. * AS NECESSARY.
  1835. *
  1836. * CLEARS THE REQUEST-K MESSAGE AS NECESSARY.
  1837. *
  1838. * *DSD* SETS THE *KL$COMP* FLAG IN THE LEFT SCREEN
  1839. * BUFFER WHILE IT IS PROCESSING THE *K* DISPLAY.
  1840. #
  1841.  
  1842. #
  1843. **** PROC KPROC - XREF LIST BEGIN.
  1844. #
  1845.  
  1846. XREF
  1847. BEGIN
  1848. FUNC XCDD C(10); # BINARY TO DISPLAY (DECIMAL) #
  1849. PROC SSOVL; # LOAD OVERLAY #
  1850. PROC MESSAGE; # ISSUE *MESSAGE* MACRO #
  1851. PROC RTIME; # GET TIME SINCE LAST DEAD START #
  1852. END
  1853.  
  1854. #
  1855. **** PROC KPROC - XREF LIST END.
  1856. #
  1857.  
  1858. DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
  1859. *CALL COMBFAS
  1860. *CALL COMXCTF
  1861. *CALL COMXIPR
  1862. *CALL COMBKDA
  1863. *CALL COMBKDD
  1864. *CALL COMXMSC
  1865. *CALL COMBOVL
  1866.  
  1867. CONTROL EJECT;
  1868.  
  1869. #
  1870. * DETERMINE IF THERE IS WORK TO DO.
  1871. #
  1872. P<DISPOS> = LOC(KL$LINE[LF$TITLE + 1]);
  1873. CH$10[0] = XCDD(RTRQ$CT);
  1874. DISPOS$RTRQ[0] = CH$04[0];
  1875. IF KB$CLEAR[0] NQ 0 # CONSOLE INPUT #
  1876. OR (KACTCOUNT LS KORD AND KNEWREQ) # NEW REQUEST #
  1877. OR (KSMDISP AND KL$COMP[0]) # SM DISPLAY UP #
  1878. THEN
  1879. BEGIN
  1880. SSOVL(LKDISPLY,0); # LOAD *KDISPLAY* OVERLAY #
  1881. END
  1882.  
  1883. #
  1884. * CLEAR REQUEST-K IF NO ACTIVE DISPLAYS.
  1885. #
  1886.  
  1887. IF (KACTCOUNT EQ 0 # NO MESSAGES TO DISPLAY #
  1888. OR KL$COMP[0]) # MESSAGES BEING DISPLAYED #
  1889. AND NOT KREQCLEAR # *REQUEST-K* MESSAGE UP #
  1890. THEN # *REQUEST-K* NO LONGER NEEDED #
  1891. BEGIN
  1892. MESSAGE(BZEROES,LINE2);
  1893. KREQCLEAR = TRUE; # FLAG IT IS CLEAR #
  1894. END
  1895.  
  1896. #
  1897. * REFRESH REQUEST-K MESSAGE ON *B* DISPLAY IF THERE ARE
  1898. * REQUESTS TO PROCESS BUT THE *K* DISPLAY IS NOT ACTIVE.
  1899. #
  1900.  
  1901. IF KACTCOUNT NQ 0
  1902. THEN
  1903. BEGIN # REFRESH (REQUEST *K* DISPLAY) MESSAGE #
  1904. RTIME(RTIMESTAT[0]);
  1905. KDIS$EXPIR = RTIMSECS[0] + KDIS$INTV;
  1906. KTIMER = KTIMER - 1;
  1907. IF KTIMER LS 0
  1908. THEN # TIMER EXPIRED #
  1909. BEGIN
  1910. IF NOT KL$COMP[0]
  1911. THEN # *K* DISPLAY MUST NOT BE ACTIVE #
  1912. BEGIN
  1913. MESSAGE("$ REQUEST *K* DISPLAY ",LINE2);
  1914. KREQCLEAR = FALSE;
  1915. END
  1916.  
  1917. KTIMER = KRESET; # RESET TIMER #
  1918. KL$COMP[0] = FALSE; # SET TOGGLE OFF ( ON BY *DSD* ) #
  1919. END
  1920.  
  1921. END # REFRESH (REQUEST *K* DISPLAY) MESSAGE #
  1922.  
  1923. ELSE # DO NOT KEEP EXEC FROM IDLING #
  1924. BEGIN # IDLE #
  1925. KDIS$EXPIR = 0;
  1926. END # IDLE #
  1927.  
  1928. #
  1929. * KEEP EXEC ACTIVE TO REFRESH THE SM DISPLAY
  1930. * IF IT IS ON THE SCREEN.
  1931. #
  1932.  
  1933. IF KSMDISP AND KL$COMP[0] # SM DISPLAY ON SCREEN #
  1934. THEN # KEEP EXEC ACTIVE #
  1935. BEGIN # ACTIVE #
  1936. RTIME(RTIMESTAT[0]);
  1937. KSM$EXPIR = RTIMSECS[0] + KSM$INTV;
  1938. KL$COMP[0] = FALSE; # DONE PROCESSING SM DISPLAY #
  1939. KTIMER = KRESET; # RESET *DSD* TIMER #
  1940. END # ACTIVE #
  1941.  
  1942. ELSE # NOTHING UP TO REFRESH #
  1943. BEGIN # TIMEOUT #
  1944. KTIMER = KTIMER - 1; # TIMEOUT IN CASE *DSD* SLOW #
  1945. IF KTIMER LS 0
  1946. THEN # DSD NOT PROCESSING SM DISPLAY #
  1947. BEGIN # IDLE #
  1948. KSM$EXPIR = 0; # DO NOT FORCE EXEC ACTIVE #
  1949. END # IDLE #
  1950.  
  1951. END # TIMEOUT #
  1952.  
  1953. END # KPROC #
  1954.  
  1955. TERM
  1956. PROC KREQ((KWADDR),(RTYP));
  1957.  
  1958. # TITLE KREQ - *K* DISPLAY REQUEST. #
  1959.  
  1960. BEGIN # KREQ #
  1961.  
  1962. #
  1963. ** KREQ - *K* DISPLAY REQUEST.
  1964. *
  1965. * *KREQ* LINKS A NEW REQUEST TO THE *K* DISPLAY QUEUE
  1966. * OR DELINKS AN OLD REQUEST FROM THE *K* DISPLAY QUEUE.
  1967. *
  1968. * PROC KREQ((KWADDR),(RTYP))
  1969. *
  1970. * ENTRY (KWADDR) - ADDRESS OF *KWORD* ARRAY.
  1971. * (RTYP) - REQUEST TYPE.
  1972. * = *KLINK* TO ADD THE REQUEST TO THE QUEUE.
  1973. * = *KDELINK* TO DELINK THE REQUEST FROM
  1974. * THE QUEUE.
  1975. * (KLINKQ) - THE HEAD OF THE K-QUEUE.
  1976. *
  1977. * EXIT THE *KWORD* HAS BEEN LINKED/DELINKED.
  1978. *
  1979. * FOR A *KLINK*, THE REQUEST-K MESSAGE IS ISSUED AND
  1980. * (KREQCLEAR) = FALSE, REQUEST-K MESSAGE IS UP.
  1981. * (KNEWREQ) - IS SET TRUE IF A NEW REQUEST
  1982. * WAS ADDED.
  1983. *
  1984. * FOR A *KDELINK*, THE LEFT SCREEN AREA IS BLANKED
  1985. * IF THE *KWORD* ENTRY IS CURRENTLY ON THE SCREEN.
  1986. *
  1987. * MESSAGES * REQUEST *K* DISPLAY * (IF *KLINK* REQUEST).
  1988. *
  1989. * NOTES FOR *KLINK* PROCESSING -
  1990. * . SKIP THE REQUEST IF IT IS ALREADY IN QUEUE.
  1991. * . ADD TO END OF K-QUEUE.
  1992. * . ISSUE THE REQUEST-K MESSAGE.
  1993. *
  1994. * FOR *KDELINK* PROCESSING -
  1995. * . SKIP THIS REQUEST IF IT IS NOT IN THE QUEUE.
  1996. * . CLEAR THE SCREEN LINES FOR THIS REQUEST IF IT IS
  1997. * CURRENTLY ACTIVE ON THE LEFT SCREEN.
  1998. * . SET COMPLETE IN *KWORD* ARRAY.
  1999. * . DELINK THE REQUEST FROM THE QUEUE.
  2000. #
  2001.  
  2002. ITEM KWADDR I; # ADDRESS OF *KWORD* ARRAY #
  2003. ITEM RTYP I; # REQUEST TYPE #
  2004.  
  2005. #
  2006. **** PROC KREQ - XREF LIST BEGIN.
  2007. #
  2008.  
  2009. XREF
  2010. BEGIN
  2011. PROC KCLR; # CLEAR CURRENT ON *K* DISPLAY #
  2012. PROC MESSAGE; # ISSUE *MESSAGE* MACRO #
  2013. END
  2014.  
  2015. #
  2016. **** PROC KREQ - XREF LIST END.
  2017. #
  2018.  
  2019. DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
  2020. *CALL COMBFAS
  2021. *CALL COMBKDA
  2022. *CALL COMBKDD
  2023. *CALL COMXCTF
  2024.  
  2025. ITEM CURRKW I; # CURRENT *KWORD* ADDRESS #
  2026. ITEM ORD I; # AN ORDINAL #
  2027. ITEM PREVKW I; # PREVIOUS *KWORD* ADDRESS #
  2028.  
  2029.  
  2030. CONTROL EJECT;
  2031.  
  2032. #
  2033. * SEARCH K-QUEUE UNTIL END (ZERO) OR A MATCH ON *KWADDR*.
  2034. * SETS - *PREVKW* = ADDRESS OF PREVIOUS *KWORD* IN QUEUE.
  2035. * - *CURRKW* = ADDRESS OF CURRENT *KWORD* OR ZERO(END).
  2036. #
  2037.  
  2038. CURRKW = LOC(KLINKQ); # START AT HEAD #
  2039. REPEAT WHILE CURRKW NQ 0 AND CURRKW NQ KWADDR
  2040. DO
  2041. BEGIN
  2042. PREVKW = CURRKW; # SET PREVIOUS #
  2043. P<KWORD> = CURRKW;
  2044. CURRKW = KW$LINK[0]; # GET NEXT IN QUEUE #
  2045. END
  2046.  
  2047. #
  2048. * PROCESS THE LINK REQUEST.
  2049. #
  2050.  
  2051. IF RTYP EQ KLINK
  2052. THEN # LINK TO QUEUE #
  2053. BEGIN # LINK #
  2054. IF CURRKW NQ 0
  2055. THEN # FOUND MATCH IN QUEUE #
  2056. BEGIN
  2057. RETURN; # IGNORE THIS REQUEST #
  2058. END
  2059.  
  2060. #
  2061. * INITIALIZE *KWORD* ARRAY FIELDS.
  2062. #
  2063.  
  2064. P<KWORD> = KWADDR;
  2065. KW$KCTL[0] = 0; # CLEAR K-CONTROLLED AREA #
  2066. KW$LINK[0] = 0; # SET LINK AT END #
  2067.  
  2068. #
  2069. * LINK *KWORD* TO END OF QUEUE.
  2070. #
  2071.  
  2072. P<KWORD> = PREVKW;
  2073. KW$LINK[0] = KWADDR; # PREVIOUS POINTS TO NEW #
  2074. KNEWREQ = TRUE;
  2075.  
  2076. #
  2077. * ISSUE THE REQUEST-K MESSAGE.
  2078. #
  2079.  
  2080. MESSAGE("$ REQUEST *K* DISPLAY ",LINE2);
  2081. KREQCLEAR = FALSE;
  2082. RETURN; # EXIT #
  2083. END # LINK #
  2084.  
  2085.  
  2086.  
  2087. #
  2088. * PROCESS THE DELINK REQUEST.
  2089. #
  2090.  
  2091. IF RTYP EQ KDELINK
  2092. THEN # DELINK FROM QUEUE #
  2093. BEGIN # DELINK #
  2094. IF CURRKW EQ 0
  2095. THEN # NO MATCH IN QUEUE #
  2096. BEGIN
  2097. RETURN; # IGNORE THIS REQUEST #
  2098. END
  2099.  
  2100. #
  2101. * IF REQUEST IS CURRENTLY ACTIVE ON *K* DISPLAY, CLEAR IT.
  2102. #
  2103.  
  2104. P<KWORD> = CURRKW;
  2105. IF KW$ACT[0]
  2106. THEN # CURRENTLY ON *K* #
  2107. BEGIN # CLEAR K DISPLAY ENTRY #
  2108.  
  2109. #
  2110. * LOOK FOR *KWORD* ENTRY IN *KCURRENT*.
  2111. #
  2112.  
  2113. FOR ORD = 1 STEP 1 WHILE ORD LQ KORD
  2114. DO
  2115. BEGIN
  2116. IF KCUR$ADDR[ORD] EQ KWADDR
  2117. THEN # FOUND MATCH #
  2118. BEGIN
  2119. KCLR(ORD); # CLEAR FROM *K* DISPLAY #
  2120. END
  2121.  
  2122. END
  2123.  
  2124. END # CLEAR K DISPLAY ENTRY #
  2125.  
  2126. #
  2127. * SET COMPLETE ON THIS REQUEST.
  2128. #
  2129.  
  2130. P<KWORD> = KWADDR;
  2131. KW$COMP[0] = TRUE;
  2132. DRVRRECALL = TRUE; # SET TO RECALL THE DRIVER #
  2133.  
  2134. #
  2135. * DELINK IT FROM QUEUE.
  2136. #
  2137.  
  2138. CURRKW = KW$LINK[0]; # NEXT IN QUEUE #
  2139. P<KWORD> = PREVKW;
  2140. KW$LINK[0] = CURRKW; # LINK PREVIOUS TO NEXT #
  2141. RETURN;
  2142.  
  2143. END # DELINK #
  2144.  
  2145. END # KREQ #
  2146.  
  2147. TERM
  2148. PROC KSM(REJECT);
  2149.  
  2150. # TITLE KSM - PROCESS *SMI* COMMAND. #
  2151.  
  2152. BEGIN # KSM #
  2153.  
  2154. #
  2155. ** KSM - PROCESS *SMI* COMMAND.
  2156. *
  2157. * *KSM* PROCESSES BOTH FORMS OF THE *SM* OPERATOR COMMAND.
  2158. * THE TWO FORMS OF THE COMMAND ARE:
  2159. * 1. *SMI*, WHERE *I* IS THE SM IDENTIFIER
  2160. *
  2161. * THIS FORM OF THE COMMAND CAUSES INFORMATION FOR THE
  2162. * SPECIFIED *SM* TO BE DISPLAYED.
  2163. *
  2164. * 2. *SMI,DRD=XX=N*
  2165. * WHERE *I* IS THE *SM* IDENTIFIER
  2166. * *XX* IS THE LITERAL *ST* (STAGE) OR *DS* (DESTAGE)
  2167. * *N* IS MAXIMUM NUMBER OF DRDS (0, 1, OR 2)
  2168. *
  2169. * THIS FORM OF THE COMMAND CAUSES THE MAXIMUM NUMBER OF
  2170. * DRDS PERMITTED FOR STAGING (*ST*) OR DESTAGING (*DS*)
  2171. * TO BE REDEFINED WITH THE SPECIFIED VALUE OF *N* (0, 1,
  2172. * OR 2).
  2173. *
  2174. * PROC KSM(REJECT).
  2175. *
  2176. * ENTRY ARRAY KBINPUT (DEFINED IN *COMBKDD*) CONTAINS THE
  2177. * IMAGE OF THE *SMI* COMMAND.
  2178. *
  2179. * EXIT *SM* PORTION OF *K* DISPLAY HAS BEEN UPDATED.
  2180. *
  2181. * MESSAGES
  2182. *
  2183. *
  2184. *
  2185. *
  2186. #
  2187.  
  2188.  
  2189. #
  2190. **** PROC KSM - XREF LIST BEGIN.
  2191. #
  2192.  
  2193. XREF
  2194. BEGIN
  2195. PROC KDSM; # PAINT *SM* PORTION OF K-DISPLAY #
  2196. FUNC XDXB I; # CONVERT DISPLAY TO INTEGER #
  2197. END
  2198.  
  2199. #
  2200. **** PROC KSM - XREF LIST END.
  2201. #
  2202.  
  2203. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  2204. *CALL COMBFAS
  2205. *CALL COMBKDA
  2206. *CALL COMBKDD
  2207. *CALL COMBUDT
  2208.  
  2209. ITEM CHDRD C(1); # CHARACTER VALUE FOR DRDS #
  2210. ITEM FINDSM B; # STORAGE MODULE FOUND IN UDT #
  2211. ITEM I I; # INTEGER VALUE FOR DRDS #
  2212. ITEM NUMDRD I; # NUMBER OF DRDS FOR ST OR DS #
  2213. ITEM REJECT B; # REJECT OPERATOR RESPONSE FLAG #
  2214. ITEM TEMPSM C(1); # *SM* ID FROM INPUT COMMAND #
  2215. CONTROL EJECT;
  2216.  
  2217. #
  2218. * CHECK FOR VALID *SM* COMMAND.
  2219. #
  2220.  
  2221. REJECT = FALSE; # ASSUME VALID COMMAND #
  2222. TEMPSM = C<2,1>KB$SCAN[0];
  2223. FINDSM = FALSE; # LOCATED SM IN UDT FLAG #
  2224. SLOWFOR I = 1 STEP 1 UNTIL MAXSMUNIT
  2225. DO
  2226. BEGIN # CHECK FOR SM ID IN EACH UDT #
  2227. IF SM$ID[I] EQ TEMPSM
  2228. THEN
  2229. BEGIN # SM LOCATED IN UDT #
  2230. FINDSM = TRUE;
  2231. KUDTIND = I;
  2232. TEST I;
  2233. END
  2234.  
  2235. END # CHECK FOR SM ID IN EACH UDT #
  2236.  
  2237.  
  2238.  
  2239. IF NOT FINDSM # SM NOT DEFINED IN THE UDT #
  2240. OR TEMPSM EQ 0 ##
  2241. OR KACTCOUNT NQ 0 # MESSAGE(S) AWAITING "GO" #
  2242. OR (C<3,1>KB$SCAN[0] NQ " " # NOT VALID POST-CHARACTERS #
  2243. AND C<3,1>KB$SCAN[0] NQ 0
  2244. AND C<3,5>KB$SCAN[0] NQ ",DRD=")
  2245. THEN
  2246. BEGIN # INVALID #
  2247. REJECT = TRUE;
  2248. RETURN;
  2249. END # INVALID #
  2250.  
  2251.  
  2252.  
  2253. IF C<3,5>KB$SCAN[0] EQ ",DRD="
  2254. THEN
  2255. BEGIN # COMMAND FORM *SMI,DRD=.....* #
  2256.  
  2257. #
  2258. * COMMAND FORM IS *SMI,DRD=ST=N*
  2259. * OR *SMI,DRD=DS=N*
  2260. #
  2261.  
  2262.  
  2263. CHDRD = C<11,1>KB$SCAN[0]; # NUMBER DRDS FOR ST OR DS #
  2264. I = XDXB(CHDRD,0,NUMDRD);
  2265.  
  2266. IF NOT (I EQ 0 AND NUMDRD GQ 0
  2267. AND NUMDRD LQ MAX$SMDRD)
  2268. THEN # INVALID NUMBER OF DRDS SPECIFIED #
  2269. BEGIN # DO NOT ALTER *UDT* #
  2270. REJECT = TRUE;
  2271. RETURN;
  2272. END
  2273.  
  2274. #
  2275. * COMMAND FORM *SMI,DRD=ST=N* OR *SMI,DRD=DS=N* IS VALID.
  2276. #
  2277.  
  2278.  
  2279. IF C<8,3>KB$SCAN[0] EQ "ST="
  2280. THEN # PARAMETER IS *ST* #
  2281. BEGIN # SET MAX DRDS FOR STAGING #
  2282. SM$STNUM[KUDTIND] = NUMDRD;
  2283. END
  2284.  
  2285. ELSE
  2286. BEGIN # PARAM MUST BE *DS* #
  2287. IF C<8,3>KB$SCAN[0] EQ "DS="
  2288. THEN
  2289. BEGIN # SET MAX DRDS FOR DESTAGING #
  2290. SM$DSNUM[KUDTIND] = NUMDRD;
  2291. END
  2292.  
  2293. ELSE
  2294. BEGIN # ST/DS PARAMETER IS INVALID #
  2295. REJECT = TRUE;
  2296. RETURN;
  2297. END
  2298. END # *DS* PARAM #
  2299.  
  2300. END # COMMAND FORM *SMI,DRD=.....* #
  2301.  
  2302. #
  2303. * AT THIS POINT, THE COMMAND HAS BEEN VALIDATED WHETHER IT IS THE
  2304. * *K.SMI* FORM OR THE *K.SMI,DRD.....* FORM. IF THE LATTER FORM,
  2305. * THE *UDT* HAS ALREADY BEEN UPDATED TO REFLECT THE NEW MAXIMUM
  2306. * NUMBER OF DRD-S FOR STAGING (*ST*) OR DESTAGING (*DS*). IT IS
  2307. * NOW TIME TO REPAINT THE K-DISPLAY TO REFLECT THE *SM* SELECTED.
  2308. #
  2309.  
  2310. KSMID = TEMPSM;
  2311. KDSM; # DISPLAY *SM* INFORMATION #
  2312. RETURN;
  2313.  
  2314. END # KSM #
  2315.  
  2316.  
  2317.  
  2318. TERM
1)
ORD
2)
KWADDR),(RTYP