User Tools

Site Tools


cdc:nos2.source:opl871:exdrvr

EXDRVR

Table Of Contents

  • [00001] PROC ACQCART
  • [00002] ACQCART - ACQUIRE CARTRIDGE.
  • [00007] ACQCART - ACQUIRE CARTRIDGE.
  • [00036] PROC ABORT
  • [00037] PROC KREQ
  • [00038] PROC MESSAGE
  • [00039] PROC SENDMSG
  • [00040] PROC ZFILL
  • [00438] PROC BMLOG
  • [00439] BMLOG - SEND MESSAGE TO BML.
  • [00444] BMLOG - SEND MESSAGE TO BML.
  • [00475] PROC ABORT
  • [00476] PROC GDATA
  • [00477] PROC MESSAGE
  • [00478] PROC MSG
  • [00479] PROC ZFILL
  • [00750] PROC CALLPP1)
  • [00751] CALLPP - ACTIVATE THE PP MODULE *1SS*.
  • [00756] CALLPP - ACTIVATE THE PP MODULE *1SS*.
  • [00801] PROC ABORT
  • [00802] PROC FSCLOG
  • [00803] PROC GETCHAN
  • [00804] PROC MESSAGE
  • [00805] PROC SMSG
  • [00806] PROC SYSTEM
  • [01048] PROC CRMSG
  • [01049] CRMSG - CREATE M860 MESSAGE.
  • [01054] CRMSG - CREATE M860 MESSAGE.
  • [01102] PROC ABORT
  • [01103] PROC GETCHAN
  • [01104] PROC MESSAGE
  • [01105] PROC PDATE
  • [01106] PROC ZFILL
  • [02085] PROC CHNGCHN
  • [02086] CHNGCHN - CHANGE CHANNEL STATUS.
  • [02091] CHNGCHN - CHANGE CHANNEL STATUS.
  • [02114] PROC KREQ
  • [02115] PROC MESSAGE
  • [02116] PROC RTIME
  • [02216] PROC DOWNCU2)
  • [02217] DOWNCU - DOWN CONTROLLER.
  • [02222] DOWNCU - DOWN CONTROLLER.
  • [02244] PROC KREQ
  • [02245] PROC MESSAGE
  • [02246] FUNC XCOD C(10)
  • [02355] PROC FSCLOG3)
  • [02356] FSCLOG - LOG FSC ERRORS IN BML.
  • [02361] FSCLOG - LOG FSC ERRORS IN BML.
  • [02386] PROC CHNGCHN
  • [02387] PROC DOWNCU
  • [02388] PROC KREQ
  • [02389] PROC MESSAGE
  • [02390] PROC ZFILL
  • [02602] PROC GENREQ
  • [02603] GENREQ - GENERAL DRIVER REQUESTS.
  • [02608] GENREQ - GENERAL DRIVER REQUESTS.
  • [02648] PROC ABORT
  • [02649] PROC MESSAGE
  • [02650] PROC SENDMSG
  • [02651] PROC ZFILL
  • [02760] PROC GETCHAN4)
  • [02761] GETCHAN - ALLOCATE CHANNEL.
  • [02766] GETCHAN - ALLOCATE CHANNEL.
  • [03069] PROC INITDRD
  • [03070] INITDRD - INITIALIZE DRD-S.
  • [03075] INITDRD - INITIALIZE DRD-S.
  • [03105] PROC ABORT
  • [03106] PROC KREQ
  • [03107] PROC MESSAGE
  • [03108] PROC SENDMSG
  • [03109] PROC ZFILL
  • [03403] PROC INITSM
  • [03404] INITSM - INITIALIZE STORAGE MODULES AND CONTROLLER PATHS.
  • [03409] INITSM - INITIALIZE STORAGE MODULES AND CONTROLLER PATHS.
  • [03442] PROC ABORT
  • [03443] PROC KREQ
  • [03444] PROC MESSAGE
  • [03445] PROC SENDMSG
  • [03446] PROC ZFILL
  • [03743] PROC PPDONE5)
  • [03744] PPDONE - PROCESSED COMPLETED PP CALLS.
  • [03749] PPDONE - PROCESS COMPLETED PP CALLS.
  • [03782] PROC ABORT
  • [03783] PROC FSCLOG
  • [03784] PROC MESSAGE
  • [03785] PROC PROCMRB
  • [03786] PROC SYSTEM
  • [03905] PROC PROCDRQ
  • [03906] PROCDRQ - PROCESS DRIVER REQUESTS.
  • [03911] PROCDRQ - PROCESS DRIVER REQUESTS.
  • [03933] PROC ACQCART
  • [03934] PROC GENREQ
  • [03935] PROC INITDRD
  • [03936] PROC INITSM
  • [03937] PROC RESTCU
  • [03938] PROC STRCART
  • [03939] PROC XFRDATA
  • [04144] PROC PROCMRB(MSTAT)
  • [04145] PROCMRB - PROCESS MESSAGE READ BUFFERS.
  • [04150] PROCMRB - PROCESS MESSAGE READ BUFFERS.
  • [04194] PROC ABORT
  • [04195] PROC BMLOG
  • [04196] PROC CALLPP
  • [04197] PROC DOWNCU
  • [04198] PROC FSCLOG
  • [04199] PROC GDATA
  • [04200] PROC GMSG
  • [04201] PROC MESSAGE
  • [04202] PROC ZFILL
  • [04553] PROC RESTCU
  • [04554] RESTCU - PERFORM CONTROLLER RESTART PROCESSING.
  • [04559] RESTCU - PERFORM CONTROLLER RESTART PROCESSING.
  • [04590] PROC ABORT
  • [04591] PROC DOWNCU
  • [04592] PROC MESSAGE
  • [04593] PROC SENDMSG
  • [04594] FUNC XCOD C(10)
  • [04595] PROC ZFILL
  • [04778] PROC SENDMSG
  • [04779] SENDMSG - SEND M860 MESSAGE.
  • [04784] SENDMSG - SEND M860 MESSAGE.
  • [04823] PROC ABORT
  • [04824] PROC CALLPP
  • [04825] PROC CRMSG
  • [04826] PROC MESSAGE
  • [04827] PROC RTIME
  • [04828] PROC ZFILL
  • [05015] PROC SSDRVR
  • [05016] SSDRVR - MSAS DRIVER MAIN ROUTINE.
  • [05021] MSAS DRIVER MAIN ROUTINE.
  • [05051] PROC ADD$LNK
  • [05052] PROC DEL$LNK
  • [05053] PROC MESSAGE
  • [05054] PROC PPDONE
  • [05055] PROC PROCDRQ
  • [05056] PROC PROCMRB
  • [05057] PROC RECALL
  • [05261] PROC STRCART
  • [05262] STRCART - STORE CARTRIDGE.
  • [05267] STRCART - STORE CARTRIDGE.
  • [05302] PROC ABORT
  • [05303] PROC KREQ
  • [05304] PROC MESSAGE
  • [05305] PROC RTIME
  • [05306] PROC SENDMSG
  • [05307] PROC ZFILL
  • [05768] PROC XFRDATA
  • [05769] XFRDATA - TRANSFER DATA TO/FROM M860.
  • [05774] XFRDATA - TRANSFER DATA TO/FROM M860.
  • [05805] PROC ABORT
  • [05806] PROC CALLPP
  • [05807] PROC MESSAGE
  • [05808] PROC RTIME
  • [05809] PROC SENDMSG
  • [05810] PROC ZFILL

Source Code

EXDRVR.txt
  1. PROC ACQCART;
  2. # TITLE ACQCART - ACQUIRE CARTRIDGE. #
  3.  
  4. BEGIN # ACQCART #
  5.  
  6. #
  7. ** ACQCART - ACQUIRE CARTRIDGE.
  8. *
  9. * *ACQCART* PROCESSES *DRQUEUE* REQUESTS TO LOAD CARTRIDGES
  10. * AND READ CARTRIDGE LABELS.
  11. *
  12. * PROC ACQCART
  13. *
  14. * ENTRY P<LLRQ> = *DRQUEUE* ENTRY ADDRESS.
  15. *
  16. * EXIT THE *DRQUEUE* ENTRY REQUEST STATE FIELD HAS BEEN
  17. * UPDATED TO INDICATE WHERE SUBSEQUENT PROCESSING OF
  18. * THIS REQUEST IS TO CONTINUE.
  19. *
  20. * MESSAGES *EXEC ABNORMAL, ACQCART2.* - UDT MESSAGE BUFFER
  21. * STILL IN USE.
  22. *
  23. * A K-DISPLAY MESSAGE IS ISSUED IF THE INPUT TRAY OR
  24. * MATRIX CELL IS EMPTY.
  25. *
  26. * NOTES THIS IS A PSEUDO-REENTRANT PROCEDURE.
  27. #
  28.  
  29.  
  30. #
  31. **** PROC ACQCART - XREF LIST BEGIN.
  32. #
  33.  
  34. XREF
  35. BEGIN
  36. PROC ABORT; # ABORT #
  37. PROC KREQ; # SEND K-DISPLAY REQUEST #
  38. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  39. PROC SENDMSG; # SEND M860 MESSAGE #
  40. PROC ZFILL; # ZERO-FILL BUFFER #
  41. END
  42.  
  43. #
  44. **** PROC ACQCART - XREF LIST END.
  45. #
  46.  
  47. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  48. *CALL,COMBFAS
  49. *CALL,COMBCPR
  50. *CALL,COMBFET
  51. *CALL,COMBHFC
  52. *CALL,COMBKDD
  53. *CALL,COMBLBL
  54. *CALL,COMBLRQ
  55. *CALL,COMBTDM
  56. *CALL,COMBUCR
  57. *CALL,COMBUDT
  58. *CALL,COMXCTF
  59. *CALL,COMXHLR
  60. *CALL,COMXMSC
  61.  
  62. ITEM DRDFULL B; # NEXT-DRD FULL FLAG #
  63. ITEM DRDON B; # NEXT-DRD ON FLAG #
  64. ITEM I I; # INDEX #
  65. ITEM OTHERFULL B; # OTHER-DRD FULL FLAG #
  66. ITEM OTHERON B; # OTHER-DRD ON FLAG #
  67. ITEM TEMPALL B; # TEMP ALLOCATION FLAG #
  68. ITEM TEMPCSN0 U; # FIRST 4 BYTES OF CSN #
  69. ITEM TEMPCSN1 U; # NEXT 6 BYTES OF CSN #
  70. ITEM TEMPCSN2 U; # LAST 2 BYTES OF CSN #
  71.  
  72. SWITCH ACQLBL:PROCST # DRIVER REQUEST STATE #
  73. ACQINIT:INITIAL, # INITIAL STATE #
  74. ACQLOAD:CONT1, # CONTINUATION 1 #
  75. ACQREAD:CONT2; # CONTINUATION 2 #
  76. CONTROL EJECT;
  77.  
  78. GOTO ACQLBL[LLR$RS[0]];
  79.  
  80. #
  81. * INITIAL DRIVER REQUEST STATE.
  82. #
  83.  
  84. ACQINIT:
  85. SLOWFOR I = 1 STEP 1 WHILE (LLR$SMO[0] EQ 0)AND(I LQ MAXSMUNIT)
  86. DO # LOCATE SM ORDINAL FROM SM ID #
  87. BEGIN # LOCATE #
  88. IF LLR$SMA[0] EQ SM$ID[I] ##
  89. AND SM$EXIST[I]
  90. THEN # SM ORDINAL FOUND #
  91. BEGIN # SET ORD #
  92. LLR$SMO[0] = I;
  93. END # SET ORD #
  94.  
  95. END # LOCATE #
  96.  
  97. #
  98. * ALLOCATE DRD IN PREPARATION FOR LOAD.
  99. #
  100.  
  101. IF LLR$SMO[0] EQ 0 # SM ORDINAL NOT FOUND #
  102. OR NOT SM$ON[LLR$SMO[0]] # SM OFF #
  103. THEN # LOAD NOT POSSIBLE #
  104. BEGIN # EXIT #
  105. DRVRACTIVE = TRUE;
  106. LLR$DR[0] = RESPTYP4"SMA$OFF";
  107. LLR$RS[0] = PROCST"COMPLETE";
  108. RETURN;
  109. END # EXIT #
  110.  
  111. IF SM$SCCU[LLR$SMO[0]] # PROCESSING SERVICE CELLS ONLY #
  112. AND LLR$PRCNME[0] NQ REQTYP4"INITHW" # NOT SRV CELL LOAD #
  113. THEN # LOAD AFTER SRV CELLS PROCESSED #
  114. BEGIN # WAIT #
  115. RETURN;
  116. END # WAIT #
  117.  
  118. DRDON = D1$ON[LLR$SMO[0]] ##
  119. AND (NOT D1$ON$ACK[LLR$SMO[0]]) ##
  120. AND (D1$DONE[LLR$SMO[0]] ##
  121. OR SM$DONE[LLR$SMO[0]] ##
  122. OR LLR$PRCNME[0] NQ REQTYP4"INITHW");
  123.  
  124. OTHERON = D0$ON[LLR$SMO[0]] ##
  125. AND (NOT D0$ON$ACK[LLR$SMO[0]]) ##
  126. AND (D0$DONE[LLR$SMO[0]] ##
  127. OR SM$DONE[LLR$SMO[0]] ##
  128. OR LLR$PRCNME[0] NQ REQTYP4"INITHW");
  129.  
  130. DRDFULL = D1$FULL[LLR$SMO[0]];
  131. OTHERFULL = D0$FULL[LLR$SMO[0]];
  132. IF SM$TOPDRD[LLR$SMO[0]]
  133. THEN # UPPER DRD CHOSEN #
  134. BEGIN # RESET #
  135. TEMPALL = DRDON;
  136. DRDON = OTHERON;
  137. OTHERON = TEMPALL;
  138. DRDFULL = D0$FULL[LLR$SMO[0]];
  139. OTHERFULL = D1$FULL[LLR$SMO[0]];
  140. END # RESET #
  141.  
  142. IF DRDFULL OR NOT DRDON
  143. THEN # CHOSEN DRD NOT AVAILABLE #
  144. BEGIN # CHECK OTHER DRD #
  145. IF NOT OTHERON
  146. THEN # OTHER DRD OFF #
  147. BEGIN # RECHECK #
  148. IF NOT DRDON
  149. THEN # BOTH DRD-S OFF #
  150. BEGIN # OFF #
  151. DRVRACTIVE = TRUE;
  152. LLR$DR[0] = RESPTYP4"SMA$OFF"; # NO ACCESS #
  153. LLR$RS[0] = PROCST"COMPLETE";
  154. END # OFF #
  155.  
  156. RETURN; # CHOSEN DRD IS FULL #
  157. END # RECHECK #
  158.  
  159. IF OTHERFULL
  160. THEN # OTHER DRD IS FULL #
  161. BEGIN # WAIT #
  162. RETURN; # AT LEAST ONE DRD IS FULL #
  163. END # WAIT #
  164.  
  165. SM$TOPDRD[LLR$SMO[0]] = NOT SM$TOPDRD[LLR$SMO[0]];
  166. # USE OTHER DRD #
  167. END # CHECK OTHER DRD #
  168.  
  169. IF SM$TOPDRD[LLR$SMO[0]]
  170. THEN # UPPER DRD CHOSEN #
  171. BEGIN # UPPER #
  172. LLR$DRD[0] = 0;
  173. D0$FULL[LLR$SMO[0]] = TRUE;
  174. D0$LLADR[LLR$SMO[0]] = P<LLRQ>;
  175. LLR$MBH[0] = LOC(D0$MSG[LLR$SMO[0]]) - 1;
  176. END # UPPER #
  177.  
  178. ELSE # LOWER DRD CHOSEN #
  179. BEGIN # LOWER #
  180. LLR$DRD[0] = 1;
  181. D1$FULL[LLR$SMO[0]] = TRUE;
  182. D1$LLADR[LLR$SMO[0]] = P<LLRQ>;
  183. LLR$MBH[0] = LOC(D1$MSG[LLR$SMO[0]]) - 1;
  184. END # LOWER #
  185.  
  186. P<MBFHDR> = LLR$MBH[0];
  187. IF MBF$WORD[0] NQ 0
  188. THEN # LAST MESSAGE NOT PROCESSED #
  189. BEGIN # ABORT #
  190. FE$RTN[0] = "ACQCART2.";
  191. GOTO ACQCART2;
  192. END # ABORT #
  193.  
  194. P<UDT$MSG> = P<MBFHDR> + 1;
  195. MS$MSG[0] = HFC$ACCR; # SET *ACQUIRE* FUNCTION #
  196. IF LLR$Y[0] EQ SM$ENT$TY # LOAD FROM ENTRY TRAY #
  197. AND LLR$Z[0] EQ SM$TY$Z
  198. THEN # RESET TO *ENTER* FUNCTION #
  199. BEGIN # RESET #
  200. MS$MSG[0] = HFC$ENCRDR;
  201. END # RESET #
  202.  
  203. MBF$SAVE[0] = SAVEPART;
  204. LLR$RS[0] = PROCST"CONT1"; # SET NEXT REQUEST STATE #
  205.  
  206. #
  207. * ISSUE M860 MESSAGE TO LOAD CARTRIDGE.
  208. #
  209.  
  210. ACQLOAD:
  211. P<MBFHDR> = LLR$MBH[0];
  212. SENDMSG; # SEND M860 MESSAGE #
  213. IF MBF$SBADDR[0] EQ 0 ##
  214. AND LLR$DR[0] EQ RESPTYP4"OK4" # HARDWARE GOOD #
  215. THEN # RESPONSE NOT YET RECEIVED #
  216. BEGIN # RETRY #
  217. RETURN;
  218. END # RETRY #
  219.  
  220. SM$ACCBUSY[LLR$SMO[0]] = FALSE;# SM ARM NOT IN USE #
  221. IF (MS$MSG[0] EQ HFC$ACCR # *ACQUIRE* ERROR #
  222. AND MS$RETCODE[0] NQ 0 ##
  223. AND MS$RETCODE[0] NQ HRC$CSNMIS) # HANDLE WHEN READING LABEL #
  224. OR (MS$MSG[0] EQ HFC$ENCRDR # *ENTER* ERROR #
  225. AND MS$RETCODE[0] NQ 0) ##
  226. OR LLR$DR[0] EQ RESPTYP4"M86$HDW$PR"
  227. THEN # UNEXPECTED RESPONSE #
  228. BEGIN # NO LOAD #
  229. IF LLR$DRFUL[0] # DEVICE DRIVER ERROR #
  230. THEN # TURN OFF DRD #
  231. BEGIN # OFF #
  232. LLR$LDERR[0] = TRUE;
  233. GOTO ACQCART1;
  234. END # OFF #
  235.  
  236. IF MS$RETCODE[0] EQ 0 ##
  237. AND MS$MSG[0] EQ HFC$ACCR
  238. THEN # HARDWARE ERROR #
  239. BEGIN # M860 #
  240. LLR$DR[0] = RESPTYP4"M86$HDW$PR";
  241. END # M860 #
  242.  
  243. IF MS$RETCODE[0] EQ HRC$CELEMP ##
  244. OR MS$RETCODE[0] EQ HRC$TRAYPR
  245. THEN # CELL EMPTY #
  246. BEGIN # EXIT #
  247. LLR$DR[0] = RESPTYP4"CELL$EMP";
  248.  
  249. #
  250. * SEND K-DISPLAY MESSAGE TO OPERATOR INDICATING EMPTY CELL.
  251. #
  252.  
  253. IF LLR$PRCNME[0] NQ REQTYP4"INITHW" # NOT SRV CELL LOAD #
  254. AND NOT (MS$MSG[0] EQ HFC$ACCR # NOT UCP LOAD TO MATRIX #
  255. AND LLR$RQI[0] NQ REQNAME"RQIINT")
  256. THEN # SEND K-DISPLAY MESSAGE #
  257. BEGIN # K #
  258. P<KWORD> = LOC(LLR$KWORDS[0]);
  259. KW$WORD[0] = 0;
  260. KW$LINE1[0] = KM"KM2";
  261. KW$LINE2[0] = KM"KM20"; # ASSUME INPUT TRAY EMPTY #
  262. IF MS$MSG[0] EQ HFC$ACCR
  263. THEN # MATRIX CELL WAS EMPTY #
  264. BEGIN # RESET #
  265. KW$LINE2[0] = KM"KM7";
  266. KW$DF[0] = TRUE; # SEND TO JOB DAYFILE #
  267. KW$IC[0] = TRUE; # SET IMMEDIATE COMPLETION #
  268. END # RESET #
  269.  
  270. KW$RPGO[0] = TRUE; # ALLOW GO RESPONSE #
  271. KP$EQ = UD$ESTO[LLR$CU[0]]; # PRESET MESSAGE PARAMETERS #
  272. P<MWBTMP> = LOC(UD$CAMF[LLR$CU[0]]);
  273. P<FETMWB> = MWB$ADDR[LLR$CIF[0]];
  274. P<FETMRA> = P<FETMWB> - 1;
  275. P<FETMRB> = FRA$MRBADR[0];
  276. KP$CN = FMR$CHAN[0];
  277. KP$DT = SM$ID[LLR$SMO[0]];
  278. KP$YA = LLR$Y[0]; # SET EMPTY CELL #
  279. KP$ZA = LLR$Z[0];
  280. KREQ(LOC(KWORD),KLINK); # SEND K-DISPLAY REQUEST #
  281. END # K #
  282.  
  283. END # EXIT #
  284.  
  285. IF LLR$DRD[0] EQ 0
  286. THEN # UPPER DRD EMPTY #
  287. BEGIN # UPPER #
  288. D0$FULL[LLR$SMO[0]] = FALSE;
  289. END # UPPER #
  290.  
  291. ELSE # LOWER DRD EMPTY #
  292. BEGIN # LOWER #
  293. D1$FULL[LLR$SMO[0]] = FALSE;
  294. END # LOWER #
  295.  
  296. GOTO ACQCART1;
  297. END # NO LOAD #
  298.  
  299. IF MS$MSG[0] EQ HFC$ACCR
  300. THEN # SET DRIVER RETURN CODE IN LLRQ #
  301. BEGIN # SET #
  302. LLR$DR[0] = RESPTYP4"UNK$CART";
  303. END # SET #
  304.  
  305. TEMPCSN0 = MS$CART0[0]; # MOVE CSN TO MSG BUFFER #
  306. TEMPCSN1 = MS$CART1[0];
  307. TEMPCSN2 = MS$CART2[0];
  308. ZFILL(UDT$MSG,MSGLT); # CLEAR STORAGE BUFFER #
  309. SM$TOPDRD[LLR$SMO[0]] = NOT SM$TOPDRD[LLR$SMO[0]];
  310. P<UDT$MSG> = P<MBFHDR> + 1;
  311. MS$CART0[0] = TEMPCSN0;
  312. MS$CART1[0] = TEMPCSN1;
  313. MS$CART2[0] = TEMPCSN2;
  314. MS$MSG[0] = HFC$RCLBP0; # SET *READ LABEL* FUNCTION #
  315. MBF$WORD[0] = 0; # CLEAR MESSAGE STATUS #
  316. MBF$SAVE[0] = SAVEMOST;
  317. LLR$RS[0] = PROCST"CONT2";
  318.  
  319. #
  320. * ISSUE M860 MESSAGE TO READ CARTRIDGE LABEL.
  321. #
  322.  
  323. ACQREAD:
  324. P<MBFHDR> = LLR$MBH[0];
  325. IF LABELBUSY AND NOT MBF$ACTIVE[0]
  326. THEN # ANOTHER REQUEST HAS LABEL BUF #
  327. BEGIN # WAIT #
  328. RETURN; # WAIT FOR FREE LABEL BUFFER #
  329. END # WAIT #
  330.  
  331. LABELBUSY = TRUE; # RESERVE LABEL BUFFER #
  332. SENDMSG; # SEND M860 MESSAGE #
  333. IF MBF$SBADDR[0] EQ 0 ##
  334. AND LLR$DR[0] EQ RESPTYP4"OK4" # GOOD HARDWARE #
  335. THEN # RESPONSE NOT YET RECEIVED #
  336. BEGIN # RETRY #
  337. RETURN;
  338. END # RETRY #
  339.  
  340. IF LLR$DR[0] EQ RESPTYP4"M86$HDW$PR" # HARDWARE ERROR #
  341. THEN # LABEL NOT NEEDED #
  342. BEGIN # M860 #
  343. LABELBUSY = FALSE;
  344. GOTO ACQCART1;
  345. END # M860 #
  346.  
  347. P<UDT$MSG> = MBF$SBADDR[0];
  348. IF LLR$PRCNME[0] EQ REQTYP4"INITHW"
  349. THEN # LABEL NOT NEEDED #
  350. BEGIN # CLEAR #
  351. LABELBUSY = FALSE;
  352. END # CLEAR #
  353.  
  354. IF MS$ASS$DT[0] EQ 0 # NO LABEL RETURNED #
  355. OR LAB$ALL[0] EQ 0 # LABEL HAS ALL ZEROES #
  356. THEN # NO LABEL ON CARTRIDGE #
  357. BEGIN # NO LABEL #
  358. LLR$DR[0] = RESPTYP4"UNK$CART";
  359. ZFILL(LABEL$CART,LABLEN); # CLEAR LABEL BUFFER #
  360. LAB$CSNA[0] = MS$CART0[0]; # MOVE CSN TO LABEL #
  361. LAB$CSNB[0] = MS$CART1A[0];
  362. LAB$CSN1A[0] = MS$CART1B[0];
  363. LAB$CSN1B[0] = MS$CART2[0];
  364. GOTO ACQCART1;
  365. END # NO LABEL #
  366.  
  367. LLR$DR[0] = RESPTYP4"CART$LB$ERR"; # ASSUME SOME OF LABEL GOOD #
  368. P<HLRQ> = LLR$UCPRA[0]; # LOCATE FAMILY/SUBFAMILY #
  369. P<TDAM> = LOC(HLR$TDAM[0]);
  370. IF LAB$CSNA[0] EQ MS$CART0[0] # HEX CSN #
  371. AND LAB$CSNB[0] EQ MS$CART1A[0] ##
  372. AND LAB$CSN1A[0] EQ MS$CART1B[0] ##
  373. AND LAB$CSN1B[0] EQ MS$CART2[0] ##
  374. AND ((LAB$CSNT[0] EQ LLR$CSNT[0] # CYBER CSN #
  375. AND LAB$FMLY[0] EQ TDAMFAM # FAMILY #
  376. AND LAB$SF[0] EQ TDAMSBF # SUBFAMILY #
  377. AND LAB$SMID[0] EQ LLR$SMA[0] # SM ID #
  378. AND LAB$Y[0] EQ LLR$Y[0] # LOCATION #
  379. AND LAB$Z[0] EQ LLR$Z[0]) ##
  380. OR LLR$PRCNME[0] EQ REQTYP4"INITHW"
  381. OR LLR$RQI[0] LS REQNAME"RQITEST") # UCP #
  382. THEN # NORMAL READ-LABEL #
  383. BEGIN # OK #
  384. LLR$DR[0] = RESPTYP4"OK4";
  385. END # OK #
  386.  
  387. IF (LAB$CSNA[0] NQ MS$CART0[0] # HEX CSN #
  388. OR LAB$CSNB[0] NQ MS$CART1A[0] ##
  389. OR LAB$CSN1A[0] NQ MS$CART1B[0] ##
  390. OR LAB$CSN1B[0] NQ MS$CART2[0]) ##
  391. AND ((LAB$CSNT[0] NQ LLR$CSNT[0] # CYBER CSN #
  392. AND LAB$FMLY[0] NQ TDAMFAM # FAMILY #
  393. AND LAB$SF[0] NQ TDAMSBF # SUBFAMILY #
  394. AND LAB$SMID[0] NQ LLR$SMA[0] # SM ID #
  395. AND (LAB$Y[0] NQ LLR$Y[0] # LOCATION #
  396. OR LAB$Z[0] NQ LLR$Z[0])) ##
  397. OR LLR$PRCNME[0] EQ REQTYP4"INITHW"
  398. OR LLR$RQI[0] LS REQNAME"RQITEST") # UCP #
  399. THEN # TOTAL LABEL MISMATCH #
  400. BEGIN # UNKNOWN #
  401. LLR$DR[0] = RESPTYP4"UNK$CART";
  402. END # UNKNOWN #
  403.  
  404. ACQCART1:
  405. IF LLR$CSNT[0] NQ 0 # *TDAM* REQUEST #
  406. AND (LLR$DR[0] EQ RESPTYP4"UNK$CART" # UNEXPECTED LABEL #
  407. OR LLR$DR[0] EQ RESPTYP4"CART$LB$ERR")
  408. THEN # EJECT CARTRIDGE #
  409. BEGIN # EJECT #
  410. LLR$Y[0] = SM$EXIT$TY;
  411. LLR$Z[0] = SM$TY$Z;
  412. END # EJECT #
  413.  
  414. LLR$RS[0] = PROCST"COMPLETE"; # ASSUME REQUEST COMPLETE #
  415. IF MS$RETCODE[0] EQ HRC$TRAYPR # INPUT TRAY EMPTY #
  416. AND NOT LLR$UCPABT[0] # EXIT IF *SSLABEL* ABORTED #
  417. THEN # RETRY LOAD FROM INPUT TRAY #
  418. BEGIN # RETRY #
  419. LLR$RS[0] = PROCST"INITIAL";
  420. END # RETRY #
  421.  
  422. IF MBF$SBADDR[0] NQ 0
  423. THEN # CLEAR SBT ENTRY #
  424. BEGIN # CLEAR #
  425. P<UDT$MSG> = MBF$SBADDR[0];
  426. ZFILL(UDT$MSG,MSGLT);
  427. END # CLEAR #
  428.  
  429. MBF$WORD[0] = 0; # CLEAR MESSAGE STATUS #
  430. RETURN;
  431.  
  432. ACQCART2:
  433. MESSAGE(FEMSG,UDFL1);
  434. ABORT;
  435. END # ACQCART #
  436.  
  437. TERM
  438. PROC BMLOG;
  439. # TITLE BMLOG - SEND MESSAGE TO BML. #
  440.  
  441. BEGIN # BMLOG #
  442.  
  443. #
  444. ** BMLOG - SEND MESSAGE TO BML.
  445. *
  446. * *BMLOG* SENDS ERROR LOG AND BUFFERED LOG MESSAGES TO THE
  447. * BINARY MAINTENANCE LOG.
  448. *
  449. * PROC BMLOG
  450. *
  451. * ENTRY THE MESSAGE FET BASED ARRAYS POINT TO THE ASSOCIATED
  452. * CHANNEL THROUGH WHICH THE M860 RESPONSE WAS SENT.
  453. *
  454. * EXIT THE M860 RESPONSE HAS BEEN REFORMATTED AND SENT TO
  455. * THE BML. THE ASSOCIATED *HLRQ* HAS BEEN UPDATED, IF
  456. * PROCESSING BUFFERED LOG DATA.
  457. *
  458. * MESSAGES *EXEC ABNORMAL, BMLOG2.* - AN ERROR OCCURRED
  459. * WHEN READING THE
  460. * LOG DATA FROM THE
  461. * MESSAGE FET.
  462. *
  463. * *BUFFERED LOG ERROR.* - AN ERROR OCCURRED
  464. * WHEN READING THE
  465. * DRD BUFFERED LOG.
  466. #
  467.  
  468.  
  469. #
  470. **** PROC BMLOG - XREF LIST BEGIN.
  471. #
  472.  
  473. XREF
  474. BEGIN
  475. PROC ABORT; # ABORT #
  476. PROC GDATA; # GET DATA FROM READ BUFFER #
  477. PROC MESSAGE; # ISSUE PREPARED MESSAGE #
  478. PROC MSG; # ISSUE MESSAGE #
  479. PROC ZFILL; # ZERO-FILL BUFFER #
  480. END
  481.  
  482. #
  483. **** PROC BMLOG - XREF LIST END.
  484. #
  485.  
  486. DEF BFLLEN #163#; # M860 BUF LOG LENGTH #
  487. DEF BFLLENM1 #162#; # M860 BUF LOG LENGTH - 1 #
  488. DEF CUCODE #O"106"#; # CU COMPONENT CODE #
  489. DEF ERLMLEN #20#; # ERROR LOG BML MSG LENGTH #
  490. DEF FORLEN #23#; # FORMATTING BUFFER LENGTH #
  491. DEF MAXBLC #19#; # NUMBER OF BUF LOG COUNTERS #
  492. DEF MAXBLCM1 #18#; # NUMBER OF BUF LOG COUNTERS - 1 #
  493. DEF M860WLEN #32#; # M860 WORD LENGTH #
  494. DEF SMCODE #O"107"#; # SM COMPONENT CODE #
  495. DEF USFORNUM #O"1200"#; # USAGE FORMAT NUMBER #
  496.  
  497. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  498. *CALL,COMBFAS
  499. *CALL,COMBFET
  500. *CALL,COMBHFC
  501. *CALL,COMBLRQ
  502. *CALL,COMBUDT
  503. *CALL,COMXHLR
  504. *CALL,COMXMSC
  505.  
  506. ITEM ASSOCDATA U; # ASSOCIATED DATA LENGTH #
  507. ITEM BUFBIT U; # BUF LOG BIT INDEX #
  508. ITEM BUFWORD U; # BUF LOG WORD INDEX #
  509. ITEM FIRSTBIT U; # FIRST BIT OF BUF LOG DRD ENTRY #
  510. ITEM FIRSTPART U; # LENGTH OF 1ST PART M860 WORD #
  511. ITEM I I; # INDEX #
  512. ITEM J I; # INDEX #
  513. ITEM STAT U; # LOG TRANSFER STATUS #
  514.  
  515. #
  516. * ARRAYS TO SEND BML MESSAGE FROM.
  517. #
  518.  
  519. ARRAY LOGHDR [0:0] S(1); # LOG HEADER WORD #
  520. BEGIN
  521. ITEM LH$WORD U(00,00,60);
  522. ITEM LH$CNT U(00,00,12); # LOG COUNT #
  523. END
  524.  
  525. ARRAY FORBUF [0:0] S(FORLEN); # FORMATTING BUFFER #
  526. BEGIN
  527. ITEM FB$WORD0 U(00,00,60); # FORMAT BUFFER WORD 0 #
  528. ITEM FB$DC U(00,00,12); # COMPONENT CODE #
  529. ITEM FB$FNUM U(00,12,12); # FORMAT NUMBER #
  530. ITEM FB$CHAN U(00,30,06); # CHANNEL #
  531. ITEM FB$SMUN U(00,48,06); # SM UNIT NUMBER #
  532. ITEM FB$DRD U(00,54,06); # DRD #
  533.  
  534. ITEM FB$WORD1 U(01,00,60); # FORMAT BUFFER WORD 1 #
  535. ITEM FB$ESTO U(01,00,12); # EST ORDINAL #
  536.  
  537. ITEM FB$WORD2 U(02,00,60); # FORMAT BUFFER WORD 2 #
  538. ITEM FB$ERLOG U(02,00,60); # ERROR LOG DATA FWA #
  539. ITEM FB$ERLFNUM U(02,00,08); # ERROR LOG FORMAT NUMBER #
  540. ITEM FB$Y U(02,21,05); # ROW NUMBER #
  541. ITEM FB$Z U(02,26,04); # COLUMN NUMBER #
  542.  
  543. ITEM FB$WORD3 U(03,00,60); # FORMAT BUFFER WORD 3 #
  544. ITEM FB$CSN C(03,00,10); # DISPLAY-CODE CSN #
  545.  
  546. ITEM FB$WORD4 U(04,00,60); # FORMAT BUFFER WORD 4 #
  547. ITEM FB$BFLOG U(04,00,60); # BUF LOG DATA FWA #
  548.  
  549. ITEM FB$WORD19 U(19,00,60); # FORMAT BUFFER WORD 19 #
  550. ITEM FB$EXCESS U(19,04,56); # EXCESS BITS #
  551. END
  552.  
  553. #
  554. * ARRAYS TO UNPACK BUFFERED LOG DATA.
  555. #
  556.  
  557. ARRAY TMPBUF [0:BFLLENM1] S(1); # FULL BUF LOG #
  558. BEGIN
  559. ITEM TBFWORD U(00,00,60); # TEMP BUF WORD #
  560. END
  561.  
  562. ARRAY TMPBYTE [0:MAXBLCM1] S(1); # BYTE-REVERSED COUNTERS #
  563. BEGIN
  564. ITEM TBYWORD U(00,00,60); # TEMP BYTE BUF WORD #
  565. END
  566.  
  567. BASED
  568. ARRAY TMPLOG [0:MAXBLCM1] S(1); # UNPACKED COUNTERS #
  569. BEGIN
  570. ITEM TLGWORD U(00,00,60); # BUF LOG WORD #
  571. END
  572.  
  573. #
  574. * BASED ARRAYS TO REFERENCE LOG DATA.
  575. #
  576.  
  577. BASED
  578. ARRAY BFBYTE [0:0] S(MAXBLC); # UNPACKED BUF LOG DATA #
  579. BEGIN
  580. ITEM BFL$STWR U(04,00,60); # STRIPES WRITTEN #
  581. ITEM BFL$SWRE U(05,00,60); # SOFT WRITE ERRORS #
  582. ITEM BFL$STDM U(08,00,60); # STRIPES DEMARKED #
  583. ITEM BFL$STRD U(10,00,60); # STRIPES READ #
  584. ITEM BFL$SRDE U(11,00,60); # SOFT READ ERRORS #
  585. ITEM BFL$CRLD U(15,00,60); # LOAD COUNT #
  586. ITEM BFL$LDER U(16,00,60); # LOAD ERRORS #
  587. END
  588.  
  589. BASED
  590. ARRAY LOGADDR [0:0] S(MAXBLC); ; # LOG FWA #
  591. CONTROL EJECT;
  592.  
  593. #
  594. * READ LOG INTO FORMAT BUFFER.
  595. #
  596.  
  597. ZFILL(FORBUF,FORLEN); # CLEAR BUFFER #
  598. LH$WORD[0] = 0;
  599. ASSOCDATA = ((MS$ASS$DT[0]*2)+14)/15;
  600. P<LOGADDR> = LOC(FB$ERLOG[0]); # ASSUME ERROR LOG #
  601. IF MS$MSG[0] GQ HFC$DBLD0 ##
  602. AND MS$MSG[0] LQ HFC$DBLD7
  603. THEN # PROCESSING BUFFERED LOG #
  604. BEGIN # RESET #
  605. ZFILL(TMPBUF,BFLLEN); # CLEAR BUFFERS #
  606. ZFILL(TMPBYTE,MAXBLC);
  607. P<LOGADDR> = LOC(TMPBUF);
  608. END # RESET #
  609.  
  610. IF MS$ASS$DT[0] NQ 0
  611. THEN # LOG EXISTS #
  612. BEGIN # READ #
  613. GDATA(FETMRB,LOGADDR,ASSOCDATA,STAT);
  614. IF STAT NQ 0
  615. THEN # ERROR IN READING LOG #
  616. BEGIN # ABORT #
  617. FE$RTN[0] = "BMLOG2.";
  618. GOTO BMLOG1;
  619. END # ABORT #
  620.  
  621. END # READ #
  622.  
  623. #
  624. * SET HEADER FIELDS COMMON TO BOTH LOGS.
  625. #
  626.  
  627. FB$CHAN[0] = FMR$CHAN[0]; # CHANNEL #
  628. FB$ESTO[0] = UD$ESTO[FMR$CU[0]]; # EST ORDINAL #
  629.  
  630. #
  631. * COMPLETE ERROR LOG MESSAGE HEADER AND SEND TO BML.
  632. #
  633.  
  634. IF P<LOGADDR> EQ LOC(FB$ERLOG[0])
  635. THEN # PROCESSING ERROR LOG #
  636. BEGIN # ERROR LOG #
  637. FB$DC[0] = CUCODE; # COMPONENT CODE #
  638. FB$FNUM[0] = FB$ERLFNUM[0]; # FORMAT NUMBER #
  639. FB$EXCESS[0] = 0; # CLEAR EXCESS LOG INFO #
  640. LH$CNT[0] = ERLMLEN;
  641. MESSAGE(LOGHDR,BML); # SEND ERROR LOG TO BML #
  642. RETURN;
  643. END # ERROR LOG #
  644.  
  645. #
  646. * COMPLETE HEADER FOR BUFFERED LOG BML MESSAGE.
  647. #
  648.  
  649. IF MS$RETCODE[0] NQ 0
  650. THEN # BUFFERED LOG ERROR #
  651. BEGIN # ERROR #
  652. MSG(" BUFFERED LOG ERROR.",SYSUDF1);
  653. IF MS$ASS$DT[0] EQ 0
  654. THEN # NO DATA TO PROCESS #
  655. BEGIN # EXIT #
  656. RETURN;
  657. END # EXIT #
  658.  
  659. END # ERROR #
  660.  
  661. FB$DC[0] = SMCODE; # COMPONENT CODE #
  662. FB$FNUM[0] = USFORNUM; # FORMAT NUMBER #
  663. FB$SMUN[0] = SM$SUN[MS$MSQN$CN[0]]; # SM UNIT NUMBER #
  664. P<LLRQ> = D1$LLADR[MS$MSQN$CN[0]]; # ASSUME LOWER DRD #
  665. FB$DRD[0] = D1$SUN[MS$MSQN$CN[0]]; # DRD UNIT NUMBER #
  666. IF MS$MSQN$D0[0]
  667. THEN # UPPER DRD BEING PROCESSED #
  668. BEGIN # RESET #
  669. P<LLRQ> = D0$LLADR[MS$MSQN$CN[0]];
  670. FB$DRD[0] = D0$SUN[MS$MSQN$CN[0]]; # DRD UNIT NUMBER #
  671. END # RESET #
  672.  
  673. FB$Y[0] = LLR$Y[0]; # LOCATION #
  674. FB$Z[0] = LLR$Z[0];
  675. FB$CSN[0] = LLR$CSNT[0]; # DISPLAY-CODE CSN #
  676.  
  677. #
  678. * UNPACK BUFFERED LOG AND SEND TO BML.
  679. #
  680.  
  681. FIRSTBIT = M860WLEN * MAXBLC * MS$MSG$D[0]; # SET START #
  682. BUFWORD = FIRSTBIT/60;
  683. BUFBIT = FIRSTBIT - (BUFWORD * 60);
  684. SLOWFOR I = 0 STEP 1 UNTIL MAXBLCM1
  685. DO # UNPACK 32-BIT WORDS #
  686. BEGIN # UNPACK #
  687. FIRSTPART = 60 - BUFBIT; # PRESET 1ST PART OF SPLIT WORD #
  688. IF FIRSTPART GR M860WLEN
  689. THEN # 32-BIT WORD NOT DIVIDED #
  690. BEGIN # RESET #
  691. FIRSTPART = M860WLEN;
  692. END # RESET #
  693.  
  694. B<0,FIRSTPART>TBYWORD[I] = B<BUFBIT,FIRSTPART>TBFWORD[BUFWORD];
  695. # MOVE FIRST PART OF WORD #
  696. IF FIRSTPART LS M860WLEN
  697. THEN # 32-BIT WORD HAS 2 PARTS #
  698. BEGIN # SECOND #
  699. B<FIRSTPART,M860WLEN-FIRSTPART>TBYWORD[I] =
  700. B<0,M860WLEN-FIRSTPART>TBFWORD[BUFWORD+1];
  701. END # SECOND #
  702.  
  703. BUFBIT = BUFBIT + M860WLEN; # POSITION TO NEXT WORD #
  704. IF BUFBIT GQ 60
  705. THEN # NEXT WORD ON 60-BIT BOUNDARY #
  706. BEGIN # NEXT #
  707. BUFBIT = BUFBIT - 60;
  708. BUFWORD = BUFWORD + 1;
  709. END # NEXT #
  710.  
  711. END # UNPACK #
  712.  
  713. P<TMPLOG> = LOC(FB$BFLOG[0]);
  714. SLOWFOR I = 0 STEP 1 UNTIL MAXBLCM1
  715. DO # REVERSE 8-BIT BYTES #
  716. BEGIN # REVERSE #
  717. SLOWFOR J = 0 STEP 1 UNTIL 3
  718. DO # TRANSFER BYTES #
  719. BEGIN # BYTE #
  720. B<60-M860WLEN+(8*J),8>TLGWORD[I] =
  721. B<8*(3-J),8>TBYWORD[I];
  722. END # BYTE #
  723.  
  724. END # REVERSE #
  725.  
  726. LH$CNT[0] = FORLEN;
  727. MESSAGE(LOGHDR,BML); # SEND BUFFERED LOG TO BML #
  728.  
  729. #
  730. * UPDATE EXEC CARTRIDGE STATISTICS.
  731. #
  732.  
  733. P<BFBYTE> = LOC(FB$BFLOG[0]);
  734. P<HLRQ> = LLR$UCPRA[0];
  735. HLR$STRD[0] = BFL$STRD[0]; # STRIPES READ #
  736. HLR$STWR[0] = BFL$STWR[0]; # STRIPES WRITTEN #
  737. HLR$SRDE[0] = BFL$SRDE[0]; # SOFT READ ERRORS #
  738. HLR$SWRE[0] = BFL$SWRE[0]; # SOFT WRITE ERRORS #
  739. HLR$STDM[0] = BFL$STDM[0]; # STRIPES DEMARKED #
  740. HLR$CRLD[0] = BFL$CRLD[0]; # LOAD COUNT #
  741. HLR$LDER[0] = BFL$LDER[0]; # LOAD ERRORS #
  742. RETURN;
  743.  
  744. BMLOG1:
  745. MESSAGE(FEMSG,UDFL1);
  746. ABORT;
  747. END # BMLOG #
  748.  
  749. TERM
  750. PROC CALLPP((FCODE));
  751. # TITLE CALLPP - ACTIVATE THE PP MODULE *1SS*. #
  752.  
  753. BEGIN # CALLPP #
  754.  
  755. #
  756. ** CALLPP - ACTIVATE THE PP MODULE *1SS*.
  757. *
  758. * *CALLPP* SENDS A MESSAGE FROM A UDT MESSAGE BUFFER TO
  759. * THE M860 HARDWARE, THROUGH A MESSAGE WRITE FET BUFFER.
  760. * IT CALLS THE PP *1SS* IF IT IS NOT ALREADY ACTIVE ON
  761. * THE DESIRED CHANNEL.
  762. *
  763. * PROC CALLPP ((FCODE))
  764. *
  765. * ENTRY (FCODE) = PP FUNCTION CODE.
  766. *
  767. * P<LLRQ> = *DRQUEUE* ENTRY ADDRESS.
  768. *
  769. * P<UDT$MSG> = UDT/SBT MESSAGE BUFFER ADDRESS.
  770. *
  771. * EXIT THE M860 MESSAGE WAS WRITTEN TO THE MESSAGE WRITE
  772. * FET BUFFER. IF A PP WAS CALLED, THE ACTIVE PP CALL
  773. * BLOCK ENTRY COUNT IS INCREMENTED. IF THE M860 MESSAGE
  774. * WAS INITIATED BY THE CPU DRIVER, THE CHANNEL MESSAGE
  775. * COUNT IS INCREMENTED.
  776. *
  777. * MESSAGES *EXEC ABNORMAL, CALLPP2.* - EXPECTED FREE CALL
  778. * BLOCK ENTRY NOT FOUND.
  779. *
  780. * *EXEC ABNORMAL, CALLPP2A.* - TWO DATA TRANSFERS WERE
  781. * TRIED ON THE SAME
  782. * CHANNEL. ONLY ONE SHOULD
  783. * BE TRIED AT A TIME.
  784. *
  785. * *EXEC ABNORMAL, CALLPP3.* - TWO RAW DATA READS WERE
  786. * TRIED. ONLY ONE SHOULD BE
  787. * ACTIVE AT A TIME.
  788. *
  789. * NOTES THE M860 MESSAGE IS NOT SENT IF IT REQUIRES THE
  790. * ACCESSOR ARM AND THE ARM IS BUSY, THE PP CALL BLOCK
  791. * TABLE IS FULL, OR NO CHANNEL COULD BE ALLOCATED.
  792. #
  793.  
  794.  
  795. #
  796. **** PROC CALLPP - XREF LIST BEGIN.
  797. #
  798.  
  799. XREF
  800. BEGIN
  801. PROC ABORT; # ABORT #
  802. PROC FSCLOG; # DUMP FSC LOG TO BML #
  803. PROC GETCHAN; # ALLOCATE CHANNEL #
  804. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  805. PROC SMSG; # SEND AND CHECKSUM MESSAGE #
  806. PROC SYSTEM; # CALL PP #
  807. END
  808.  
  809. #
  810. **** PROC CALLPP - XREF LIST END.
  811. #
  812.  
  813. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  814. *CALL,COMBFAS
  815. *CALL,COMBCDD
  816. *CALL,COMBFET
  817. *CALL,COMBHFC
  818. *CALL,COMBLBL
  819. *CALL,COMBLRQ
  820. *CALL,COMBUDT
  821. *CALL,COMXCTF
  822. *CALL,COMXMSC
  823.  
  824. ITEM CALLINDEX U; # FREE CALL BLOCK ENTRY INDEX #
  825. ITEM CU U; # CONTROLLER ORDINAL #
  826. ITEM FCODE U; # PP FUNCTION CODE PARAMETER #
  827. ITEM I I; # INDEX #
  828. ITEM RESPCOUNT U; # EXPECTED MSG RESPONSE COUNT #
  829. ITEM STAT U; # *SMSG* STATUS #
  830. CONTROL EJECT;
  831.  
  832. IF SM$ACCBUSY[LLR$SMO[0]] # SM IN USE #
  833. AND (((MS$MSG[0] EQ HFC$CHSSMA # SM STATUS CHANGE #
  834. OR MS$MSG[0] EQ HFC$CHSDRD) # DRD STATUS CHANGE #
  835. AND MS$PARM1A[0] EQ ONLINE) ##
  836. OR MS$MSG[0] LQ HFC$STCRNF # ACQUIRE OR STORE #
  837. OR MS$MSG[0] EQ HFC$ENCRDR) # ENTER #
  838. THEN # SM ARM TO BE MOVED #
  839. BEGIN # WAIT #
  840. RETURN; # WAIT FOR ARM TO STOP #
  841. END # WAIT #
  842.  
  843. #
  844. * ALLOCATE CHANNEL.
  845. #
  846.  
  847. GETCHAN(FCODE);
  848. IF P<FETMWB> EQ 0
  849. THEN # NO CHANNEL ALLOCATED #
  850. BEGIN # RETRY #
  851. RETURN; # REALLOCATE LATER #
  852. END # RETRY #
  853.  
  854. IF FMW$AT[0] NQ 0
  855. THEN # LAST MESSAGE CAUSED ERROR #
  856. BEGIN # FSC #
  857. FSCLOG(WFET); # DUMP FSC LOG TO BML #
  858. END # FSC #
  859.  
  860. CU = LLR$CU[0]; # ASSUME MESSAGE FROM LLRQ #
  861. IF MS$CU[0] NQ 0
  862. THEN # SENDING ERROR LOG MESSAGE #
  863. BEGIN # RESET #
  864. CU = MS$CU[0];
  865. END # RESET #
  866.  
  867. CALLINDEX = 0; # PRESET INDEX #
  868. IF B<FMR$CIF[0],1>UD$WBACT[CU] EQ OFF
  869. THEN # FREE CHANNEL PICKED #
  870. BEGIN # FIND CALL ENTRY #
  871. IF PPCBENCNT EQ PPCBTSIZE
  872. THEN # NO FREE CALL ENTRY #
  873. BEGIN # TRY LATER #
  874. RETURN;
  875. END # TRY LATER #
  876.  
  877. #
  878. * SEARCH FOR FREE ENTRY IN PP CALL BLOCK TABLE.
  879. #
  880.  
  881. SLOWFOR I = 1 STEP 1 WHILE (CALLINDEX EQ 0)AND(I LQ PPCBTSIZE)
  882. DO # FIND FREE CALL ENTRY #
  883. BEGIN # FIND #
  884. IF PPU$FC[I] EQ 0
  885. THEN # FREE ENTRY FOUND #
  886. BEGIN # FOUND #
  887. CALLINDEX = I;
  888. END # FOUND #
  889.  
  890. END # FIND #
  891.  
  892. IF CALLINDEX EQ 0
  893. THEN # FREE ENTRY NOT FOUND #
  894. BEGIN # ABORT #
  895. FE$RTN[0] = "CALLPP2.";
  896. GOTO CALLPP2;
  897. END # ABORT #
  898.  
  899. END # FIND CALL ENTRY #
  900.  
  901. ELSE # CHANNEL PICKED IN USE #
  902. BEGIN # IN USE #
  903. SLOWFOR I = 1 STEP 1 WHILE (CALLINDEX EQ 0)AND(I LQ PPCBTSIZE)
  904. DO # SCAN CALL BLOCK #
  905. BEGIN # SCAN #
  906. IF P<FETMWB> EQ PPU$MBADDR[I]
  907. THEN # PP IN USE FOUND #
  908. BEGIN # FOUND #
  909. CALLINDEX = I;
  910. END # FOUND #
  911.  
  912. END # SCAN #
  913.  
  914. END # IN USE #
  915.  
  916. IF FCODE EQ IRMDAT
  917. THEN # SENDING DATA #
  918. BEGIN # DATA #
  919. IF PPU$DBADDR[CALLINDEX] NQ 0
  920. THEN # 2 DATA TRANSFERS TO SAME PP #
  921. BEGIN # ABORT #
  922. FE$RTN[0] = "CALLPP2A.";
  923. GOTO CALLPP2;
  924. END # ABORT #
  925.  
  926. PPU$DBADDR[CALLINDEX] = LLR$MSFET[0]; # PASS DATA BUF ADDR #
  927. GOTO CALLPP1;
  928. END # DATA #
  929.  
  930. #
  931. * COPY MESSAGE FROM UDT/STORAGE BUFFER TO MESSAGE WRITE BUFFER.
  932. #
  933.  
  934. RESPCOUNT = 1; # ASSUME NORMAL MESSAGE #
  935. IF MS$MSG[0] GQ HFC$MVLMVR ##
  936. AND MS$MSG[0] LQ HFC$MVLMNW
  937. THEN # *MOUNT-VOLUME* MESSAGE #
  938. BEGIN # CIF #
  939. B<3-FMR$CIF[0],1>MS$INTER[0] = ON; # SWITCH BIT ORDER #
  940. B<FMR$CIF[0],1>UD$DBACT[LLR$CU[0]] = ON;
  941. RESPCOUNT = 2; # INCLUDE REWIND/UNLOAD #
  942. END # CIF #
  943.  
  944. MS$CU[0] = 0; # IN CASE ERROR LOG MESSAGE #
  945. IF MS$MSG[0] NQ HFC$WRTLBL
  946. THEN # NOT A *WRITE-LABEL* MESSAGE #
  947. BEGIN # NOT WRITE #
  948. SMSG(FETMWB,UDT$MSG,0,0,STAT);
  949. END # NOT WRITE #
  950.  
  951. ELSE # SEND *WRITE-LABEL* MESSAGE #
  952. BEGIN # WRLABEL #
  953. SMSG(FETMWB,UDT$MSG,LABEL$CART,LABLEN,STAT);
  954. END # WRLABEL #
  955.  
  956. IF STAT NQ 0
  957. THEN # MESSAGE WRITE BUFFER FULL #
  958. BEGIN # FREE CHANNEL #
  959. IF MS$MSG[0] GQ (HRF$ELGFUL + HRF$R) # ERROR LOG MESSAGE #
  960. AND MS$MSG[0] LQ (HRF$REQDMP + HRF$R)
  961. THEN # INDICATE RESPONSE NOT SENT #
  962. BEGIN # RESTORE #
  963. MS$CU[0] = CU;
  964. END # RESTORE #
  965.  
  966. RETURN; # TRY LATER #
  967. END # FREE CHANNEL #
  968.  
  969. IF MS$MSG[0] EQ HFC$RDRAW
  970. THEN # READING RAW DATA #
  971. BEGIN # RAW #
  972. IF FMR$RDBA[0] NQ 0 # READING 2 RAW STRIPES #
  973. THEN # SHOULD BE ONLY ONE #
  974. BEGIN # ABORT #
  975. FE$RTN[0] = "CALLPP3.";
  976. GOTO CALLPP2;
  977. END # ABORT #
  978.  
  979. P<FETFHB> = LLR$MSFET[0];
  980. FMR$RDBA[0] = FHB$FRST[0] + MSGLT; # SET RAW DATA ADDRESS #
  981. END # RAW #
  982.  
  983. IF MS$MSG[0] LQ HFC$STCRNF # ACQUIRE OR STORE #
  984. OR MS$MSG[0] EQ HFC$ENCRDR # ENTER #
  985. OR ((MS$MSG[0] EQ HFC$CHSSMA # SM STATUS CHANGE #
  986. OR MS$MSG[0] EQ HFC$CHSDRD) # DRD STATUS CHANGE #
  987. AND MS$PARM1A[0] EQ ONLINE)
  988. THEN # RESERVE SM ARM #
  989. BEGIN # SM #
  990. SM$ACCBUSY[LLR$SMO[0]] = TRUE;
  991. END # SM #
  992.  
  993. IF MS$MSG[0] LS (HRF$ELGFUL + HRF$R) # NOT ERROR LOG MSG #
  994. OR MS$MSG[0] GR (HRF$REQDMP + HRF$R)
  995. THEN # LLRQ SENT MESSAGE #
  996. BEGIN # LLRQ #
  997. MBF$SENT[0] = TRUE; # MESSAGE SENT TO PP #
  998. LLR$CIF[0] = FMR$CIF[0];
  999. END # LLRQ #
  1000.  
  1001. #
  1002. * DO NOT INCREMENT MESSAGE COUNT IF NO M860 RESPONSE EXPECTED.
  1003. #
  1004.  
  1005. IF NOT MS$MSG$R[0]
  1006. THEN # DRIVER-INITIATED MESSAGE #
  1007. BEGIN # ADD #
  1008. MSGCNT(FMR$CIF[0],LLR$CU[0]) = MSGCNT(FMR$CIF[0],LLR$CU[0])
  1009. + RESPCOUNT;
  1010. # UPDATE CHANNEL MSG COUNT #
  1011. END # ADD #
  1012.  
  1013. #
  1014. * PRESET PP CALL BLOCK TABLE ENTRY, IF NO PP IS ACTIVE ON
  1015. * THE CHOSEN CHANNEL.
  1016. #
  1017.  
  1018. CALLPP1:
  1019. IF B<FMR$CIF[0],1>UD$WBACT[CU] EQ OFF
  1020. THEN # FREE CHANNEL #
  1021. BEGIN # CALL PP #
  1022. PPCBENCNT = PPCBENCNT + 1; # CREATE NEW ENTRY #
  1023. B<FMR$CIF[0],1>UD$WBACT[CU] = ON;
  1024. PPU$MBADDR[CALLINDEX] = P<FETMWB>;
  1025. PPU$FC[CALLINDEX] = FCODE;
  1026. PPU$ACTIVE[CALLINDEX] = TRUE;
  1027. PPU$ESTORD[CALLINDEX] = UD$ESTO[CU];
  1028. PPU$CNTORD[CALLINDEX] = CU;
  1029. PPT$WORD0[0] = PPU$WORD0[CALLINDEX]; # PRESET FOR PP CALL #
  1030. SPC$ADDR[0] = LOC(PPT$WORD0[0]);
  1031. REPEAT WHILE PPT$WORD0[0] NQ 0
  1032. DO # ISSUE PP CALL #
  1033. BEGIN # PP #
  1034. SYSTEM(SPC,NRCL);
  1035. END # PP #
  1036.  
  1037. END # CALL PP #
  1038.  
  1039. DRVRACTIVE = TRUE;
  1040. RETURN;
  1041.  
  1042. CALLPP2:
  1043. MESSAGE(FEMSG,UDFL1);
  1044. ABORT;
  1045. END # CALLPP #
  1046.  
  1047. TERM
  1048. PROC CRMSG;
  1049. # TITLE CRMSG - CREATE M860 MESSAGE. #
  1050.  
  1051. BEGIN # CRMSG #
  1052.  
  1053. #
  1054. ** CRMSG - CREATE M860 MESSAGE.
  1055. *
  1056. * *CRMSG* CREATES AN M860 MESSAGE WITHIN A UDT MESSAGE BUFFER.
  1057. *
  1058. * PROC CRMSG
  1059. *
  1060. * ENTRY P<LLRQ> = *DRQUEUE* ENTRY ADDRESS.
  1061. *
  1062. * P<UDT$MSG> = UDT MESSAGE BUFFER ADDRESS.
  1063. *
  1064. * THE UDT MESSAGE BUFFER CONTAINS THE M860 FUNCTION
  1065. * DEFINING THE MESSAGE TO BE CREATED.
  1066. *
  1067. * EXIT IF THE M860 FUNCTION WAS A PATH/DEVICE STATUS CHANGE
  1068. * OR A *START ERROR LOG*, AND THE UDT HAS BEEN
  1069. * COMPLETELY PROCESSED, THEN THE UDT MESSAGE BUFFER
  1070. * ACTIVE FLAG IS LEFT CLEAR, AND NO MESSAGE IS CREATED.
  1071. * OTHERWISE, AN M860 MESSAGE IS CREATED, AND THE ACTIVE
  1072. * FLAG IS SET.
  1073. *
  1074. * MESSAGES *EXEC ABNORMAL, CRMSG1.* - UDT MESSAGE BUFFER STILL
  1075. * IN USE, OR MESSAGE
  1076. * SEQUENCE NUMBER IS CLEARED.
  1077. *
  1078. * *EXEC ABNORMAL, CRMSG1A.* - MULTIPLE REQUESTS ARE
  1079. * PROCESSING SERVICE CELLS
  1080. * WHEN TURNING ON A DRD.
  1081. *
  1082. * *EXEC ABNORMAL, CRMSG4.* - MULTIPLE REQUESTS ARE
  1083. * PROCESSING SERVICE CELLS
  1084. * WHEN TURNING ON AN SM.
  1085. *
  1086. * *EXEC ABNORMAL, CRMSG5.* - INVALID SUBTYPE FOR A
  1087. * *START ERROR LOG* FUNCTION.
  1088. *
  1089. * NOTES A UDT MESSAGE BUFFER IS NEVER CLEARED, EXCEPT WHEN
  1090. * PREPARING TO CREATE ANOTHER MESSAGE IN IT. THIS IS
  1091. * DONE TO KEEP AN ACCURATE HISTORY FOR DEBUGGING
  1092. * PURPOSES.
  1093. #
  1094.  
  1095.  
  1096. #
  1097. **** PROC CRMSG - XREF LIST BEGIN.
  1098. #
  1099.  
  1100. XREF
  1101. BEGIN
  1102. PROC ABORT; # ABORT #
  1103. PROC GETCHAN; # ALLOCATE CHANNEL #
  1104. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  1105. PROC PDATE; # GET PACKED DATE AND TIME #
  1106. PROC ZFILL; # ZERO-FILL BUFFER #
  1107. END
  1108.  
  1109. #
  1110. **** PROC CRMSG - XREF LIST END.
  1111. #
  1112.  
  1113. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  1114. *CALL,COMBFAS
  1115. *CALL,COMBCDD
  1116. *CALL,COMBCPR
  1117. *CALL,COMBFET
  1118. *CALL,COMBHFC
  1119. *CALL,COMBLBL
  1120. *CALL,COMBLRQ
  1121. *CALL,COMBUDT
  1122. *CALL,COMXCTF
  1123. *CALL,COMXMSC
  1124.  
  1125. #
  1126. * DEFINITIONS TO CREATE *CHANGE STATUS* MESSAGES.
  1127. #
  1128.  
  1129. DEF CIFMASK #X"0000"#; # TURN OFF *CIF* ERROR LOGGING #
  1130. DEF CONTDAV #1#; # CONTROLLER DEVICE ADDR VALUE #
  1131. DEF DRDHNMASK #X"8190"#; # SET DRD/HANDLER ERROR LOGGING #
  1132. DEF EOTBSC #1#; # EOT BUFFER STRIPE COUNT #
  1133. DEF FIELDSM1 #7#; # COUNT OF 6-BIT FIELDS MINUS 1 #
  1134.  
  1135. ITEM DRDWORD U; # SAVED DRD STATUS WORD ADDRESS #
  1136. ITEM FOUND B; # SET IF PATH/DEVICE FOUND #
  1137. ITEM I I; # INDEX #
  1138. ITEM J I; # INDEX #
  1139. ITEM MSGFTN U; # SAVED M860 FUNCTION #
  1140. ITEM MSGSEQN U; # SAVED MSG SEQUENCE NUMBER #
  1141. ITEM NEWPTHSTAT U; # NEW PATH STATUS #
  1142. ITEM START U; # 1ST LINE TO CHECK ACK BITS #
  1143. ITEM TEMPCIF U; # SAVED *CIF* NUMBER #
  1144. ITEM TEMPCSN0 U; # FIRST 4 BYTES OF CSN #
  1145. ITEM TEMPCSN1 U; # NEXT 6 BYTES OF CSN #
  1146. ITEM TEMPCSN2 U; # LAST 2 BYTES OF CSN #
  1147. ITEM TEMPDRD U; # SAVED *DRD* UNIT NUMBER #
  1148.  
  1149. #
  1150. * ARRAY USED TO CREATE *SET DATE/TIME* MESSAGES.
  1151. #
  1152.  
  1153. ARRAY DATETIME [0:0] S(1); # PACKED DATE AND TIME #
  1154. BEGIN
  1155. ITEM DT$YEAR U(00,24,06); # YEAR MINUS 1970 #
  1156. ITEM DT$MONTH U(00,30,06); # MONTH #
  1157. ITEM DT$DAY U(00,36,06); # DAY #
  1158. ITEM DT$HOUR U(00,42,06); # HOUR #
  1159. ITEM DT$MINUTE U(00,48,06); # MINUTE #
  1160. ITEM DT$SECOND U(00,54,06); # SECOND #
  1161. END
  1162.  
  1163. #
  1164. * ARRAYS USED TO CREATE *CHANGE STATUS* MESSAGES.
  1165. #
  1166.  
  1167. ARRAY PTH [0:6] S(1); # UDT PATH STRUCTURE #
  1168. BEGIN
  1169. ITEM PTH$LASTLN U(00,06,06) = [6,,10,,3,4,2];
  1170. ITEM PTH$FRSTLN U(00,12,06) = [5,,7,,3,4,1];
  1171. END
  1172.  
  1173. ARRAY BNODE [3:6] S(1); # BOTTOM PATH NODES #
  1174. BEGIN
  1175. ITEM NODE$B U(00,00,60); # PATH WORD #
  1176. ITEM NODE$B0 U(00,00,06) = [0,0,1,1];
  1177. ITEM NODE$B1 U(00,06,06) = [1,1,3,3];
  1178. ITEM NODE$B2 U(00,12,06) = [2,0,0,0];
  1179. ITEM NODE$B3 U(00,18,06) = [3,1,2,2];
  1180. ITEM NODE$B4 U(00,24,06) = [0,0,1,1];
  1181. ITEM NODE$B5 U(00,30,06) = [1,1,3,3];
  1182. ITEM NODE$B6 U(00,36,06) = [2,0,0,0];
  1183. ITEM NODE$B7 U(00,42,06) = [3,1,2,2];
  1184. END
  1185.  
  1186. ARRAY TNODE [1:10] S(1); # TOP PATH NODES #
  1187. BEGIN
  1188. ITEM NODE$T U(00,00,60); # PATH WORD #
  1189. ITEM NODE$T0 U(00,00,06) = [0,1,0,1,0,2,0,1,2,3];
  1190. ITEM NODE$T1 U(00,06,06) = [0,1,0,1,0,2,0,1,2,3];
  1191. ITEM NODE$T2 U(00,12,06) = [0,1,0,3,0,2,0,1,2,3];
  1192. ITEM NODE$T3 U(00,18,06) = [0,1,0,3,0,2,0,1,2,3];
  1193. ITEM NODE$T4 U(00,24,06) = [0,1,1,0,1,3,0,1,2,3];
  1194. ITEM NODE$T5 U(00,30,06) = [0,1,1,0,1,3,0,1,2,3];
  1195. ITEM NODE$T6 U(00,36,06) = [0,1,1,2,1,3,0,1,2,3];
  1196. ITEM NODE$T7 U(00,42,06) = [0,1,1,2,1,3,0,1,2,3];
  1197. END
  1198.  
  1199. SWITCH M860FUNCTN # M860 FUNCTION CODES #
  1200. , # RESERVED #
  1201. ACQUIRECRT, # ACQUIRE CARTRIDGE #
  1202. STORECRT, # STORE CARTRIDGE #
  1203. , # RESERVED #
  1204. READCRTLBL, # READ CARTRIDGE LABEL #
  1205. WRTLBLCRT, # WRITE CARTRIDGE LABEL #
  1206. MNTVOLUME, # MOUNT VOLUME #
  1207. WRTLBLVOL, # WRITE VOLUME LABEL #
  1208. ENTERCRT, # ENTER CARTRIDGE #
  1209. , # RESERVED #
  1210. , # RESERVED #
  1211. CHANGEPATH, # CHANGE PATH STATUS #
  1212. DUMPBUFLOG, # DUMP BUFFERED LOG #
  1213. , # RESERVED #
  1214. SETDATTIME, # SET DATE/TIME #
  1215. , # RESERVED #
  1216. SETMASCHAN, # SET MASTER CHANNEL #
  1217. RDRAWSTRP, # READ RAW STRIPE #
  1218. , # RESERVED #
  1219. STERRLOG, # START/STOP ERROR LOG #
  1220. , # RESERVED #
  1221. , # RESERVED #
  1222. SETERRLEN, # SET ERROR LOG LENGTH #
  1223. , # RESERVED #
  1224. , # RESERVED #
  1225. , # RESERVED #
  1226. , # RESERVED #
  1227. , # RESERVED #
  1228. RESTARTCU; # RESTART CONTROLLER #
  1229. CONTROL EJECT;
  1230.  
  1231. IF MBF$SBADDR[0] NQ 0 ##
  1232. OR MS$MSQN[0] EQ 0
  1233. THEN # MESSAGE ERROR #
  1234. BEGIN # ABORT #
  1235. FE$RTN[0] = "CRMSG1.";
  1236. MESSAGE(FEMSG,UDFL1);
  1237. ABORT;
  1238. END # ABORT #
  1239.  
  1240. IF MS$MSG[0] NQ HFC$CHSSMA # HANDLED LATER #
  1241. AND MS$MSG[0] NQ HFC$CHSDRD
  1242. THEN # INDICATE DRIVER ACTIVITY #
  1243. BEGIN # ACTIVE #
  1244. DRVRACTIVE = TRUE;
  1245. END # ACTIVE #
  1246.  
  1247. IF MBF$SAVE[0] NQ SAVENONE
  1248. THEN # PRESERVE PART OF MSG BUFFER #
  1249. BEGIN # PRESET NORMALLY #
  1250. MBF$ACTIVE[0] = TRUE; # MESSAGE BUFFER NOW ACTIVE #
  1251. MSGSEQN = MS$MSQN[0]; # SAVE MSG SEQUENCE NUMBER #
  1252. MSGFTN = MS$MSG[0]; # SAVE M860 FUNCTION #
  1253. IF MBF$SAVE[0] EQ SAVEMOST
  1254. THEN # SAVE CSN AND DRD #
  1255. BEGIN # SAVE #
  1256. TEMPCSN0 = MS$CART0[0];
  1257. TEMPCSN1 = MS$CART1[0];
  1258. TEMPCSN2 = MS$CART2[0];
  1259. TEMPDRD = MS$DRDN[0];
  1260. END # SAVE #
  1261.  
  1262. ZFILL(UDT$MSG,MSGLT); # CLEAR MESSAGE BUFFER #
  1263. MS$MSG[0] = MSGFTN;
  1264. MS$MSQN[0] = MSGSEQN;
  1265. IF MBF$SAVE[0] EQ SAVEMOST
  1266. THEN # RESTORE CSN AND DRD #
  1267. BEGIN # RESTORE #
  1268. MS$CART0[0] = TEMPCSN0;
  1269. MS$CART1[0] = TEMPCSN1;
  1270. MS$CART2[0] = TEMPCSN2;
  1271. MS$DRDN[0] = TEMPDRD;
  1272. END # RESTORE #
  1273.  
  1274. END # PRESET NORMALLY #
  1275.  
  1276. GOTO M860FUNCTN[MS$MSG$M[0]];
  1277.  
  1278. #
  1279. * CREATE *LOAD CARTRIDGE* MESSAGE.
  1280. #
  1281.  
  1282. ACQUIRECRT:
  1283. MS$YADD[0] = LLR$Y[0]; # SET COORDINATES #
  1284. MS$ZADD[0] = LLR$Z[0];
  1285. MS$CART0[0] = O"31160552100"; # ** *IBM * EBCDIC #
  1286. SLOWFOR I = 0 STEP 1 UNTIL FIELDSM1
  1287. DO # CONVERT CSN TO EBCDIC #
  1288. BEGIN # CONVERT #
  1289. IF I LQ 5 ##
  1290. THEN # BYTES 1 THRU 6 #
  1291. BEGIN # I LQ 5 #
  1292. B<I*8,8>MS$CART1[0] = X"F0" LOR B<I*6,6>LLR$CSND[0] - O"33";
  1293. END # I LQ 5 #
  1294.  
  1295. ELSE # BYTES 7 AND 8 #
  1296. BEGIN # I GR 5 #
  1297. B<(I-6)*8,8>MS$CART2[0] = X"F0" LOR
  1298. B<I*6,6>LLR$CSND[0] - O"33";
  1299. END # I GR 5 #
  1300.  
  1301. END # CONVERT #
  1302.  
  1303. GOTO ENTERCRT; # SET DRD AND LOCATION #
  1304. RETURN;
  1305.  
  1306. #
  1307. * CREATE *CHANGE DRD STATUS* MESSAGE.
  1308. #
  1309.  
  1310. CHANGEDRD:
  1311. FOUND = FALSE;
  1312. UD$DRDWAIT[LLR$CU[0]] = FALSE; # ASSUME CHANGING DRD-S EMPTY #
  1313. SLOWFOR I = 0 STEP 1 WHILE I LQ MAX$DRD AND NOT FOUND
  1314. DO # SEARCH FOR DRD CHANGING STATUS #
  1315. BEGIN # SEARCH #
  1316. SMO = B<I*6,6>UD$SMORDS[LLR$CU[0]];
  1317. IF SMO EQ 0 ##
  1318. OR NOT SM$EXIST[SMO]
  1319. THEN # SM NOT FOUND #
  1320. BEGIN # RETRY #
  1321. TEST I;
  1322. END # RETRY #
  1323.  
  1324. DRST = DRST1; # ASSUME 2ND CU #
  1325. IF LLR$CU[0] EQ SM$CUO0[SMO]
  1326. THEN # 1ST CU CHANGING DRD STATUS #
  1327. BEGIN # RESET #
  1328. DRST = DRST0;
  1329. END # RESET #
  1330.  
  1331. DRDWORD = LOC(D1$ST[SMO]); # CHECK LOWER DRD FIRST #
  1332. SLOWFOR J = 1 STEP 1 WHILE J LQ MAX$SMDRD AND NOT FOUND
  1333. DO # CHECK BOTH DRD-S OF ELIGIBLE SM #
  1334. BEGIN # DRD-S #
  1335. P<PTHSTAT> = DRDWORD; # CHECK NEXT DRD #
  1336. IF PATHBIT(DRST,PATH$DF"U$EXISTS") EQ ON ##
  1337. AND PATHBIT(DRST,PATH$DF"U$DONE") EQ OFF # NOT CHECKED #
  1338. AND (UD$CNUP[LLR$CU[0]] # IGNORE ACK BITS IF SET #
  1339. OR PATHBIT(DRST,PATH$DF"U$CU$ACK") EQ ON # ON/OFF STATUS #
  1340. OR PATHBIT(DRST,PATH$DF"U$DIAG$ACK") EQ ON) # DIAG STATUS #
  1341. THEN # DRD CHANGING STATUS #
  1342. BEGIN # CHANGING #
  1343. IF (P<PTHSTAT> EQ LOC(D0$ST[SMO]) AND D0$FULL[SMO] ##
  1344. AND P<LLRQ> NQ D0$LLADR[SMO]) # OTHER DRD COULD GO OFF #
  1345. OR (P<PTHSTAT> EQ LOC(D1$ST[SMO]) AND D1$FULL[SMO] ##
  1346. AND P<LLRQ> NQ D1$LLADR[SMO])
  1347. THEN # CHOSEN DRD STILL FULL #
  1348. BEGIN # SKIP #
  1349. UD$DRDWAIT[LLR$CU[0]] = TRUE; # HAVE LLRQ RETRY #
  1350. DRDWORD = LOC(D0$ST[SMO]); # IN CASE AT DRD 1 #
  1351. TEST J;
  1352. END # SKIP #
  1353.  
  1354. PATHBIT(DRST,PATH$DF"U$DONE") = ON;
  1355. IF P<PTHSTAT> EQ LOC(D0$ST[SMO])
  1356. THEN # UPPER DRD PROCESSED #
  1357. BEGIN # DRD 0 #
  1358. D0$DONE[SMO] = TRUE;
  1359. END # DRD 0 #
  1360.  
  1361. ELSE # LOWER DRD PROCESSED #
  1362. BEGIN # DRD 1 #
  1363. D1$DONE[SMO] = TRUE;
  1364. END # DRD 1 #
  1365.  
  1366. FOUND = TRUE;
  1367. TEST J;
  1368. END # CHANGING #
  1369.  
  1370. DRDWORD = LOC(D0$ST[SMO]); # CHECK UPPER DRD NEXT #
  1371. END # DRD-S #
  1372.  
  1373. END # SEARCH #
  1374.  
  1375. IF NOT FOUND
  1376. THEN # NO DRD LEFT TO PROCESS #
  1377. BEGIN # EXIT #
  1378. IF UD$DRDWAIT[LLR$CU[0]]
  1379. THEN # STILL WAITING FOR DRD TO EMPTY #
  1380. BEGIN # WAIT #
  1381. RETURN;
  1382. END # WAIT #
  1383.  
  1384. DRVRACTIVE = TRUE; # SO DRD ERROR SENDS K-DISPLAY #
  1385. SLOWFOR I = 0 STEP 1 UNTIL MAX$DRD
  1386. DO # CLEAR DRD DONE FLAGS #
  1387. BEGIN # CLEAR #
  1388. SMO = B<I*6,6>UD$SMORDS[LLR$CU[0]];
  1389. IF SMO EQ 0 ##
  1390. OR NOT SM$EXIST[SMO] # NO SM #
  1391. THEN # TRY NEXT ORDINAL #
  1392. BEGIN # NEXT #
  1393. TEST I;
  1394. END # NEXT #
  1395.  
  1396. DRST = DRST1; # ASSUME 2ND CU #
  1397. IF LLR$CU[0] EQ SM$CUO0[SMO]
  1398. THEN # 1ST CU PROCESSED DRD #
  1399. BEGIN # RESET #
  1400. DRST = DRST0;
  1401. END # RESET #
  1402.  
  1403. P<PTHSTAT> = LOC(D0$ST[SMO]); # CLEAR DRD 0 FLAG #
  1404. PATHBIT(DRST,PATH$DF"U$DONE") = OFF;
  1405. GOTO CRMSGA;
  1406.  
  1407. CRMSGA:##
  1408. D0$FLAG[SMO] = B<12,6>D0$WD0[SMO] LOR B<18,6>D0$WD0[SMO];
  1409. GOTO CRMSGB;
  1410.  
  1411. CRMSGB:##
  1412. P<PTHSTAT> = LOC(D1$ST[SMO]); # CLEAR DRD 1 FLAG #
  1413. PATHBIT(DRST,PATH$DF"U$DONE") = OFF;
  1414. GOTO CRMSGC;
  1415.  
  1416. CRMSGC:##
  1417. D1$FLAG[SMO] = B<12,6>D1$WD0[SMO] LOR B<18,6>D1$WD0[SMO];
  1418. END # CLEAR #
  1419.  
  1420. RETURN;
  1421. END # EXIT #
  1422.  
  1423. DRVRACTIVE = TRUE; # INDICATE DRIVER ACTIVITY #
  1424. UD$LLRQA[LLR$CU[0]] = P<LLRQ>; # STORE LLRQ ADDRESS #
  1425. MBF$ACTIVE[0] = TRUE;
  1426. MSGSEQN = MS$MSQN$CN[0]; # PRESET MESSAGE BUFFER #
  1427. MSGFTN = MS$MSG[0];
  1428. ZFILL(UDT$MSG,MSGLT);
  1429. MS$MSQN$CN[0] = MSGSEQN;
  1430. MS$MSG[0] = MSGFTN;
  1431. MS$DRDN[0] = D1$SUN[SMO]; # ASSUME LOWER DRD #
  1432. LLR$DRD[0] = 1;
  1433. IF P<PTHSTAT> EQ LOC(D0$ST[SMO])
  1434. THEN # UPPER DRD BEING CHANGED #
  1435. BEGIN # RESET #
  1436. MS$DRDN[0] = D0$SUN[SMO];
  1437. LLR$DRD[0] = 0;
  1438. END # RESET #
  1439.  
  1440. IF PATHBIT(DRST,PATH$DF"U$ON") EQ 1 ##
  1441. AND (UD$CNUP[LLR$CU[0]] ##
  1442. OR PATHBIT(DRST,PATH$DF"U$CU$ACK") EQ 1)
  1443. THEN # DRD GOING ONLINE #
  1444. BEGIN # ON #
  1445. PATHBIT(DRST,PATH$DF"U$CU$ACK") = 1; # IN CASE CU RESTARTING #
  1446. MS$PARM1A[0] = ONLINE;
  1447. IF SM$SCCU[SMO]
  1448. THEN # 2 REQUESTS CHECKING SRV CELLS #
  1449. BEGIN # ABORT #
  1450. FE$RTN[0] = "CRMSG1A.";
  1451. MESSAGE(FEMSG,UDFL1);
  1452. ABORT;
  1453. END # ABORT #
  1454.  
  1455. SM$SCCU[SMO] = TRUE; # CHECK SERVICE CELLS #
  1456. END # ON #
  1457.  
  1458. IF PATHBIT(DRST,PATH$DF"U$ON") EQ OFF ##
  1459. AND PATHBIT(DRST,PATH$DF"U$RQ$DIAG") EQ OFF
  1460. THEN # DRD GOING OFFLINE #
  1461. BEGIN # OFF #
  1462. MS$PARM1A[0] = OFFLINE;
  1463. END # OFF #
  1464.  
  1465. IF PATHBIT(DRST,PATH$DF"U$RQ$DIAG") EQ 1 ##
  1466. AND (UD$CNUP[LLR$CU[0]] ##
  1467. OR PATHBIT(DRST,PATH$DF"U$DIAG$ACK") EQ 1)
  1468. THEN # DRD GOING INTO DIAGNOSTIC MODE #
  1469. BEGIN # DIAG #
  1470. MS$PARM1A[0] = DIAGNOSTIC;
  1471. END # DIAG #
  1472.  
  1473. LLR$SMO[0] = SMO; # SAVE SM ORDINAL #
  1474. RETURN;
  1475.  
  1476. #
  1477. * CREATE *CHANGE PATH STATUS* MESSAGE.
  1478. #
  1479.  
  1480. CHANGEPATH:
  1481. IF MS$MSG[0] EQ HFC$CHSSMA
  1482. THEN # CHANGE SM STATUS #
  1483. BEGIN # SM #
  1484. GOTO CHANGESM;
  1485. END # SM #
  1486.  
  1487. IF MS$MSG[0] EQ HFC$CHSDRD
  1488. THEN # CHANGE DRD STATUS #
  1489. BEGIN # DRD #
  1490. GOTO CHANGEDRD;
  1491. END # DRD #
  1492.  
  1493. ACKLINE = 0; # PRESET ACK BIT LOCATION IN UDT #
  1494. ACKINDEX = 0;
  1495. START = PTH$FRSTLN[MS$MSG$S[0]]; # PRESET FIRST LINE OF SEARCH #
  1496. FOUND = FALSE;
  1497.  
  1498. #
  1499. * SEARCH FOR ACKNOWLEDGE BITS SET FOR THE DESIRED PATH.
  1500. #
  1501.  
  1502. SLOWFOR I = START STEP 1 UNTIL PTH$LASTLN[MS$MSG$S[0]]
  1503. DO # SCAN UDT PATH WORDS #
  1504. BEGIN # SCAN WORDS #
  1505. IF NOT FOUND
  1506. THEN # CONTINUE WORD SCAN #
  1507. BEGIN # CHECK WORD #
  1508. P<PTHSTAT> = P<UDT$CN> + ((LLR$CU[0]-1) * UDTCNTL) + I;
  1509. SLOWFOR J = 0 STEP 1 UNTIL FIELDSM1
  1510. DO # SCAN UDT PATH ACK BITS #
  1511. BEGIN # SCAN BITS #
  1512. IF NOT FOUND
  1513. THEN # CONTINUE BIT SCAN #
  1514. BEGIN # CHECK BITS #
  1515. IF PATHBIT(J,PATH$DF"U$EXISTS") EQ ON ##
  1516. AND PATHBIT(J,PATH$DF"U$DONE") EQ OFF
  1517. THEN # PATH EXISTS AND NOT PROCESSED #
  1518. BEGIN # SEND MSG #
  1519. IF PATHBIT(J,PATH$DF"U$ON") EQ ON ##
  1520. AND (UD$CNUP[LLR$CU[0]] ##
  1521. OR PATHBIT(J,PATH$DF"U$CU$ACK") EQ ON)
  1522. THEN # SEND ON MSG #
  1523. BEGIN # ONLINE #
  1524. PATHBIT(J,PATH$DF"U$CU$ACK") = ON; # SET ON ACK #
  1525. PATHBIT(J,PATH$DF"U$DONE") = ON; # IGNORE CU CNUP #
  1526. NEWPTHSTAT = ONLINE;
  1527. FOUND = TRUE;
  1528. ACKLINE = I; # SAVE LOCATION #
  1529. ACKINDEX = J;
  1530. END # ONLINE #
  1531.  
  1532. IF PATHBIT(J,PATH$DF"U$ON") EQ OFF
  1533. THEN # PATH IS OFF #
  1534. BEGIN # OFF #
  1535. IF UD$CNUP[LLR$CU[0]]
  1536. THEN # CONTROLLER RESTARTING #
  1537. BEGIN # CLEAR #
  1538. PATHBIT(J,PATH$DF"U$CU$ACK") = OFF;
  1539. END # CLEAR #
  1540.  
  1541. IF PATHBIT(J,PATH$DF"U$CU$ACK") EQ ON
  1542. THEN # SEND OFF MSG #
  1543. BEGIN # OFFLINE #
  1544. PATHBIT(J,PATH$DF"U$DONE") = ON; # IGNORE CNUP #
  1545. NEWPTHSTAT = OFFLINE;
  1546. FOUND = TRUE;
  1547. ACKLINE = I; # SAVE LOCATION #
  1548. ACKINDEX = J;
  1549. END # OFFLINE #
  1550.  
  1551. END # OFF #
  1552.  
  1553. END # SEND MSG #
  1554.  
  1555. END # CHECK BITS #
  1556.  
  1557. END # SCAN BITS #
  1558.  
  1559. END # CHECK WORD #
  1560.  
  1561. END # SCAN WORDS #
  1562.  
  1563. IF NOT FOUND
  1564. THEN # ALL STATUS CHANGES COMPLETED #
  1565. BEGIN # EXIT #
  1566. SLOWFOR I = START STEP 1 UNTIL PTH$LASTLN[MS$MSG$S[0]]
  1567. DO # SCAN UDT PATH WORDS #
  1568. BEGIN # SCAN #
  1569. P<PTHSTAT> = P<UDT$CN> + ((LLR$CU[0]-1) * UDTCNTL) + I;
  1570. SLOWFOR J = 0 STEP 1 UNTIL FIELDSM1
  1571. DO # CLEAR PATH-PROCESSED BITS #
  1572. BEGIN # CLEAR #
  1573. PATHBIT(J,PATH$DF"U$DONE") = OFF;
  1574. END # CLEAR #
  1575.  
  1576. END # SCAN #
  1577.  
  1578. RETURN; # LEAVE MSG BUF FLAG CLEAR #
  1579. END # EXIT #
  1580.  
  1581. #
  1582. * STORE PATH INFORMATION INTO MESSAGE BUFFER.
  1583. #
  1584.  
  1585. MSGSEQN = MS$MSQN$CN[0]; # PRESET MESSAGE BUFFER #
  1586. MSGFTN = MS$MSG[0];
  1587. ZFILL(UDT$MSG,MSGLT);
  1588. MS$MSQN$CN[0] = MSGSEQN;
  1589. MS$MSG[0] = MSGFTN;
  1590. MS$PARM1A[0] = NEWPTHSTAT; # SET NEW PATH STATUS #
  1591. MS$PATH[0] = B<ACKINDEX*6,6>NODE$B[ACKLINE]; # ASSUME PATH #
  1592. IF MS$MSG[0] EQ HFC$CHSAIF
  1593. THEN # SET SM UNIT NUMBER #
  1594. BEGIN # RESET #
  1595. MS$PATH[0] = SM$SUN[B<ACKINDEX*6,6>UD$SMORDS[LLR$CU[0]]];
  1596. END # RESET #
  1597.  
  1598. IF MS$MSG[0] EQ HFC$CHSDRC
  1599. THEN # SET DRD UNIT NUMBER #
  1600. BEGIN # RESET #
  1601. MS$PATH[0] = ACKINDEX;
  1602. IF P<PTHSTAT> GQ LOC(UD$DRCP2[LLR$CU[0]])
  1603. THEN # 2ND DRD GROUP BEING ACCESSED #
  1604. BEGIN # 2ND #
  1605. MS$PATH[0] = ACKINDEX + 8;
  1606. END # 2ND #
  1607.  
  1608. END # RESET #
  1609.  
  1610. MS$DRDN[0] = B<ACKINDEX*6,6>NODE$T[ACKLINE];
  1611. MBF$ACTIVE[0] = TRUE; # SET MSG BUFFER ACTIVE #
  1612. UD$LLRQA[LLR$CU[0]] = P<LLRQ>; # STORE LLRQ ADDRESS #
  1613. LLR$ACKIN[0] = ACKINDEX; # STORE UDT ACK LOCATION #
  1614. LLR$ACKLN[0] = ACKLINE;
  1615. RETURN;
  1616.  
  1617. #
  1618. * CREATE *CHANGE SM STATUS* MESSAGE.
  1619. #
  1620.  
  1621. CHANGESM:
  1622. UD$DRDWAIT[LLR$CU[0]] = FALSE; # ASSUME CHANGING SM-S EMPTY #
  1623. SLOWFOR I = 0 STEP 1 UNTIL MAX$DRD
  1624. DO # SEARCH FOR SM CHANGING STATUS #
  1625. BEGIN # SEARCH #
  1626. SMO = B<I*6,6>UD$SMORDS[LLR$CU[0]];
  1627. IF SMO EQ 0
  1628. THEN # NO SM #
  1629. BEGIN # NEXT #
  1630. TEST I;
  1631. END # NEXT #
  1632.  
  1633. P<PTHSTAT> = LOC(SM$STS[SMO]);
  1634. SMST = SMST1; # ASSUME 2ND CU #
  1635. IF LLR$CU[0] EQ SM$CUO0[SMO]
  1636. THEN # 1ST CU CHANGING SM #
  1637. BEGIN # RESET #
  1638. SMST = SMST0;
  1639. END # RESET #
  1640.  
  1641. IF PATHBIT(SMST,PATH$DF"U$DONE") EQ ON
  1642. THEN # SM ALREADY PROCESSED #
  1643. BEGIN # NEXT #
  1644. TEST I;
  1645. END # NEXT #
  1646.  
  1647. IF UD$CNUP[LLR$CU[0]] # CURESTART IN PROGRESS #
  1648. AND PATHBIT(SMST,PATH$DF"U$ON") EQ OFF ##
  1649. AND PATHBIT(SMST,PATH$DF"U$RQ$DIAG") EQ OFF
  1650. THEN # ON/OFF ACK BIT MAY BE SET #
  1651. BEGIN # CLEAR #
  1652. PATHBIT(SMST,PATH$DF"U$CU$ACK") = OFF; # SM ALREADY OFF #
  1653. PATHBIT(SMST,PATH$DF"U$DIAG$ACK") = OFF;
  1654. END # CLEAR #
  1655.  
  1656. IF SM$EXIST[SMO] ##
  1657. AND (PATHBIT(SMST,PATH$DF"U$CU$ACK") EQ 1 ##
  1658. OR PATHBIT(SMST,PATH$DF"U$DIAG$ACK") EQ 1 ##
  1659. OR UD$CNUP[LLR$CU[0]])
  1660. THEN # SM STATUS CHANGING #
  1661. BEGIN # CLEAR #
  1662. IF D0$FULL[SMO] OR D1$FULL[SMO]
  1663. THEN # WAIT FOR SM TO EMPTY #
  1664. BEGIN # SKIP #
  1665. UD$DRDWAIT[LLR$CU[0]] = TRUE; # HAVE LLRQ RETRY #
  1666. TEST I;
  1667. END # SKIP #
  1668.  
  1669. GOTO CHANGESM1; # PROCESS SM #
  1670. END # CLEAR #
  1671.  
  1672. END # SEARCH #
  1673.  
  1674. IF UD$DRDWAIT[LLR$CU[0]]
  1675. THEN # STILL WAITING FOR SM TO EMPTY #
  1676. BEGIN # RETRY #
  1677. RETURN;
  1678. END # RETRY #
  1679.  
  1680. DRVRACTIVE = TRUE; # KEEP UDT SCAN CONTINUING #
  1681. SLOWFOR I = 0 STEP 1 UNTIL MAX$DRD
  1682. DO # CLEAR *SM-PROCESSED* FLAGS #
  1683. BEGIN # SCAN #
  1684. SMO = B<I*6,6>UD$SMORDS[LLR$CU[0]];
  1685. IF SMO NQ 0 ##
  1686. AND SM$EXIST[SMO]
  1687. THEN # SM EXISTS #
  1688. BEGIN # CLEAR #
  1689. SMST = SMST1; # ASSUME 2ND CU #
  1690. IF LLR$CU[0] EQ SM$CUO0[SMO]
  1691. THEN # 1ST CU PROCESSED SM #
  1692. BEGIN # RESET #
  1693. SMST = SMST0;
  1694. END # RESET #
  1695.  
  1696. P<PTHSTAT> = LOC(SM$STS[SMO]);
  1697. PATHBIT(SMST,PATH$DF"U$DONE") = OFF; # CLEAR SM DONE FLAG #
  1698. GOTO CRMSGF;
  1699.  
  1700. CRMSGF:##
  1701. SM$FLAG[SMO] = SM$STS0[SMO] LOR SM$STS1[SMO];# RESET GLOBALS #
  1702. END # CLEAR #
  1703.  
  1704. END # SCAN #
  1705.  
  1706. RETURN; # ALL SM-S ON THIS CU PROCESSED #
  1707.  
  1708. #
  1709. * PRESET SM ORDINAL IF VARYING SM ONLINE.
  1710. #
  1711.  
  1712. CHANGESM1:
  1713. PATHBIT(SMST,PATH$DF"U$DONE") = ON; # SM BEING PROCESSED #
  1714. GOTO CRMSGD;
  1715.  
  1716. CRMSGD:##
  1717. SM$FLAG[SMO] = SM$STS0[SMO] LOR SM$STS1[SMO]; # RESET GLOBALS #
  1718. GOTO CRMSGE;
  1719.  
  1720. CRMSGE:##
  1721. IF PATHBIT(SMST,PATH$DF"U$ON") EQ 1 ##
  1722. AND (PATHBIT(SMST,PATH$DF"U$CU$ACK") EQ 1 ##
  1723. OR UD$CNUP[LLR$CU[0]])
  1724. THEN # SM TURNING ON #
  1725. BEGIN # PRESET #
  1726. IF NOT INITIALIZE
  1727. THEN # CHECK SERVICE CELLS #
  1728. BEGIN # SERV #
  1729. IF SM$SCCU[SMO]
  1730. THEN # 2 REQUESTS CHECKING SRV CELLS #
  1731. BEGIN # ABORT #
  1732. FE$RTN[0] = "CRMSG4.";
  1733. MESSAGE(FEMSG,UDFL1);
  1734. ABORT;
  1735. END # ABORT #
  1736.  
  1737. SM$SCCU[SMO] = TRUE;
  1738. END # SERV #
  1739.  
  1740. PATHBIT(SMST,PATH$DF"U$CU$ACK") = 1; # IN CASE CU RESTARTING #
  1741. SM$TOPDRD[SMO] = FALSE; # USE LOWER DRD FIRST #
  1742. END # PRESET #
  1743.  
  1744. DRVRACTIVE = TRUE; # INDICATE DRIVER ACTIVITY #
  1745. MBF$ACTIVE[0] = TRUE;
  1746. UD$LLRQA[LLR$CU[0]] = P<LLRQ>; # STORE LLRQ ADDRESS #
  1747. MSGSEQN = MS$MSQN$CN[0]; # PRESET MESSAGE BUFFER #
  1748. MSGFTN = MS$MSG[0];
  1749. ZFILL(UDT$MSG,MSGLT);
  1750. MS$MSQN$CN[0] = MSGSEQN;
  1751. MS$MSG[0] = MSGFTN;
  1752. MS$DRDN[0] = SM$SUN[SMO]; # SET SM UNIT NUMBER #
  1753. MS$PARM1A[0] = ONLINE; # ASSUME VARYING SM ONLINE #
  1754. IF PATHBIT(SMST,PATH$DF"U$RQ$DIAG") EQ OFF ##
  1755. AND PATHBIT(SMST,PATH$DF"U$ON") EQ OFF
  1756. THEN # SET SM OFFLINE #
  1757. BEGIN # OFF #
  1758. MS$PARM1A[0] = OFFLINE;
  1759. END # OFF #
  1760.  
  1761. IF PATHBIT(SMST,PATH$DF"U$RQ$DIAG") EQ 1 ##
  1762. AND (UD$CNUP[LLR$CU[0]] ##
  1763. OR PATHBIT(SMST,PATH$DF"U$DIAG$ACK") EQ 1)
  1764. THEN # SET SM DIAGNOSTIC MODE #
  1765. BEGIN # DIAGNOSTIC #
  1766. MS$PARM1A[0] = DIAGNOSTIC;
  1767. END # DIAGNOSTIC #
  1768.  
  1769. LLR$SMO[0] = SMO; # SAVE SM ORDINAL #
  1770. RETURN;
  1771.  
  1772. #
  1773. * CREATE *DUMP BUFFERED LOG* MESSAGE.
  1774. #
  1775.  
  1776. DUMPBUFLOG:
  1777. MS$MSG$D[0] = D1$SUN[LLR$SMO[0]]; # ASSUME LOWER DRD #
  1778. IF LLR$DRD[0] EQ 0
  1779. THEN # UPPER DRD BEING USED #
  1780. BEGIN # RESET #
  1781. MS$MSG$D[0] = D0$SUN[LLR$SMO[0]];
  1782. END # RESET #
  1783.  
  1784. RETURN;
  1785.  
  1786. #
  1787. * CREATE *ENTER CARTRIDGE* MESSAGE.
  1788. #
  1789.  
  1790. ENTERCRT:
  1791. MS$DRDN[0] = D1$SUN[LLR$SMO[0]]; # ASSUME LOWER DRD #
  1792. IF SM$TOPDRD[LLR$SMO[0]]
  1793. THEN # LOAD TO UPPER DRD #
  1794. BEGIN # RESET #
  1795. MS$DRDN[0] = D0$SUN[LLR$SMO[0]];
  1796. END # RESET #
  1797.  
  1798. RETURN;
  1799.  
  1800. #
  1801. * CREATE *MOUNT VOLUME* MESSAGE.
  1802. #
  1803.  
  1804. MNTVOLUME:
  1805. MS$DEV$NB[0] = MS$DRDN[0]; # DEVICE NUMBER #
  1806. MS$PARM2[0] = EOTBSC; # EOT BUFFER STRIPE COUNT #
  1807. MS$STPL[0] = LLR$ST$LW[0]; # STRIPE LOW #
  1808. MS$STPH[0] = LLR$ST$HI[0]; # STRIPE HIGH #
  1809. MS$PARM1A[0] = LLR$ST$HI[0]; # LAST STRIPE WRITTEN, IF STAGE #
  1810. IF LLR$PRCNME[0] EQ REQTYP4"CPY$DA"
  1811. THEN # DATA BEING DESTAGED #
  1812. BEGIN # RESET #
  1813. MS$MSG[0] = HFC$MVLMVW; # MOUNT WRITE-ENABLED VOLUME #
  1814. MS$PARM1A[0] = LLR$LT$ST[0]; # USE VALUE FROM WRITE-VOLUME #
  1815. END # RESET #
  1816.  
  1817. MS$CONT[0] = CONTDAV; # ASSUME 8 DRD-S OR LESS #
  1818. RETURN;
  1819.  
  1820. #
  1821. * CREATE *READ RAW STRIPE* MESSAGE.
  1822. #
  1823.  
  1824. RDRAWSTRP:
  1825. MS$STPL[0] = LLR$ST$LW[0]; # SET RAW STRIPE TO READ #
  1826. RETURN;
  1827.  
  1828. #
  1829. * CREATE *READ CARTRIDGE LABEL* MESSAGE.
  1830. #
  1831.  
  1832. READCRTLBL:
  1833. RETURN; # NO NEW MSG PARAMETERS NEEDED #
  1834.  
  1835. #
  1836. * CREATE *RESTART* MESSAGE.
  1837. #
  1838.  
  1839. RESTARTCU:
  1840. UD$LLRQA[LLR$CU[0]] = P<LLRQ>; # STORE LLRQ ADDRESS #
  1841. RETURN; # NO MESSAGE PARAMETERS REQUIRED #
  1842.  
  1843. #
  1844. * CREATE *SET DATE/TIME* MESSAGE.
  1845. #
  1846.  
  1847. SETDATTIME:
  1848. PDATE(DATETIME); # GET CURRENT DATE AND TIME #
  1849. IF (DT$YEAR[0] LS 30)
  1850. THEN # IF YEAR PRIOR TO 2000 #
  1851. BEGIN
  1852. MS$PARM1[0] = DT$YEAR[0] + 70; # DATE PLUS 70 TO BUFFER #
  1853. END
  1854. ELSE # YEAR AFTER 1999 #
  1855. BEGIN
  1856. MS$PARM1[0] = DT$YEAR[0] - 30; # DATE MINUS 30 TO BUFFER #
  1857. END
  1858. MS$PARM1A3[0] = DT$MONTH[0];
  1859. MS$PARM1A4[0] = DT$DAY[0];
  1860. MS$PARM21[0] = DT$HOUR[0];
  1861. MS$PARM22[0] = DT$MINUTE[0];
  1862. MS$PARM23[0] = DT$SECOND[0];
  1863. RETURN;
  1864.  
  1865. #
  1866. * CREATE *SET ERROR LOG LENGTH* MESSAGE.
  1867. #
  1868.  
  1869. SETERRLEN:
  1870. MS$PARM1A[0] = DEF$ERLEN; # SET DEFAULT LENGTH #
  1871. RETURN;
  1872.  
  1873. #
  1874. * CREATE *SET MASTER CHANNEL* MESSAGE.
  1875. #
  1876.  
  1877. SETMASCHAN:
  1878. GETCHAN(IRPMSG); # ALLOCATE MASTER CHANNEL #
  1879. IF P<FETMWB> EQ 0
  1880. THEN # NO AVAILABLE CHANNEL ON CU #
  1881. BEGIN # DOWN #
  1882. LLR$DR[0] = RESPTYP4"M86$HDW$PR"; # INFORM OPERATOR #
  1883. RETURN;
  1884. END # DOWN #
  1885.  
  1886. MBF$ACTIVE[0] = TRUE;
  1887. MSGSEQN = MS$MSQN$CN[0]; # PRESET MESSAGE BUFFER #
  1888. MSGFTN = MS$MSG[0];
  1889. ZFILL(UDT$MSG,MSGLT);
  1890. MS$MSQN$CN[0] = MSGSEQN;
  1891. MS$MSG[0] = MSGFTN;
  1892. MS$DRDN[0] = FMR$CIF[0];
  1893. B<FMR$CIF[0],1>UD$MASCPOS[LLR$CU[0]] = ON; # SET MASTER CHAN #
  1894. UD$MASC[LLR$CU[0]] = FMR$CHAN[0]; # SET MASTER CHANNEL IN UDT #
  1895. UD$MASCIF[LLR$CU[0]] = FMR$CIF[0]; # SET MASTER CHANNEL CIF #
  1896. RETURN;
  1897.  
  1898. #
  1899. * CREATE *START ERROR LOG* MESSAGE.
  1900. #
  1901.  
  1902. STERRLOG:
  1903. IF MS$MSG[0] EQ HFC$STERLG
  1904. THEN # *START ERROR LOG - CIF* MSG #
  1905. BEGIN # *CIF* #
  1906. CHT$WORD[0] = UD$CHANA[LLR$CU[0]]; # PRESET CHANNEL TABLE #
  1907. CHT$WORD[1] = UD$CHANB[LLR$CU[0]];
  1908. CHT$WORD[2] = UD$CHANC[LLR$CU[0]];
  1909. CHT$WORD[3] = UD$CHAND[LLR$CU[0]];
  1910. SLOWFOR I = MS$DRDN[0] STEP 1 UNTIL MAX$CIF
  1911. DO # SEARCH FOR ON *CIF* #
  1912. BEGIN # SEARCH #
  1913. IF CHT$ON[I]
  1914. THEN # *CIF* IS ON #
  1915. BEGIN # ON #
  1916. TEMPCIF = I; # SAVE *CIF* NUMBER #
  1917. GOTO STERRLOG1;
  1918. END # ON #
  1919.  
  1920. END # SEARCH #
  1921.  
  1922. RETURN; # ALL *CIF* MESSAGES SENT #
  1923.  
  1924. STERRLOG1:
  1925. MBF$ACTIVE[0] = TRUE;
  1926. MSGFTN = MS$MSG[0]; # PRESET MESSAGE BUFFER #
  1927. MSGSEQN = MS$MSQN$CN[0];
  1928. ZFILL(UDT$MSG,MSGLT);
  1929. MS$MSQN$CN[0] = MSGSEQN;
  1930. MS$MSG[0] = MSGFTN;
  1931. MS$PARM1A[0] = CIFMASK; # TURN OFF *CIF* ERROR LOGGING #
  1932. MS$DRDN[0] = TEMPCIF;
  1933. RETURN;
  1934. END # *CIF* #
  1935.  
  1936. IF MS$MSG[0] EQ HFC$STERDR
  1937. THEN # *START ERROR LOG - DRD* MSG #
  1938. BEGIN # DRD #
  1939. SLOWFOR I = 0 STEP 1 UNTIL MAX$DRD
  1940. DO # SEARCH FOR DRD #
  1941. BEGIN # SEARCH #
  1942. SMO = B<I*6,6>UD$SMORDS[LLR$CU[0]];
  1943. IF SMO NQ 0
  1944. THEN # VALID SM ORDINAL #
  1945. BEGIN # CHECK BIT #
  1946. IF LLR$CU[0] EQ SM$CUO0[SMO]
  1947. THEN # CHECKING 1ST CU #
  1948. BEGIN # CU 0 #
  1949. IF NOT D0$LOG0[SMO]
  1950. THEN # SET DRD 0 LEVEL #
  1951. BEGIN # LOG #
  1952. D0$LOG0[SMO] = TRUE;
  1953. TEMPDRD = D0$SUN[SMO];
  1954. GOTO STERRLOG2;
  1955. END # LOG #
  1956.  
  1957. IF NOT D1$LOG0[SMO]
  1958. THEN # SET DRD 1 LEVEL #
  1959. BEGIN # LOG #
  1960. D1$LOG0[SMO] = TRUE;
  1961. TEMPDRD = D1$SUN[SMO];
  1962. GOTO STERRLOG2;
  1963. END # LOG #
  1964.  
  1965. END # CU 0 #
  1966.  
  1967. IF LLR$CU[0] EQ SM$CUO1[SMO]
  1968. THEN # CHECKING 2ND CU #
  1969. BEGIN # CU 1 #
  1970. IF NOT D0$LOG1[SMO]
  1971. THEN # SET DRD 0 LEVEL #
  1972. BEGIN # LOG #
  1973. D0$LOG1[SMO] = TRUE;
  1974. TEMPDRD = D0$SUN[SMO];
  1975. GOTO STERRLOG2;
  1976. END # LOG #
  1977.  
  1978. IF NOT D1$LOG1[SMO]
  1979. THEN # SET DRD 1 LEVEL #
  1980. BEGIN # LOG #
  1981. D1$LOG1[SMO] = TRUE;
  1982. TEMPDRD = D1$SUN[SMO];
  1983. GOTO STERRLOG2;
  1984. END # LOG #
  1985.  
  1986. END # CU 1 #
  1987.  
  1988. END # CHECK BIT #
  1989.  
  1990. END # SEARCH #
  1991.  
  1992. SLOWFOR I = 0 STEP 1 UNTIL MAX$DRD
  1993. DO # SCAN SM-S #
  1994. BEGIN # SCAN #
  1995. SMO = B<I*6,6>UD$SMORDS[LLR$CU[0]];
  1996. IF SMO NQ 0
  1997. THEN # VALID ORDINAL #
  1998. BEGIN # CLEAR BITS #
  1999. IF LLR$CU[0] EQ SM$CUO0[SMO]
  2000. THEN # CLEARING 1ST CU BITS #
  2001. BEGIN # CLEAR #
  2002. D0$LOG0[SMO] = FALSE;
  2003. D1$LOG0[SMO] = FALSE;
  2004. END # CLEAR #
  2005.  
  2006. IF LLR$CU[0] EQ SM$CUO1[SMO]
  2007. THEN # CLEARING 2ND CU BITS #
  2008. BEGIN # CLEAR #
  2009. D0$LOG1[SMO] = FALSE;
  2010. D1$LOG1[SMO] = FALSE;
  2011. END # CLEAR #
  2012.  
  2013. END # CLEAR BITS #
  2014.  
  2015. END # SCAN #
  2016.  
  2017. RETURN; # ALL DRD MESSAGES SENT #
  2018.  
  2019. STERRLOG2:
  2020. MBF$ACTIVE[0] = TRUE;
  2021. MSGFTN = MS$MSG[0]; # PRESET MESSAGE BUFFER #
  2022. MSGSEQN = MS$MSQN$CN[0];
  2023. ZFILL(UDT$MSG,MSGLT);
  2024. MS$MSQN$CN[0] = MSGSEQN;
  2025. MS$MSG[0] = MSGFTN;
  2026. MS$DRDN[0] = TEMPDRD; # SET DRD ERROR LOG LEVEL #
  2027. MS$PARM1A[0] = DRDHNMASK;
  2028. RETURN;
  2029. END # DRD #
  2030.  
  2031. IF MS$MSG[0] EQ HFC$STERSH ##
  2032. OR MS$MSG[0] EQ HFC$STERST
  2033. THEN # *START ERROR LOG - HLR* MSG #
  2034. BEGIN # STRIPE/SMT #
  2035. MS$PARM1A[0] = DRDHNMASK; # SET HANDLER ERROR LOG LEVEL #
  2036. END # STRIPE/SMT #
  2037.  
  2038. ELSE # FUNCTION NOT FOUND #
  2039. BEGIN # ABORT #
  2040. FE$RTN[0] = "CRMSG5.";
  2041. MESSAGE(FEMSG,UDFL1);
  2042. ABORT;
  2043. END # ABORT #
  2044.  
  2045. RETURN;
  2046.  
  2047. #
  2048. * CREATE *STORE CARTRIDGE* MESSAGE.
  2049. #
  2050.  
  2051. STORECRT:
  2052. MS$YADD[0] = LLR$Y[0];
  2053. MS$ZADD[0] = LLR$Z[0];
  2054. IF MS$MSG[0] EQ HFC$STCRNF # FORCED STORE #
  2055. THEN # SET DRD UNIT NUMBER TO VERIFY #
  2056. BEGIN # UNIT #
  2057. MS$CONT[0] = CONTDAV; # ASSUME 8 DRD-S OR LESS #
  2058. MS$DEV$NB[0] = MS$DRDN[0];
  2059. END # UNIT #
  2060.  
  2061. RETURN;
  2062.  
  2063. #
  2064. * CREATE *WRITE CARTRIDGE/VOLUME LABEL* MESSAGE.
  2065. #
  2066.  
  2067. WRTLBLCRT:
  2068. WRTLBLVOL:
  2069. IF MS$MSG[0] EQ HFC$WRTLBL
  2070. THEN # WRITING CARTRIDGE LABEL #
  2071. BEGIN # CART #
  2072. MS$ASS$DT[0] = LABLENB; # SET ASSOCIATED DATA COUNT #
  2073. END # CART #
  2074.  
  2075. ELSE # WRITING VOLUME LABEL #
  2076. BEGIN # VOLUME #
  2077. MS$STPL[0] = LLR$ST$LW[0]; # SET STRIPES LOW AND HIGH #
  2078. MS$STPH[0] = LLR$ST$HI[0];
  2079. END # VOLUME #
  2080.  
  2081. RETURN;
  2082. END # CRMSG #
  2083.  
  2084. TERM
  2085. PROC CHNGCHN;
  2086. # TITLE CHNGCHN - CHANGE CHANNEL STATUS. #
  2087.  
  2088. BEGIN # CHNGCHN #
  2089.  
  2090. #
  2091. ** CHNGCHN - CHANGE CHANNEL STATUS.
  2092. *
  2093. * *CHNGCHN* CHANGES THE STATUS OF AN M860 CONTROLLER CHANNEL.
  2094. *
  2095. * PROC CHNGCHN
  2096. *
  2097. * ENTRY P<LLRQ> = *DRQUEUE* ENTRY ADDRESS.
  2098. *
  2099. * THE MESSAGE FET BASED ARRAYS POINT TO THE CHANNEL
  2100. * TURNING OFF.
  2101. *
  2102. * EXIT A K-DISPLAY MESSAGE IS ISSUED INDICATING THE CHANNEL
  2103.   WAS TURNED OFF. THE CHANNEL STATUS IS CHANGED IN
  2104. * THE UDT AND IN THE ASSOCIATED MESSAGE WRITE FET.
  2105. #
  2106.  
  2107.  
  2108. #
  2109. **** PROC CHNGCHN - XREF LIST BEGIN.
  2110. #
  2111.  
  2112. XREF
  2113. BEGIN
  2114. PROC KREQ; # SEND K-DISPLAY REQUEST #
  2115. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  2116. PROC RTIME; # GET TIME SINCE DEADSTART #
  2117. END
  2118.  
  2119. #
  2120. **** PROC CHNGCHN - XREF LIST END.
  2121. #
  2122.  
  2123. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  2124. *CALL,COMBFAS
  2125. *CALL,COMBCDD
  2126. *CALL,COMBFET
  2127. *CALL,COMBKDD
  2128. *CALL,COMBUDT
  2129.  
  2130. ITEM I I; # INDEX #
  2131. CONTROL EJECT;
  2132.  
  2133. IF NOT FMW$CHON[0]
  2134. THEN # CHANNEL ALREADY DOWN #
  2135. BEGIN # EXIT #
  2136. RETURN; # K-DISPLAY MSG ALREADY SENT #
  2137. END # EXIT #
  2138.  
  2139. #
  2140. * DECIDE IF RETRY COUNT AND TIME JUSTIFY TURNING CHANNEL OFF.
  2141. #
  2142.  
  2143. FMW$RCNT[0] = FMW$RCNT[0] + 1; # BUMP RETRY COUNT #
  2144. FMW$ERROR[0] = TRUE; # DO NOT RECOUNT AS DRD ERROR #
  2145. RTIME(RTIMESTAT);
  2146. IF (FMW$RCNT[0] EQ 1 # START OF ERROR SEQUENCE #
  2147. AND FMW$RCNT[0] LS MAXCHERR) ##
  2148. OR (FMW$RCNT[0] GR 1 # RETRY TIME EXPIRED #
  2149. AND RTIMSECS[0] GQ FMW$RTIME[0])
  2150. THEN # RESET CHAN FOR NEW INTERVAL #
  2151. BEGIN # RESET #
  2152. FMW$RCNT[0] = 1; # IN CASE INTERVAL EXPIRED #
  2153. FMW$RTIME[0] = RTIMSECS[0] + MAXCHERRTM; # RESET RETRY TIME #
  2154. END # RESET #
  2155.  
  2156. IF (FMW$RCNT[0] GR 1 ##
  2157. AND FMW$RCNT[0] GQ MAXCHERR ##
  2158. AND RTIMSECS[0] GQ FMW$RTIME[0]) # ERROR SEQUENCE EXPIRED #
  2159. OR FMW$RCNT[0] LS MAXCHERR # SEQUENCE NOT COMPLETE #
  2160. THEN # NOT READY TO TURN OFF CHANNEL #
  2161. BEGIN # ON #
  2162. IF FMW$AT[0] NQ 0
  2163. THEN # ERROR IN WRITING MESSAGE #
  2164. BEGIN # WRITE #
  2165. FMW$CMPL[0] = FALSE; # RESTART CHANNEL #
  2166. END # WRITE #
  2167.  
  2168. RETURN; # LEAVE CHANNEL ON #
  2169. END # ON #
  2170.  
  2171. FMW$CHON[0] = FALSE; # DRIVER DOWNED CHANNEL #
  2172. UDT$CHNS$O[0] = TRUE; # ASSUME ALL CHANNELS OFF #
  2173. SLOWFOR I = 1 STEP 1 UNTIL MAXCTN
  2174. DO # CHECK IF ALL CHANNELS OFF #
  2175. BEGIN # CHECK #
  2176. IF UD$CHANA$O[I] ##
  2177. OR UD$CHANB$O[I] ##
  2178. OR UD$CHANC$O[I] ##
  2179. OR UD$CHAND$O[I]
  2180. THEN # AT LEAST ONE CHANNEL IS ON #
  2181. BEGIN # RESET #
  2182. UDT$CHNS$O[0] = FALSE;
  2183. END # RESET #
  2184.  
  2185. END # CHECK #
  2186.  
  2187. IF UDT$CHNS$O[0]
  2188. THEN # NO CHANNELS LEFT ON #
  2189. BEGIN # SHIFT #
  2190. MESSAGE(" ALL CHANNELS OFF.",SYSUDF1);
  2191. UDT$CUS$O[0] = FALSE; # ISSUE NEW FLASHING MESSAGE #
  2192. END # SHIFT #
  2193.  
  2194. IF FMW$AT[0] EQ RCCIFO ##
  2195. OR FMR$AT[0] EQ RCCIFO
  2196. THEN # CIF OFFLINE #
  2197. BEGIN # EXIT #
  2198. RETURN; # K-DISPLAY MSG ALREADY SENT #
  2199. END # EXIT #
  2200.  
  2201. P<KWORD> = LOC(FMR$KWORDS[0]);
  2202. KW$WORD[0] = 0;
  2203. KW$LINE1[0] = KM"KM1"; # PRESET MESSAGE ORDINALS #
  2204. KW$LINE2[0] = KM"KM14";
  2205. KW$LINE3[0] = KM"KM13";
  2206. KW$RPGO[0] = TRUE; # ALLOW GO RESPONSE #
  2207. KW$IC[0] = TRUE; # SET IMMEDIATE COMPLETION #
  2208. KW$DF[0] = TRUE; # ISSUE TO JOB DAYFILE #
  2209. KP$EQ = UD$ESTO[FMR$CU[0]]; # PRESET MESSAGE PARAMETERS #
  2210. KP$CN = FMR$CHAN[0];
  2211. KREQ(LOC(KWORD),KLINK); # SEND K-DISPLAY REQUEST #
  2212. RETURN;
  2213. END # DOWNCHN #
  2214.  
  2215. TERM
  2216. PROC DOWNCU((CO));
  2217. # TITLE DOWNCU - DOWN CONTROLLER. #
  2218.  
  2219. BEGIN # DOWNCU #
  2220.  
  2221. #
  2222. ** DOWNCU - DOWN CONTROLLER.
  2223. *
  2224. * *DOWNCU* PROCESSES M860 CONTROLLER TERMINATION.
  2225. *
  2226. * PROC DOWNCU((CO))
  2227. *
  2228. * ENTRY (CO) = UDT ORDINAL OF CONTROLLER TO BE TURNED OFF.
  2229. *
  2230. * THE MESSAGE FET BASED ARRAYS POINT TO THE
  2231. * CHANNEL ON WHICH THE ERROR WAS DETECTED.
  2232. *
  2233. * EXIT A DAYFILE MESSAGE AND A K-DISPLAY MESSAGE ARE
  2234. * ISSUED INDICATING THE CONTROLLER IS OFF.
  2235. #
  2236.  
  2237.  
  2238. #
  2239. **** PROC DOWNCU - XREF LIST BEGIN.
  2240. #
  2241.  
  2242. XREF
  2243. BEGIN
  2244. PROC KREQ; # SEND K-DISPLAY REQUEST #
  2245. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  2246. FUNC XCOD C(10); # CONVERT OCTAL TO DISPLAY-CODE #
  2247. END
  2248.  
  2249. #
  2250. **** PROC DOWNCU - XREF LIST END.
  2251. #
  2252.  
  2253. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  2254. *CALL,COMBFAS
  2255. *CALL,COMBCDD
  2256. *CALL,COMBFET
  2257. *CALL,COMBHFC
  2258. *CALL,COMBKDD
  2259. *CALL,COMBUDT
  2260. *CALL,COMBLRQ
  2261. *CALL,COMXCTF
  2262.  
  2263. ITEM CO U; # PASSED CU ORDINAL #
  2264. ITEM CORD U; # TEMPORARY CU ORDINAL #
  2265. ITEM I I; # INDEX #
  2266. CONTROL EJECT;
  2267.  
  2268. #
  2269. * SEND DAYFILE MESSAGE INDICATING THAT THE CONTROLLER IS OFF.
  2270. #
  2271.  
  2272. CORD = XCOD(UD$ESTO[CO]); # SET EST ORDINAL #
  2273. CU$ORD[0] = C<6,4>CORD;
  2274. CU$STAT[0] = CUOFF;
  2275. MESSAGE(CUMSG,SYSUDF1); # SEND DAYFILE MESSAGE #
  2276.  
  2277. #
  2278. * RESET CONTROLLER STATUS FLAGS.
  2279. #
  2280.  
  2281. IF UD$CNUP[CO] AND UD$CUON[CO]
  2282. THEN # CU WAS INITIALIZING #
  2283. BEGIN # RESET #
  2284. UD$CNUP[CO] = FALSE; # STOP CU FROM INITIALIZING #
  2285. CURESERVED = FALSE; # ALLOW OTHER CU-S TO INITIALIZE #
  2286. END # RESET #
  2287.  
  2288. #
  2289. * SEND K-DISPLAY MESSAGE TO OPERATOR.
  2290. #
  2291.  
  2292. UD$CUON[CO] = FALSE; # TURN OFF CONTROLLER #
  2293. UDT$CUS$O[0] = TRUE; # ASSUME ALL CONTROLLERS OFF #
  2294. SLOWFOR I = 1 STEP 1 UNTIL MAXCTN
  2295. DO # CHECK IF ALL CONTROLLERS OFF #
  2296. BEGIN # CHECK #
  2297. IF UD$CUON[CO]
  2298. THEN # AT LEAST ONE CU IS ON #
  2299. BEGIN # RESET #
  2300. UDT$CUS$O[0] = FALSE;
  2301. END # RESET #
  2302.  
  2303. END # CHECK #
  2304.  
  2305. IF UDT$CUS$O[0]
  2306. THEN # NO CONTROLLERS LEFT ON #
  2307. BEGIN # SHIFT #
  2308. MESSAGE(" ALL CONTROLLERS OFF.",SYSUDF1);
  2309. UDT$CHNS$O[0] = FALSE; # ISSUE NEW FLASHING MESSAGE #
  2310. END # SHIFT #
  2311.  
  2312. IF FMW$AT[0] EQ RCIMPL # CU NEEDS IMPL #
  2313. OR FMR$AT[0] EQ RCIMPL
  2314. THEN # K-DISPLAY MSG ALREADY MADE #
  2315. BEGIN # EXIT #
  2316. RETURN;
  2317. END # EXIT #
  2318.  
  2319. P<KWORD> = LOC(LLR$KWORDS[0]);
  2320. KW$WORD[0] = 0;
  2321. KW$LINE1[0] = KM"KM1"; # SET MESSAGE ORDINALS #
  2322. KW$LINE2[0] = KM"KM15"; # DEVICE DRIVER ERROR FOUND #
  2323. IF MS$MSG[0] GQ HFC$CHSCIF # STATUS CHANGE #
  2324. AND MS$MSG[0] LQ HFC$CHSAIF ##
  2325. AND MS$MSG[0] NQ HFC$CHSDRD # NOT SM OR DRD #
  2326. AND MS$MSG[0] NQ HFC$CHSSMA ##
  2327. AND MS$PARM1A[0] EQ ONLINE
  2328. THEN # INDICATE PATH NOT VARIED ONLINE #
  2329. BEGIN # OFF #
  2330. KW$LINE2[0] = KM"KM10";
  2331. END # OFF #
  2332.  
  2333. IF MS$MSG[0] EQ HFC$SETMAS
  2334. THEN # NO CHANNEL ALLOCATED #
  2335. BEGIN # CHANNEL #
  2336. KW$LINE2[0] = KM"KM22";
  2337. END # CHANNEL #
  2338.  
  2339. KW$LINE3[0] = KM"KM16";
  2340. IF P<FETMWB> EQ 0
  2341. THEN # NO CHANNEL ALLOCATED #
  2342. BEGIN # NONE #
  2343. KW$LINE1[0] = KM"KM23";
  2344. END # NONE #
  2345.  
  2346. KW$RPGO[0] = TRUE; # ALLOW GO RESPONSE #
  2347. KW$IC[0] = TRUE; # SET IMMEDIATE COMPLETION #
  2348. KW$DF[0] = TRUE; # SEND TO JOB DAYFILE #
  2349. KP$EQ = UD$ESTO[CO];
  2350. KP$CN = FMR$CHAN[0];
  2351. KREQ(LOC(KWORD),KLINK); # SEND K-DISPLAY REQUEST #
  2352. END # DOWNCU #
  2353.  
  2354. TERM
  2355. PROC FSCLOG((FETTYPE));
  2356. # TITLE FSCLOG - LOG FSC ERRORS IN BML. #
  2357.  
  2358. BEGIN # FSCLOG #
  2359.  
  2360. #
  2361. ** FSCLOG - LOG FSC ERRORS IN BML.
  2362. *
  2363. * *FSCLOG* SENDS FSC ERROR MESSAGES TO THE BINARY MAINTENANCE LOG.
  2364. *
  2365. * PROC FSCLOG((FETTYPE))
  2366. *
  2367. * ENTRY (FETTYPE) = TYPE OF FET WHICH HAD THE ERROR.
  2368. *
  2369. * P<FETFHB> = DATA FET ADDRESS, IF IT HAD THE ERROR.
  2370. *
  2371. * THE MESSAGE FET BASED ARRAYS POINT TO THE CHANNEL ON
  2372. * WHICH THE ERROR OCCURRED.
  2373. *
  2374. * EXIT THE ERROR HAS BEEN FORMATTED AND LOGGED IN THE BML.
  2375. * IF IT OCCURRED IN A MESSAGE FET AND WAS A HARDWARE
  2376. * ERROR TYPE, THEN THE CHANNEL WAS ALSO TURNED OFF.
  2377. #
  2378.  
  2379.  
  2380. #
  2381. **** PROC FSCLOG - XREF LIST BEGIN.
  2382. #
  2383.  
  2384. XREF
  2385. BEGIN
  2386. PROC CHNGCHN; # DOWN BAD CHANNEL #
  2387. PROC DOWNCU; # DOWN BAD CONTROLLER #
  2388. PROC KREQ; # SEND K-DISPLAY REQUEST #
  2389. PROC MESSAGE; # ISSUE BML MESSAGE #
  2390. PROC ZFILL; # ZERO-FILL BUFFER #
  2391. END
  2392.  
  2393. #
  2394. **** PROC FSCLOG - XREF LIST END.
  2395. #
  2396.  
  2397. DEF FBLEN #10#; # FSC FORMAT BUFFER LENGTH #
  2398. DEF FSCCODE #O"105"#; # FSC COMPONENT CODE #
  2399. DEF NOUNIT #O"77"#; # NO UNIT NUMBER AVAILABLE #
  2400. DEF PMSGLT #9#; # PACKED M860 MESSAGE LENGTH #
  2401.  
  2402. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  2403. *CALL,COMBFAS
  2404. *CALL,COMBCDD
  2405. *CALL,COMBFET
  2406. *CALL,COMBKDD
  2407. *CALL,COMBUDT
  2408. *CALL,COMXCTF
  2409.  
  2410. ITEM ASSOCDATA U; # LENGTH OF ASSOCIATED DATA #
  2411. ITEM FETTYPE U; # FET TYPE HAVING ERROR #
  2412. ITEM SAVEDMSG U; # SAVED MSG BUF LOCATION #
  2413. ITEM TEMPOUT U; # TEMPORARY FET *OUT* POINTER #
  2414.  
  2415. #
  2416. * ARRAYS FOR FORMATTING FSC BML MESSAGE.
  2417. #
  2418.  
  2419. ARRAY FSCCNT [0:0] S(1); # FSC COUNT WORD #
  2420. BEGIN
  2421. ITEM FC$WORD U(00,00,60);
  2422. ITEM FC$CNT U(00,00,12) = [FBLEN]; # FSC COUNT #
  2423. END
  2424.  
  2425. ARRAY FSCBUF [0:0] S(FBLEN); # FSC LOG FORMATTING BUFFER #
  2426. BEGIN
  2427. ITEM FS$DC U(00,00,12); # COMPONENT CODE #
  2428. ITEM FS$ET U(00,12,12); # PP ERROR TYPE #
  2429. ITEM FS$CHAN U(00,30,06); # CHANNEL #
  2430. ITEM FS$SMUN U(00,48,06); # SM UNIT NUMBER #
  2431. ITEM FS$DRDUN U(00,54,06); # DRD UNIT NUMBER #
  2432. ITEM FS$ESTO U(01,00,12); # EST ORDINAL #
  2433. ITEM FS$FSC C(04,00,50); # FSC STATUS WORDS #
  2434. END
  2435. CONTROL EJECT;
  2436.  
  2437. ZFILL(FSCBUF,FBLEN); # PRESET FORMAT BUFFER #
  2438.  
  2439. #
  2440. * PROCESS DATA FET ERROR.
  2441. #
  2442.  
  2443. IF FETTYPE EQ DFET
  2444. THEN # ACCESS DATA FET #
  2445. BEGIN # DATA #
  2446. FS$ET[0] = FHB$AT[0]; # ERROR TYPE #
  2447. P<FETMRB> = FHB$RBADDR[0];
  2448. FS$CHAN[0] = FMR$CHAN[0];
  2449. FS$SMUN[0] = FHB$SMUN[0]; # SM/DRD UNIT NUMBERS #
  2450. FS$DRDUN[0] = FHB$UNIT[0];
  2451. IF FS$ET[0] GQ RCHWET
  2452. THEN # ERROR INCLUDES FSC LOG #
  2453. BEGIN # LOG #
  2454. FS$FSC[0] = FHB$FSC[0]; # FSC STATUS #
  2455. END # LOG #
  2456.  
  2457. FHB$AT[0] = 0; # MARK ERROR AS PROCESSED #
  2458. END # DATA #
  2459.  
  2460. #
  2461. * SEND K-DISPLAY MESSAGE IF CIF IS OFFLINE
  2462. * OR AN OPERATOR *IMPL* IS REQUIRED.
  2463. #
  2464.  
  2465. IF FETTYPE EQ RFET
  2466. THEN # READ FET ERROR #
  2467. BEGIN # RESET #
  2468. FS$ET[0] = FMR$AT[0];
  2469. END # RESET #
  2470.  
  2471. IF FETTYPE EQ WFET
  2472. THEN # WRITE FET ERROR #
  2473. BEGIN # RESET #
  2474. FS$ET[0] = FMW$AT[0];
  2475. END # RESET #
  2476.  
  2477. IF FS$ET[0] EQ RCCIFO # CIF OFFLINE #
  2478. OR FS$ET[0] EQ RCIMPL # IMPL REQUIRED #
  2479. THEN # K-DISPLAY MESSAGE NECESSARY #
  2480. BEGIN # K #
  2481. P<KWORD> = LOC(FMR$KWORDS[0]);
  2482. KW$WORD[0] = 0;
  2483. KW$LINE1[0] = KM"KM23"; # ASSUME IMPL REQUIRED #
  2484. KW$LINE2[0] = KM"KM25";
  2485. KW$LINE3[0] = KM"KM16";
  2486. KP$EQ = UD$ESTO[FMR$CU[0]];
  2487. IF FS$ET[0] EQ RCCIFO
  2488. THEN # RESET PARAMETERS #
  2489. BEGIN # RESET #
  2490. KW$LINE1[0] = KM"KM1";
  2491. KW$LINE2[0] = KM"KM24";
  2492. KW$LINE3[0] = KM"KM13";
  2493. KP$CN = FMR$CHAN[0];
  2494. KP$CI = FMR$CIF[0];
  2495. END # RESET #
  2496.  
  2497. KW$RPGO[0] = TRUE; # ALLOW GO RESPONSE #
  2498. KW$DF[0] = TRUE; # SEND TO JOB DAYFILE #
  2499. KW$IC[0] = TRUE; # SET IMMEDIATE COMPLETION #
  2500. KREQ(LOC(KWORD),KLINK); # SEND K-DISPLAY REQUEST #
  2501. END # K #
  2502.  
  2503. #
  2504. * PROCESS DRIVER READ FET ERROR.
  2505. #
  2506.  
  2507. IF FETTYPE EQ RFET
  2508. THEN # ACCESS READ FET #
  2509. BEGIN # READ #
  2510. FS$CHAN[0] = FMR$CHAN[0];
  2511. FS$SMUN[0] = NOUNIT; # NO UNIT NUMBERS AVAILABLE #
  2512. FS$DRDUN[0] = NOUNIT;
  2513. IF FS$ET[0] GQ RCHWET
  2514. THEN # ERROR INCLUDES FSC LOG #
  2515. BEGIN # LOG #
  2516. IF FS$ET[0] NQ RCXSUM
  2517. THEN # NOT A CHECKSUM ERROR #
  2518. BEGIN # FSC #
  2519. FS$FSC[0] = FMR$FSC[0]; # FSC STATUS #
  2520. END # FSC #
  2521.  
  2522. IF FS$ET[0] NQ RCIMPL
  2523. THEN # DOWN BAD CHANNEL #
  2524. BEGIN # DOWN #
  2525. CHNGCHN;
  2526. END # DOWN #
  2527.  
  2528. ELSE # DOWN BAD CONTROLLER #
  2529. BEGIN # DOWN #
  2530. DOWNCU(FMR$CU[0]);
  2531. END # DOWN #
  2532.  
  2533. END # LOG #
  2534.  
  2535. FMR$AT[0] = 0; # MARK ERROR AS PROCESSED #
  2536. END # READ #
  2537.  
  2538. #
  2539. * PROCESS DRIVER WRITE FET ERROR.
  2540. #
  2541.  
  2542. IF FETTYPE EQ WFET
  2543. THEN # ACCESS WRITE FET #
  2544. BEGIN # WRITE #
  2545. FS$CHAN[0] = FMW$CHAN[0];
  2546. SAVEDMSG = P<UDT$MSG>; # SAVE MSG BUF LOCATION #
  2547. P<UDT$MSG> = FMW$OUT[0];
  2548. FS$SMUN[0] = NOUNIT; # ASSUME UNIT NUMBERS UNAVAILABLE #
  2549. FS$DRDUN[0] = NOUNIT;
  2550. IF MS$MSQN$DI[0] NQ 0
  2551. THEN # SM/DRD UNIT NUMBERS AVAILABLE #
  2552. BEGIN # RESET #
  2553. FS$SMUN[0] = SM$SUN[MS$MSQN$CN[0]]; # ASSUME LOWER DRD #
  2554. FS$DRDUN[0] = D1$SUN[MS$MSQN$CN[0]];
  2555. IF MS$MSQN$D0[0]
  2556. THEN # MESSAGE GOING TO UPPER DRD #
  2557. BEGIN # UPPER #
  2558. FS$DRDUN[0] = D0$SUN[MS$MSQN$CN[0]];
  2559. END # UPPER #
  2560.  
  2561. END # RESET #
  2562.  
  2563. ASSOCDATA = ((MS$ASS$DT[0]*2)+14)/15;
  2564. TEMPOUT = FMW$OUT[0] + PMSGLT + ASSOCDATA;
  2565. IF TEMPOUT GQ FMW$LIMIT[0]
  2566. THEN # MESSAGE WRAPPED AROUND FET #
  2567. BEGIN # WRAP #
  2568. TEMPOUT = TEMPOUT - FMW$LIMIT[0] + FMW$FIRST[0];
  2569. END # WRAP #
  2570.  
  2571. FMW$OUT[0] = TEMPOUT; # REMOVE MESSAGE FROM FET #
  2572. P<UDT$MSG> = SAVEDMSG; # RESTORE POINTER #
  2573. IF FS$ET[0] GQ RCHWET
  2574. THEN # ERROR INCLUDES FSC LOG #
  2575. BEGIN # LOG #
  2576. FS$FSC[0] = FMW$FSC[0]; # FSC STATUS #
  2577. IF FS$ET[0] NQ RCIMPL
  2578. THEN # DOWN BAD CHANNEL #
  2579. BEGIN # DOWN #
  2580. CHNGCHN;
  2581. END # DOWN #
  2582.  
  2583. ELSE # DOWN BAD CONTROLLER #
  2584. BEGIN # DOWN #
  2585. DOWNCU(FMR$CU[0]);
  2586. END # DOWN #
  2587.  
  2588. END # LOG #
  2589.  
  2590. FMW$AT[0] = 0; # MARK ERROR AS PROCESSED #
  2591. FMW$CMPL[0] = FALSE; # LET PP CONTINUE #
  2592. DRVRACTIVE = TRUE; # INSURE PP ACTIVE WHEN RETRYING #
  2593. END # WRITE #
  2594.  
  2595. FS$DC[0] = FSCCODE; # SET COMMON FIELDS #
  2596. FS$ESTO[0] = UD$ESTO[FMR$CU[0]];
  2597. MESSAGE(FSCCNT,BML); # SEND FSC LOG TO BML #
  2598. RETURN;
  2599. END # FSCLOG #
  2600.  
  2601. TERM
  2602. PROC GENREQ;
  2603. # TITLE GENREQ - GENERAL DRIVER REQUESTS. #
  2604.  
  2605. BEGIN # GENREQ #
  2606.  
  2607. #
  2608. ** GENREQ - GENERAL DRIVER REQUESTS.
  2609. *
  2610. * *GENREQ* PROCESSES *DRQUEUE* REQUESTS TO WRITE VOLUME LABELS,
  2611. * WRITE CARTRIDGE LABELS, AND READ RAW STRIPES.
  2612. *
  2613. * PROC GENREQ
  2614. *
  2615. * ENTRY P<LLRQ> = *DRQUEUE* ENTRY ADDRESS.
  2616. *
  2617. * EXIT THE *DRQUEUE* ENTRY REQUEST STATE FIELD HAS BEEN
  2618. * UPDATED TO INDICATE WHERE SUBSEQUENT PROCESSING OF
  2619. * THIS REQUEST IS TO CONTINUE.
  2620. *
  2621. * MESSAGES *EXEC ABNORMAL, GENREQ1.* - UDT MESSAGE BUFFER STILL
  2622. * IN USE. IT ALSO OCCURS IF
  2623. * THE LABEL BUFFER WAS NOT
  2624. * INTERLOCKED WHEN WRITING A
  2625. * CARTRIDGE LABEL.
  2626. *
  2627. * *EXEC ABNORMAL, GENREQ2.* - DATA LENGTH ERROR WHEN
  2628. * WRITING A CARTRIDGE OR
  2629. * VOLUME LABEL.
  2630. *
  2631. * NOTES IF THE REQUEST WAS TO WRITE A VOLUME LABEL, TWO TAPE
  2632. * MARKS ARE WRITTEN AT THE START OF THE VOLUME.
  2633. *
  2634. * IF THE REQUEST WAS TO READ A RAW STRIPE, THE M860
  2635. * RESPONSE PRECEDES THE RAW STRIPE IN THE ASSOCIATED
  2636. * DATA BUFFER.
  2637. *
  2638. * THIS IS A PSEUDO-REENTRANT PROCEDURE.
  2639. #
  2640.  
  2641.  
  2642. #
  2643. **** PROC GENREQ - XREF LIST BEGIN.
  2644. #
  2645.  
  2646. XREF
  2647. BEGIN
  2648. PROC ABORT; # ABORT #
  2649. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  2650. PROC SENDMSG; # SEND M860 MESSAGE #
  2651. PROC ZFILL; # ZERO-FILL BUFFER #
  2652. END
  2653.  
  2654. #
  2655. **** PROC GENREQ - XREF LIST END.
  2656. #
  2657.  
  2658. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  2659. *CALL,COMBFAS
  2660. *CALL,COMBCPR
  2661. *CALL,COMBHFC
  2662. *CALL,COMBLRQ
  2663. *CALL,COMBRCD
  2664. *CALL,COMBUDT
  2665. *CALL,COMXCTF
  2666. *CALL,COMXMSC
  2667.  
  2668. SWITCH GDREQ:PROCST # DRIVER REQUEST STATE #
  2669. GDRINIT:INITIAL, # INITIAL STATE #
  2670. GDRMSGE:CONT1; # CONTINUATION 1 #
  2671. CONTROL EJECT;
  2672.  
  2673. GOTO GDREQ[LLR$RS[0]];
  2674.  
  2675. #
  2676. * INITIAL DRIVER REQUEST STATE.
  2677. #
  2678.  
  2679. GDRINIT:
  2680. P<MBFHDR> = LLR$MBH[0];
  2681. IF MBF$WORD[0] NQ 0 # DRD STILL IN USE #
  2682. OR (LLR$RC[0] EQ WRT$LABEL # LABEL BUFFER EMPTY #
  2683. AND NOT LABELBUSY)
  2684. THEN # EXEC/DRIVER ERRORS #
  2685. BEGIN # ABORT #
  2686. FE$RTN[0] = "GENREQ1.";
  2687. GOTO GENREQ1;
  2688. END # ABORT #
  2689.  
  2690. P<UDT$MSG> = P<MBFHDR> + 1;
  2691. MS$MSG[0] = HFC$WRTLBL; # ASSUME *WRITE-CARTRIDGE-LABEL* #
  2692. IF LLR$RC[0] EQ WRT$VOL
  2693. THEN # WRITING VOLUME LABEL #
  2694. BEGIN # RESET #
  2695. MS$MSG[0] = HFC$WVLBUT;
  2696. END # RESET #
  2697.  
  2698. IF LLR$RC[0] EQ RD$RAW$STP
  2699. THEN # READING RAW DATA #
  2700. BEGIN # RESET #
  2701. MS$MSG[0] = HFC$RDRAW;
  2702. END # RESET #
  2703.  
  2704. MBF$SAVE[0] = SAVEMOST;
  2705. LLR$RS[0] = PROCST"CONT1"; # SET NEXT REQUEST STATE #
  2706.  
  2707. #
  2708. * ISSUE GENERAL M860 MESSAGE.
  2709. #
  2710.  
  2711. GDRMSGE:
  2712. P<MBFHDR> = LLR$MBH[0];
  2713. SENDMSG; # SEND M860 MESSAGE #
  2714. IF MBF$SBADDR[0] EQ 0 ##
  2715. AND LLR$DR[0] EQ RESPTYP4"OK4" # HARDWARE OK #
  2716. THEN # RESPONSE NOT YET RECEIVED #
  2717. BEGIN # RETRY #
  2718. RETURN;
  2719. END # RETRY #
  2720.  
  2721. IF MS$RETCODE[0] EQ HRC$DLERR
  2722. THEN # DATA LENGTH ERROR #
  2723. BEGIN # ABORT #
  2724. FE$RTN[0] = "GENREQ2.";
  2725. GOTO GENREQ1;
  2726. END # ABORT #
  2727.  
  2728. IF MS$MSG[0] EQ HFC$WRTLBL
  2729. THEN # CARTRIDGE LABEL WRITTEN #
  2730. BEGIN # CLEAR #
  2731. LABELBUSY = FALSE; # FREE UP LABEL BUFFER #
  2732. END # CLEAR #
  2733.  
  2734. IF MS$MSG[0] EQ HFC$WVLBUT # VOLUME LABEL WRITTEN #
  2735. OR MS$MSG[0] EQ HFC$WVLBLT
  2736. THEN # MNT-VOL NEEDS LAST-STRIPE-WRIT #
  2737. BEGIN # LAST #
  2738. LLR$LT$ST[0] = MS$PARM1A[0]; # SAVE LAST-STRIPE-WRITTEN #
  2739. END # LAST #
  2740.  
  2741. IF MS$MSG[0] NQ HFC$RDRAW # SAVE RESPONSE IN DATA BUFFER #
  2742. AND MBF$SBADDR[0] NQ 0 # RESPONSE DID NOT TIME OUT #
  2743. AND (LLR$DR[0] NQ RESPTYP4"M86$HDW$PR" # RESPONSE RECEIVED #
  2744. OR LLR$DRFUL[0])
  2745. THEN # CLEAR STORAGE BUFFER #
  2746. BEGIN # CLEAR #
  2747. ZFILL(UDT$MSG,MSGLT);
  2748. END # CLEAR #
  2749.  
  2750. MBF$WORD[0] = 0;
  2751. LLR$RS[0] = PROCST"COMPLETE";
  2752. RETURN;
  2753.  
  2754. GENREQ1:
  2755. MESSAGE(FEMSG,UDFL1);
  2756. ABORT;
  2757. END # GENREQ #
  2758.  
  2759. TERM
  2760. PROC GETCHAN((FNCODE));
  2761. # TITLE GETCHAN - ALLOCATE CHANNEL. #
  2762.  
  2763. BEGIN # GETCHAN #
  2764.  
  2765. #
  2766. ** GETCHAN - ALLOCATE CHANNEL.
  2767. *
  2768. * *GETCHAN* ALLOCATES AN M860 CONTROLLER CHANNEL.
  2769. *
  2770. * PROC GETCHAN((FNCODE))
  2771. *
  2772. * ENTRY (FNCODE) = PP FUNCTION CODE TO BE ISSUED ON THE
  2773. * DESIRED CHANNEL.
  2774. *
  2775. * P<LLRQ> = *DRQUEUE* ENTRY ADDRESS, IF NOT ALLOCATING A
  2776. * CHANNEL TO RETURN AN M860 ERROR LOG MESSAGE.
  2777. *
  2778. * P<UDT$MSG> = UDT/SBT MESSAGE BUFFER ADDRESS.
  2779. *
  2780. * EXIT THE MESSAGE FET BASED ARRAYS POINT TO THE FETS USED BY
  2781. * THE ALLOCATED CHANNEL. THE *DRQUEUE* ENTRY CONTAINS
  2782. * THE ASSOCIATED UDT CONTROLLER ORDINAL. IF NO CHANNEL
  2783. * IS ALLOCATED, *HARDWARE PROBLEM* STATUS IS RETURNED IN
  2784. * THE *DRQUEUE* ENTRY, AND THE MESSAGE WRITE FET ADDRESS
  2785. * IS CLEARED TO INDICATE IT.
  2786. #
  2787.  
  2788.  
  2789. DEF FIRSTCU #0#; # NUMBER OF 1ST CU ORD TO SM #
  2790. DEF LASTCU #1#; # NUMBER OF 2ND CU ORD TO SM #
  2791.  
  2792. DEF ACTIVE #1#; # WRITE/DATA BUFFER ACTIVE #
  2793. DEF INACTIVE #0#; # WRITE/DATA BUFFER INACTIVE #
  2794.  
  2795. DEF FIRSTTEST #1#; # FREE CHANNEL (DATA) #
  2796. DEF TEST2 #2#; # ONLY MESSAGES ACTIVE #
  2797. DEF TEST3 #3#; # FREE CHANNEL (MESSAGES) #
  2798. DEF TEST4 #4#; # MESSAGES AND DATA ACTIVE #
  2799. DEF LASTTEST #5#; # ONLY DATA ACTIVE #
  2800.  
  2801. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  2802. *CALL,COMBFAS
  2803. *CALL,COMBCDD
  2804. *CALL,COMBCPR
  2805. *CALL,COMBFET
  2806. *CALL,COMBHFC
  2807. *CALL,COMBLRQ
  2808. *CALL,COMBUDT
  2809.  
  2810. ITEM FNCODE U; # PASSED FUNCTION CODE #
  2811. ITEM I I; # INDEX #
  2812. ITEM J I; # INDEX #
  2813. ITEM K I; # INDEX #
  2814. ITEM MSGC U; # SAVED MESSAGE COUNT #
  2815.  
  2816. #
  2817. * CONTROLLER ORDINAL ARRAY.
  2818. #
  2819.  
  2820. ARRAY SC [FIRSTCU:LASTCU] S(1); # SM CU-S #
  2821. BEGIN
  2822. ITEM SC$ORD U(00,00,60); # CU ORDINAL #
  2823. END
  2824.  
  2825. #
  2826. * CHANNEL TEST DEFINITION ARRAY.
  2827. #
  2828.  
  2829. ARRAY TST [FIRSTTEST:LASTTEST] S(1); # TESTS #
  2830. BEGIN
  2831. ITEM TEST$WB U(00,00,01) = [INACTIVE,
  2832. ACTIVE,
  2833. INACTIVE,
  2834. ACTIVE,
  2835. INACTIVE]; # WRITE BUF TESTS #
  2836. ITEM TEST$DB U(00,01,01) = [INACTIVE,
  2837. INACTIVE,
  2838. INACTIVE,
  2839. ACTIVE,
  2840. ACTIVE]; # DATA BUF TESTS #
  2841. END
  2842.  
  2843. #
  2844. * CHANNEL STATUS ARRAY.
  2845. #
  2846.  
  2847. ARRAY CH [0:MAX$CH] S(1);
  2848. BEGIN
  2849. ITEM CH$O B(00,00,01); # ON/OFF STATUS #
  2850. END
  2851. CONTROL EJECT;
  2852.  
  2853. IF UDT$HWOFF[0] NQ 0
  2854. THEN # NO CU-S/CHANNELS TO ALLOCATE #
  2855. BEGIN # EXIT #
  2856. GOTO GETCHAN1;
  2857. END # EXIT #
  2858.  
  2859. IF FNCODE EQ IRMDAT
  2860. THEN # PICK SAME CIF AS MNT-VOL #
  2861. BEGIN # SAME #
  2862. P<MWBTMP> = LOC(UD$CAMF[LLR$CU[0]]);
  2863. P<FETMWB> = MWB$ADDR[LLR$CIF[0]];
  2864. P<FETMRA> = P<FETMWB> - 1;
  2865. P<FETMRB> = FRA$MRBADR[0];
  2866. P<FETFHB> = LLR$MSFET[0]; # SAVE ADDRESS FOR FSC LOG #
  2867. FHB$RBADDR[0] = P<FETMRB>;
  2868. RETURN;
  2869. END # SAME #
  2870.  
  2871. IF MS$MSG$R[0] # M860-INITIATED MESSAGE #
  2872. THEN # PICK CHANNEL THIS MSG LAST USED #
  2873. BEGIN # PICK #
  2874. IF MS$MSG[0] LS (HRF$ELGFUL + HRF$R) # NOT ERROR LOG MSG #
  2875. OR MS$MSG[0] GR (HRF$REQDMP + HRF$R)
  2876. THEN # RESET NEW CHANNEL #
  2877. BEGIN # CIF #
  2878. P<MWBTMP> = LOC(UD$CAMF[LLR$CU[0]]);
  2879. P<FETMWB> = MWB$ADDR[LLR$CIF[0]];
  2880. P<FETMRA> = P<FETMWB> - 1;
  2881. P<FETMRB> = FRA$MRBADR[0];
  2882. IF (NOT FMW$CHON[0]) # CHANNEL DOWN #
  2883. OR (NOT UD$CUON[FMR$CU[0]]) # CONTROLLER DOWN #
  2884. THEN # NO HARDWARE AVAILABLE #
  2885. BEGIN # DOWN #
  2886. GOTO GETCHAN1;
  2887. END # DOWN #
  2888.  
  2889. END # CIF #
  2890.  
  2891. RETURN;
  2892. END # PICK #
  2893.  
  2894. P<FETMWB> = 0; # PRESET AS NO CHANNEL FOUND #
  2895. MSGC = -1; # ASSUME SENDING MESSAGE #
  2896. IF MS$MSG$M[0] EQ HFC$MVLM # MOUNT-VOLUME #
  2897. THEN # DATA TRANSFER NEEDS LEAST MSGS #
  2898. BEGIN # DATA #
  2899. MSGC = 7777;
  2900. END # DATA #
  2901.  
  2902. #
  2903. * DETERMINE ELIGIBLE CONTROLLERS.
  2904. #
  2905.  
  2906. SC$ORD[FIRSTCU] = 0; # CLEAR CONTROLLER ARRAY #
  2907. SC$ORD[LASTCU] = 0;
  2908. SC$ORD[FIRSTCU] = LLR$CU[0]; # ASSUME GENERAL MESSAGE #
  2909. IF (MS$MSG[0] EQ HFC$ACCR ##
  2910. OR MS$MSG[0] EQ HFC$ENCRDR) ##
  2911. AND LLR$PRCNME[0] NQ REQTYP4"INITHW" # NOT SERVICE-CELL LOAD #
  2912. THEN # ONLY NORMAL LOAD HAS CHOICE #
  2913. BEGIN # DRD #
  2914. IF UD$CUON[SM$CUO0[MS$MSQN$CN[0]]]
  2915. THEN # 1ST CU AVAILABLE #
  2916. BEGIN # 1ST #
  2917. SC$ORD[FIRSTCU] = SM$CUO0[MS$MSQN$CN[0]];
  2918. END # 1ST #
  2919.  
  2920. IF UD$CUON[SM$CUO1[MS$MSQN$CN[0]]]
  2921. THEN # 2ND CU AVAILABLE #
  2922. BEGIN # 2ND #
  2923. SC$ORD[LASTCU] = SM$CUO1[MS$MSQN$CN[0]];
  2924. END # 2ND #
  2925.  
  2926. END # DRD #
  2927.  
  2928. IF SC$ORD[FIRSTCU] EQ 0 ##
  2929. AND SC$ORD[LASTCU] EQ 0
  2930. THEN # NO HARDWARE AVAILABLE #
  2931. BEGIN # NONE #
  2932. GOTO GETCHAN1;
  2933. END # NONE #
  2934.  
  2935. #
  2936. * SEARCH FOR BEST CHANNEL ON ALL ELIGIBLE CONTROLLERS.
  2937. #
  2938.  
  2939. LLR$DR[0] = RESPTYP4"M86$HDW$PR";
  2940. SLOWFOR I = FIRSTTEST STEP 1 UNTIL LASTTEST
  2941. DO # APPLY TESTS FOR BEST CHANNEL #
  2942. BEGIN # TEST #
  2943. IF (MS$MSG$M[0] EQ HFC$MVLM # DATA TEST #
  2944. AND I GR TEST2) ##
  2945. OR (MS$MSG$M[0] NQ HFC$MVLM # NORMAL MESSAGE TEST #
  2946. AND I EQ FIRSTTEST)
  2947. THEN # SKIP THIS TEST #
  2948. BEGIN # LOOP #
  2949. TEST I;
  2950. END # LOOP #
  2951.  
  2952. SLOWFOR J = FIRSTCU STEP 1 UNTIL LASTCU
  2953. DO # SCAN ELIGIBLE CONTROLLERS #
  2954. BEGIN # CU #
  2955. IF SC$ORD[J] EQ 0 # NO CU #
  2956. OR (UD$CUON[SC$ORD[J]] ##
  2957. AND UD$CNUP[SC$ORD[J]] ##
  2958. AND LLR$PRCNME[0] NQ REQTYP4"INITHW") # CU INITIALIZING #
  2959. OR ((LLR$PRCNME[0] EQ REQTYP4"INITHW" ##
  2960. OR MS$MSG[0] EQ HFC$ACCR) ##
  2961. AND NOT UD$CUON[SC$ORD[J]]) # ALLOW ERR RCVRY AFTER INIT #
  2962. THEN # SKIP THIS CU #
  2963. BEGIN # SKIP #
  2964. TEST J;
  2965. END # SKIP #
  2966.  
  2967. IF MS$MSQN$DI[0] NQ 0
  2968. THEN # CHECK IF DRD ON TO CU #
  2969. BEGIN # DRD #
  2970. P<PTHSTAT> = LOC(D1$ST[LLR$SMO[0]]); # ASSUME LOWER DRD #
  2971. IF LLR$DRD[0] EQ 0
  2972. THEN # MESSAGE FOR UPPER DRD #
  2973. BEGIN # RESET #
  2974. P<PTHSTAT> = LOC(D0$ST[LLR$SMO[0]]);
  2975. END # RESET #
  2976.  
  2977. DRST = DRST1; # ASSUME 2ND CU #
  2978. IF SC$ORD[J] EQ SM$CUO0[LLR$SMO[0]]
  2979. THEN # MESSAGE FOR 1ST CU #
  2980. BEGIN # RESET #
  2981. DRST = DRST0;
  2982. END # RESET #
  2983.  
  2984. IF PATHBIT(DRST,PATH$DF"U$ON") EQ OFF ##
  2985. AND PATHBIT(DRST,PATH$DF"U$CU$ACK") EQ OFF
  2986. THEN # DRD NOT ON TO THIS CU #
  2987. BEGIN # RETRY #
  2988. TEST J;
  2989. END # RETRY #
  2990.  
  2991. END # DRD #
  2992.  
  2993. IF (LLR$PRCNME[0] NQ REQTYP4"INITHW" # NORMAL LOAD #
  2994. AND MS$MSG[0] EQ HFC$ACCR) ##
  2995. OR MS$MSG[0] EQ HFC$ENCRDR # ENTER #
  2996. OR (MS$MSG[0] EQ HFC$CHSDRD # DRD TURNING ON #
  2997. AND MS$PARM1A[0] EQ ONLINE)
  2998. THEN # CHECK IF SM CAN BE ACCESSED #
  2999. BEGIN # SM #
  3000. P<PTHSTAT> = LOC(SM$STS[LLR$SMO[0]]);
  3001. SMST = SMST1; # ASSUME 2ND CU #
  3002. IF SC$ORD[J] EQ SM$CUO0[LLR$SMO[0]]
  3003. THEN # MESSAGE FOR 1ST CU #
  3004. BEGIN # RESET #
  3005. SMST = SMST0;
  3006. END # RESET #
  3007.  
  3008. IF PATHBIT(SMST,PATH$DF"U$ON") EQ OFF # SM NOT ON #
  3009. OR PATHBIT(SMST,PATH$DF"U$CU$ACK") EQ ON
  3010. THEN # SM CANNOT BE ACCESSED #
  3011. BEGIN # RETRY #
  3012. TEST J;
  3013. END # RETRY #
  3014.  
  3015. END # SM #
  3016.  
  3017. CH$O[0] = UD$CHANA$O[SC$ORD[J]]; # PRESET CHANNEL ARRAY #
  3018. CH$O[1] = UD$CHANB$O[SC$ORD[J]];
  3019. CH$O[2] = UD$CHANC$O[SC$ORD[J]];
  3020. CH$O[3] = UD$CHAND$O[SC$ORD[J]];
  3021. SLOWFOR K = 0 STEP 1 UNTIL MAX$CH
  3022. DO # SCAN ALL CHANS ON ELIGIBLE CU #
  3023. BEGIN # CHANNEL #
  3024. IF B<K,1>UD$CHEX[SC$ORD[J]] EQ 0 # NOT EXISTS #
  3025. OR NOT CH$O[K] # CHANNEL OFF #
  3026. THEN # TRY ANOTHER CHANNEL #
  3027. BEGIN
  3028. TEST K;
  3029. END
  3030.  
  3031. LLR$DR[0] = RESPTYP4"OK4";
  3032. IF B<K,1>UD$WBACT[SC$ORD[J]] EQ TEST$WB[I] ##
  3033. AND B<K,1>UD$DBACT[SC$ORD[J]] EQ TEST$DB[I] ##
  3034. AND ((MS$MSG$M[0] NQ HFC$MVLM # SENDING NORMAL MSG #
  3035. AND MSGCNT(K,SC$ORD[J]) GR MSGC) # CHN WITH MOST MSGS #
  3036. OR (MS$MSG$M[0] EQ HFC$MVLM # DATA TRANSFER #
  3037. AND MSGCNT(K,SC$ORD[J]) LS MSGC)) # CHN WITH LEAST MSGS #
  3038. THEN # ELIGIBLE CHANNEL FOUND #
  3039. BEGIN # FOUND #
  3040. P<MWBTMP> = LOC(UD$CAMF[SC$ORD[J]]);
  3041. P<FETMWB> = MWB$ADDR[K]; # SET FET ADDRESS #
  3042. P<FETMRA> = P<FETMWB> - 1;
  3043. P<FETMRB> = FRA$MRBADR[0];
  3044. LLR$CU[0] = SC$ORD[J]; # SAVE CU ORDINAL #
  3045. MSGC = MSGCNT(K,SC$ORD[J]); # SAVE NEW MSG COUNT #
  3046. END # FOUND #
  3047.  
  3048. END # CHANNEL #
  3049.  
  3050. END # CU #
  3051.  
  3052. IF P<FETMWB> NQ 0
  3053. THEN # BEST CHANNEL FOUND #
  3054. BEGIN # EXIT #
  3055. RETURN;
  3056. END # EXIT #
  3057.  
  3058. END # TEST #
  3059.  
  3060. RETURN; # NO CHANNEL SELECTED #
  3061.  
  3062. GETCHAN1: # CLEAN UP FROM HARDWARE PROBLEM #
  3063. P<FETMWB> = 0; # NO CHANNEL ALLOCATED #
  3064. LLR$DR[0] = RESPTYP4"M86$HDW$PR";
  3065. RETURN;
  3066. END # GETCHAN #
  3067.  
  3068. TERM
  3069. PROC INITDRD;
  3070. # TITLE INITDRD - INITIALIZE DRD-S. #
  3071.  
  3072. BEGIN # INITDRD #
  3073.  
  3074. #
  3075. ** INITDRD - INITIALIZE DRD-S.
  3076. *
  3077. * *INITDRD* PROCESSES ALL DRD STATUS CHANGE REQUESTS. THE UDT IS
  3078. * SCANNED FOR ANY DRD-S CHANGING STATUS, AND AN M860 MESSAGE IS
  3079. * SENT FOR EACH CHANGE FOUND. IF THE DRD IS TO BE PUT ONLINE, AN
  3080. * M860 CLEAR CARTRIDGE IS LOADED AND STORED THROUGH IT, AND THE
  3081. * SERVICE CELLS IN THE SM ARE CHECKED FOR CARTRIDGES. ANY
  3082. * CARTRIDGES THUS FOUND ARE THEN STORED IN THE MATRIX OR EJECTED.
  3083. *
  3084. * PROC INITDRD
  3085. *
  3086. * ENTRY P<LLRQ> = *DRQUEUE* ENTRY ADDRESS.
  3087. *
  3088. * EXIT THE *DRQUEUE* ENTRY REQUEST STATE FIELD HAS BEEN
  3089. * UPDATED TO INDICATE WHERE SUBSEQUENT PROCESSING OF
  3090. * THIS REQUEST IS TO CONTINUE.
  3091. *
  3092. * MESSAGES *EXEC ABNORMAL, INITDRD1.* - UDT MESSAGE BUFFER STILL
  3093. * IN USE.
  3094. *
  3095. * NOTES THIS IS A PSEUDO-REENTRANT PROCEDURE.
  3096. #
  3097.  
  3098.  
  3099. #
  3100. **** PROC INITDRD - XREF LIST BEGIN.
  3101. #
  3102.  
  3103. XREF
  3104. BEGIN
  3105. PROC ABORT; # ABORT #
  3106. PROC KREQ; # SEND K-DISPLAY REQUEST #
  3107. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  3108. PROC SENDMSG; # SEND M860 MESSAGE #
  3109. PROC ZFILL; # ZERO-FILL BUFFER #
  3110. END
  3111.  
  3112. #
  3113. **** PROC INITDRD - XREF LIST END.
  3114. #
  3115.  
  3116. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  3117. *CALL,COMBFAS
  3118. *CALL,COMBCPR
  3119. *CALL,COMBFET
  3120. *CALL,COMBHFC
  3121. *CALL,COMBKDD
  3122. *CALL,COMBLBL
  3123. *CALL,COMBLRQ
  3124. *CALL,COMBUDT
  3125. *CALL,COMXCTF
  3126. *CALL,COMXMSC
  3127.  
  3128. ITEM STSP U; # STATUS FROM 1ST CU #
  3129. ITEM STSS U; # STATUS FROM 2ND CU #
  3130.  
  3131. SWITCH DRDLBL:PROCST # DRIVER REQUEST STATE #
  3132. DRDINIT:INITIAL, # INITIAL STATE #
  3133. DRDMSGE:CONT1, # CONTINUATION 1 #
  3134. DRDACQC:CONT2, # CONTINUATION 2 #
  3135. DRDSTRC:CONT3; # CONTINUATION 3 #
  3136. CONTROL EJECT;
  3137.  
  3138. GOTO DRDLBL[LLR$RS[0]];
  3139.  
  3140. #
  3141. * INITIAL DRIVER REQUEST STATE.
  3142. #
  3143.  
  3144. DRDINIT:
  3145. P<MBFHDR> = LOC(UD$MSG[LLR$CU[0]]) - 1;
  3146. IF MBF$ACTIVE[0]
  3147. THEN # MESSAGE BUFFER IN USE #
  3148. BEGIN # EXIT #
  3149. IF LLR$PRCNME[0] EQ REQTYP4"INITHW" ##
  3150. AND LLR$DRFUL[0]
  3151. THEN # PRESET MSG BUF TO TURN OFF DRD #
  3152. BEGIN # ERROR #
  3153. DRVRACTIVE = TRUE;
  3154. LLR$RS[0] = PROCST"CONT1"; # TURN OFF DRD ON NEXT PASS #
  3155. P<UDT$MSG> = P<MBFHDR> + 1;
  3156. MS$MSG[0] = HFC$CHSDRD; # IN CASE SM WAS GOING ON #
  3157. GOTO INITDRD1;
  3158. END # ERROR #
  3159.  
  3160. RETURN; # WAIT TO TURN OFF DRD ON ERROR #
  3161. END # EXIT #
  3162.  
  3163. IF MBF$WORD[0] NQ 0
  3164. THEN # LAST MESSAGE NOT PROCESSED #
  3165. BEGIN # ABORT #
  3166. FE$RTN[0] = "INITDRD1.";
  3167. GOTO INITDRD2;
  3168. END # ABORT #
  3169.  
  3170. P<UDT$MSG> = LOC(UD$MSG[LLR$CU[0]]);
  3171. MS$MSG[0] = HFC$CHSDRD; # CHANGE DRD STATUS #
  3172. UD$SAVE[LLR$CU[0]] = SAVENONE;
  3173. LLR$RS[0] = PROCST"CONT1"; # SET NEW REQUEST STATE #
  3174.  
  3175. #
  3176. * ISSUE MESSAGES TO CHANGE DRD STATUSES.
  3177. #
  3178.  
  3179. DRDMSGE:
  3180. IF INITIALIZE ##
  3181. AND DRYUP
  3182. THEN # FORCE QUICK EXIT #
  3183. BEGIN # EXIT #
  3184. RETURN;
  3185. END # EXIT #
  3186.  
  3187. P<MBFHDR> = LOC(UD$MSG[LLR$CU[0]]) - 1;
  3188. IF P<LLRQ> NQ UD$LLRQA[LLR$CU[0]] # MSG BUF IN USE #
  3189. AND MBF$ACTIVE[0]
  3190. THEN # DRD-S TURNING OFF FROM ERROR #
  3191. BEGIN # RETRY #
  3192. RETURN; # WAIT UNTIL OTHER LLRQ FINISHED #
  3193. END # RETRY #
  3194.  
  3195. SENDMSG; # SEND M860 MESSAGE #
  3196. IF UD$DRDWAIT[LLR$CU[0]]
  3197. THEN # WAITING FOR DRD TO EMPTY #
  3198. BEGIN # WAIT #
  3199. UD$DRDWAIT[LLR$CU[0]] = FALSE; # IF 2ND LLRQ AWAITING MSG #
  3200. LLR$RS[0] = PROCST"INITIAL"; # IN CASE RESERVED NEXT PASS #
  3201. RETURN;
  3202. END # WAIT #
  3203.  
  3204. IF NOT UD$MBACT[LLR$CU[0]]
  3205. THEN # ALL DRD-S ON THIS CU PROCESSED #
  3206. BEGIN # EXIT #
  3207. LLR$RS[0] = PROCST"COMPLETE";
  3208. UD$CNUP[LLR$CU[0]] = FALSE; # CU CLEANUP COMPLETE #
  3209. IF NOT LLR$DRDOFF[0] # NOT PROCESSING DRD ERROR #
  3210. THEN # CU INITIALIZING COMPLETED #
  3211. BEGIN # CLEAR #
  3212. CURESERVED = FALSE; # LET ANOTHER CU INITIALIZE #
  3213. END # CLEAR #
  3214.  
  3215. GOTO INITDRD1;
  3216. END # EXIT #
  3217.  
  3218. IF UD$SBADDR[LLR$CU[0]] EQ 0 ##
  3219. AND LLR$DR[0] NQ RESPTYP4"M86$HDW$PR"
  3220. THEN # RESPONSE NOT YET RECEIVED #
  3221. BEGIN # RETRY #
  3222. RETURN;
  3223. END # RETRY #
  3224.  
  3225. P<PTHSTAT> = LOC(D1$ST[LLR$SMO[0]]); # ASSUME LOWER DRD #
  3226. IF LLR$DRD[0] EQ 0
  3227. THEN # UPPER DRD BEING CHANGED #
  3228. BEGIN # RESET #
  3229. P<PTHSTAT> = LOC(D0$ST[LLR$SMO[0]]);
  3230. END # RESET #
  3231.  
  3232. DRST = DRST1; # ASSUME 2ND CU #
  3233. IF LLR$CU[0] EQ SM$CUO0[LLR$SMO[0]]
  3234. THEN # RESET DRD INDEX TO 1ST CU #
  3235. BEGIN # RESET #
  3236. DRST = DRST0;
  3237. END # RESET #
  3238.  
  3239. IF PATHBIT(DRST,PATH$DF"U$ON") EQ ON ##
  3240. AND PATHBIT(DRST,PATH$DF"U$CU$ACK") EQ ON
  3241. THEN # CLEAR SM RESERVATION #
  3242. BEGIN # CLEAR #
  3243. SM$ACCBUSY[LLR$SMO[0]] = FALSE;
  3244. IF LLR$DR[0] EQ RESPTYP4"M86$HDW$PR"
  3245. THEN # DO NOT CHECK SERVICE CELLS #
  3246. BEGIN # SCCU #
  3247. SM$SCCU[LLR$SMO[0]] = FALSE; # ALSO DONE FOR BAD DRD CASE #
  3248. END # SCCU #
  3249.  
  3250. END # CLEAR #
  3251.  
  3252. IF LLR$DR[0] EQ RESPTYP4"M86$HDW$PR"
  3253. THEN # RECOVER DRD STATUS #
  3254. BEGIN # RECOVER #
  3255. DRVRACTIVE = TRUE; # FORCE NEXT NORMAL UDT PASS #
  3256. IF (PATHBIT(DRST,PATH$DF"U$ON") EQ ON ##
  3257. OR PATHBIT(DRST,PATH$DF"U$RQ$DIAG") EQ ON) ##
  3258. AND MBF$SENT[0] # DRD REALLY OFF IN HARDWARE #
  3259. THEN # INFORM OPERATOR OF DRD PROBLEM #
  3260. BEGIN # K #
  3261. P<KWORD> = LOC(LLR$KWORDS[0]);
  3262. KW$WORD[0] = 0;
  3263. KW$LINE1[0] = KM"KM3"; # SET MESSAGE ORDINALS #
  3264. KW$LINE2[0] = KM"KM16";
  3265. KP$EQ = UD$ESTO[LLR$CU[0]]; # SET MESSAGE PARAMETERS #
  3266. P<MWBTMP> = LOC(UD$CAMF[LLR$CU[0]]);
  3267. P<FETMWB> = MWB$ADDR[LLR$CIF[0]];
  3268. P<FETMRA> = P<FETMWB> - 1;
  3269. P<FETMRB> = FRA$MRBADR[0];
  3270. KP$CN = FMR$CHAN[0];
  3271. KP$DT = SM$ID[LLR$SMO[0]];
  3272. KP$ID = D1$SUN[LLR$SMO[0]]; # ASSUME LOWER DRD #
  3273. IF LLR$DRD[0] EQ 0
  3274. THEN # LOWER DRD HAD ERROR #
  3275. BEGIN # RESET #
  3276. KP$ID = D0$SUN[LLR$SMO[0]];
  3277. END # RESET #
  3278.  
  3279. KW$IC[0] = TRUE; # SET IMMEDIATE COMPLETION #
  3280. KW$DF[0] = TRUE; # SEND TO JOB DAYFILE #
  3281. KW$RPGO[0] = TRUE; # ALLOW GO RESPONSE #
  3282. KREQ(LOC(KWORD),KLINK); # SEND K-DISPLAY REQUEST #
  3283. END # K #
  3284.  
  3285. PATHBIT(DRST,PATH$DF"U$ON") = OFF; # DRD ASSUMED OFF IN M860 #
  3286. PATHBIT(DRST,PATH$DF"U$RQ$DIAG") = OFF;
  3287. END # RECOVER #
  3288.  
  3289. PATHBIT(DRST,PATH$DF"U$CU$ACK") = OFF;
  3290. PATHBIT(DRST,PATH$DF"U$DIAG$ACK") = OFF;
  3291.  
  3292. IF LLR$DRD[0] EQ 0
  3293. THEN # UPPER DRD BEING CHANGED #
  3294. BEGIN # DRD0 #
  3295. STSP = D0$STSP[LLR$SMO[0]];
  3296. STSS = D0$STSS[LLR$SMO[0]];
  3297. D0$FLAG[LLR$SMO[0]] = STSP LOR STSS;
  3298. END # DRD0 #
  3299.  
  3300. ELSE # LOWER DRD BEING PROCESSED #
  3301. BEGIN # DRD1 #
  3302. STSP = D1$STSP[LLR$SMO[0]];
  3303. STSS = D1$STSS[LLR$SMO[0]];
  3304. D1$FLAG[LLR$SMO[0]] = STSP LOR STSS;
  3305. END # DRD1 #
  3306.  
  3307. #
  3308. * CLEAR THE SERVICE CELLS IF THE DRD WAS VARIED ONLINE.
  3309. #
  3310.  
  3311. IF PATHBIT(DRST,PATH$DF"U$ON") EQ OFF ##
  3312. THEN # DRD NOT TURNED ON #
  3313. BEGIN # CONTINUE #
  3314. IF LLR$DRFUL[0]
  3315. THEN # INDICATE BAD DRD TURNED OFF #
  3316. BEGIN # FLAG #
  3317. LLR$DRDOFF[0] = TRUE;
  3318. IF LLR$SC[0] NQ 0
  3319. THEN # THIS DRD WAS CHECKING SRV CELLS #
  3320. BEGIN # SCCU #
  3321. LLR$SC[0] = 0;
  3322. SM$SCCU[LLR$SMO[0]] = FALSE; # HALT SRV CELL CHECKING #
  3323. END # SCCU #
  3324.  
  3325. END # FLAG #
  3326.  
  3327. GOTO INITDRD1;
  3328. END # CONTINUE #
  3329.  
  3330. IF LLR$DRD[0] EQ 0
  3331. THEN # UPPER DRD BEING EMPTIED #
  3332. BEGIN # UPPER #
  3333. D0$FULL[LLR$SMO[0]] = FALSE; # PRESET #
  3334. END # UPPER #
  3335.  
  3336. ELSE # LOWER DRD BEING EMPTIED #
  3337. BEGIN # LOWER #
  3338. D1$FULL[LLR$SMO[0]] = FALSE; # PRESET #
  3339. END # LOWER #
  3340.  
  3341. SM$TOPDRD[LLR$SMO[0]] = LLR$DRD[0] EQ 0; # FORCE DRD CHOICE #
  3342. LLR$Y[0] = SC$LOWER$Y; # LOAD FROM LOWER SERVICE CELL #
  3343. LLR$Z[0] = SC$LOWER$Z;
  3344. LLR$LOWSC[0] = TRUE;
  3345. RETURN;
  3346.  
  3347. DRDACQC:
  3348. DRVRACTIVE = TRUE; # ACQUIRE ATTEMPTED #
  3349. IF LLR$DR[0] EQ RESPTYP4"OK4"
  3350. THEN # CARTRIDGE LOADED OK #
  3351. BEGIN # STORE #
  3352. LLR$Y[0] = LAB$Y[0];
  3353. LLR$Z[0] = LAB$Z[0];
  3354. RETURN;
  3355. END # STORE #
  3356.  
  3357. IF LLR$DR[0] EQ RESPTYP4"UNK$CART" ##
  3358. OR LLR$DR[0] EQ RESPTYP4"CART$LB$ERR" ##
  3359. OR LLR$DR[0] EQ RESPTYP4"M86$HDW$PR"
  3360. THEN # NO LABEL OR LABEL ERROR #
  3361. BEGIN # EJECT #
  3362. LLR$Y[0] = SM$EXIT$TY;
  3363. LLR$Z[0] = SM$TY$Z;
  3364. RETURN;
  3365. END # EJECT #
  3366.  
  3367. DRDSTRC:
  3368. DRVRACTIVE = TRUE; # STORE ATTEMPTED #
  3369. IF LLR$LOWSC[0] ##
  3370. AND NOT LLR$DRFUL[0] # NO ERROR ON DRD #
  3371. THEN # LOWER CELL JUST PROCESSED #
  3372. BEGIN # UPPER #
  3373. LLR$Y[0] = SC$UPPER$Y; # LOAD FROM UPPER SERVICE CELL #
  3374. LLR$Z[0] = SC$UPPER$Z;
  3375. SM$TOPDRD[LLR$SMO[0]] = LLR$DRD[0] EQ 0; # FORCE DRD CHOICE #
  3376. LLR$LOWSC[0] = FALSE;
  3377. LLR$UPSC[0] = TRUE;
  3378. RETURN;
  3379. END # UPPER #
  3380.  
  3381. LLR$SC[0] = 0;
  3382. SM$SCCU[LLR$SMO[0]] = FALSE; # BOTH SERVICE CELLS CHECKED #
  3383. LLR$RS[0] = PROCST"CONT1"; # RESET REQUEST STATE #
  3384.  
  3385. INITDRD1:
  3386. P<MBFHDR> = LOC(UD$MSG[LLR$CU[0]]) - 1; # RESET FROM SM ORDINAL #
  3387. IF MBF$SBADDR[0] NQ 0
  3388. THEN # STORAGE BUFFER HAS RESPONSE #
  3389. BEGIN # CLEAR #
  3390. P<UDT$MSG> = MBF$SBADDR[0];
  3391. ZFILL(UDT$MSG,MSGLT); # CLEAR STORAGE BUFFER #
  3392. END # CLEAR #
  3393.  
  3394. MBF$WORD[0] = 0;
  3395. RETURN;
  3396.  
  3397. INITDRD2:
  3398. MESSAGE(FEMSG,UDFL1);
  3399. ABORT;
  3400. END # INITDRD #
  3401.  
  3402. TERM
  3403. PROC INITSM;
  3404. # TITLE INITSM - INITIALIZE STORAGE MODULES AND CONTROLLER PATHS. #
  3405.  
  3406. BEGIN # INITSM #
  3407.  
  3408. #
  3409. ** INITSM - INITIALIZE STORAGE MODULES AND CONTROLLER PATHS.
  3410. *
  3411. * *INITSM* PROCESSES ALL STATUS CHANGE REQUESTS FOR M860 STORAGE
  3412. * MODULES AND CONTROLLER PATHS. THE UDT IS SCANNED FOR ANY
  3413. * SM-S/PATHS CHANGING STATUS, AND AN M860 MESSAGE IS SENT FOR EACH
  3414. * CHANGE FOUND. IF AN SM IS TO BE PUT ONLINE, THE PICKER IS TESTED
  3415. * BY LOADING AND STORING AN M860 CLEAR CARTRIDGE AT LOCATION
  3416. * Y=0,Z=0. IF NO M860 CLEAR CARTRIDGE IS FOUND THERE, THE ONE AT
  3417. * LOCATION Y=0,Z=15 IS USED. FINALLY,IF NOT INITIALIZING
  3418. * *SSEXEC*, THE SERVICE CELLS ARE CHECKED FOR CARTRIDGES. ANY THUS
  3419. * FOUND ARE EJECTED.
  3420. *
  3421. * PROC INITSM
  3422. *
  3423. * ENTRY P<LLRQ> = *DRQUEUE* ENTRY ADDRESS.
  3424. *
  3425. * EXIT THE *DRQUEUE* ENTRY REQUEST STATE FIELD HAS BEEN
  3426. * UPDATED TO INDICATE WHERE SUBSEQUENT PROCESSING OF
  3427. * THIS REQUEST IS TO CONTINUE.
  3428. *
  3429. * MESSAGES *EXEC ABNORMAL, INITSM1.* - UDT MESSAGE BUFFER STILL
  3430. * IN USE.
  3431. *
  3432. * NOTES THIS IS A PSEUDO-REENTRANT PROCEDURE.
  3433. #
  3434.  
  3435.  
  3436. #
  3437. **** PROC INITSM - XREF LIST BEGIN.
  3438. #
  3439.  
  3440. XREF
  3441. BEGIN
  3442. PROC ABORT; # ABORT #
  3443. PROC KREQ; # SEND K-DISPLAY REQUEST #
  3444. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  3445. PROC SENDMSG; # SEND M860 MESSAGE #
  3446. PROC ZFILL; # ZERO-FILL BUFFER #
  3447. END
  3448.  
  3449. #
  3450. **** PROC INITSM - XREF LIST END.
  3451. #
  3452.  
  3453. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  3454. *CALL,COMBFAS
  3455. *CALL,COMBCPR
  3456. *CALL,COMBFET
  3457. *CALL,COMBHFC
  3458. *CALL,COMBKDD
  3459. *CALL,COMBLRQ
  3460. *CALL,COMBUDT
  3461. *CALL,COMXCTF
  3462. *CALL,COMXMSC
  3463.  
  3464. ITEM I I; # INDEX #
  3465. ITEM PI U; # SM/PATH STATUS INDEX #
  3466.  
  3467. SWITCH SMLBL:PROCST # DRIVER REQUEST STATE #
  3468. SMINIT:INITIAL, # INITIAL STATE #
  3469. SMMSGE:CONT1, # CONTINUATION 1 #
  3470. SMACQC:CONT2, # CONTINUATION 2 #
  3471. SMSTRC:CONT3; # CONTINUATION 3 #
  3472. CONTROL EJECT;
  3473.  
  3474. GOTO SMLBL[LLR$RS[0]];
  3475.  
  3476. #
  3477. * INITIAL DRIVER REQUEST STATE.
  3478. #
  3479.  
  3480. SMINIT:
  3481. P<MBFHDR> = LOC(UD$MSG[LLR$CU[0]]) - 1;
  3482. IF MBF$ACTIVE[0]
  3483. THEN # MESSAGE BUFFER IN USE #
  3484. BEGIN # EXIT #
  3485. IF LLR$PRCNME[0] EQ REQTYP4"INITHW" ##
  3486. AND LLR$DRFUL[0]
  3487. THEN # RESET MSG BUF TO TURN OFF DRD #
  3488. BEGIN # ERROR #
  3489. GOTO SMSTRC;
  3490. END # ERROR #
  3491.  
  3492. RETURN; # ANOTHER LLRQ TURNING OFF DRD #
  3493. END # EXIT #
  3494.  
  3495. IF MBF$WORD[0] NQ 0
  3496. THEN # LAST MESSAGE NOT PROCESSED #
  3497. BEGIN # ABORT #
  3498. FE$RTN[0] = "INITSM1.";
  3499. MESSAGE(FEMSG,UDFL1);
  3500. ABORT;
  3501. END # ABORT #
  3502.  
  3503. P<UDT$MSG> = LOC(UD$MSG[LLR$CU[0]]);
  3504. MS$MSG[0] = HFC$CHSAIF; # SET *AIF* STATUS #
  3505. UD$SAVE[LLR$CU[0]] = SAVENONE;
  3506. LLR$RS[0] = PROCST"CONT1"; # SET NEW REQUEST STATE #
  3507.  
  3508. #
  3509. * ISSUE MESSAGES TO CHANGE PATH/SM STATUSES.
  3510. #
  3511.  
  3512. SMMSGE:
  3513. IF INITIALIZE ##
  3514. AND DRYUP
  3515. THEN # FORCE QUICK EXIT #
  3516. BEGIN # EXIT #
  3517. RETURN;
  3518. END # EXIT #
  3519.  
  3520. P<MBFHDR> = LOC(UD$MSG[LLR$CU[0]]) - 1;
  3521. IF P<LLRQ> NQ UD$LLRQA[LLR$CU[0]] # MSG BUF IN USE #
  3522. AND MBF$ACTIVE[0]
  3523. THEN # DRD TURNING OFF FROM ERROR #
  3524. BEGIN # RETRY #
  3525. LLR$RS[0] = PROCST"INITIAL"; # RESET MSG TYPE FROM DRD #
  3526. RETURN;
  3527. END # RETRY #
  3528.  
  3529. SENDMSG; # SEND M860 MESSAGE #
  3530. IF UD$MBACT[LLR$CU[0]]
  3531. THEN # MESSAGE WAS CREATED #
  3532. BEGIN # MSG COMPLETE #
  3533. IF UD$SBADDR[LLR$CU[0]] EQ 0 ##
  3534. AND LLR$DR[0] EQ RESPTYP4"OK4" # GOOD HARDWARE #
  3535. THEN # RESPONSE NOT YET RECEIVED #
  3536. BEGIN # TRY LATER #
  3537. RETURN;
  3538. END # TRY LATER #
  3539.  
  3540. IF MS$MSG[0] EQ HFC$CHSSMA
  3541. THEN # SM STATUS CHANGED #
  3542. BEGIN # CLEAR SM #
  3543. IF MS$PARM1A[0] NQ ONLINE
  3544. THEN # SM NOT RESERVED BY THIS MSG #
  3545. BEGIN # SKIP #
  3546. GOTO INITSM2;
  3547. END # SKIP #
  3548.  
  3549. SM$ACCBUSY[LLR$SMO[0]] = FALSE; # CLEAR RESERVATION #
  3550. IF LLR$DR[0] NQ RESPTYP4"M86$HDW$PR"
  3551. THEN # CHECK FOR SERV CELL CLEANUP #
  3552. BEGIN # NOT BUSY #
  3553. IF NOT INITIALIZE
  3554. THEN # SERVICE CELLS MAY BE FULL #
  3555. BEGIN # SRV CELL #
  3556. LLR$Y[0] = SC$LOWER$Y; # LOAD FROM LOWER SERVICE CELL #
  3557. LLR$Z[0] = SC$LOWER$Z;
  3558. LLR$LOWSC[0] = TRUE;
  3559. RETURN;
  3560.  
  3561. SMACQC:
  3562. DRVRACTIVE = TRUE; # ACQUIRE ATTEMPTED #
  3563. IF LLR$DR[0] NQ RESPTYP4"CELL$EMP" ##
  3564. AND LLR$DR[0] NQ RESPTYP4"SMA$OFF" ##
  3565. AND LLR$DR[0] NQ RESPTYP4"M86$HDW$PR"
  3566. THEN # EJECT - FULL CELL TURNS SM OFF #
  3567. BEGIN # EJECT #
  3568. LLR$Y[0] = SM$EXIT$TY;
  3569. LLR$Z[0] = SM$TY$Z;
  3570. RETURN;
  3571. END # EJECT #
  3572.  
  3573. SMSTRC:
  3574. DRVRACTIVE = TRUE; # STORE ATTEMPTED #
  3575. IF LLR$LOWSC[0] ##
  3576. AND NOT LLR$DRFUL[0] # NO ERROR ON DRD #
  3577. THEN # LOWER CELL JUST PROCESSED #
  3578. BEGIN # UPPER #
  3579. LLR$Y[0] = SC$UPPER$Y; # LOAD FROM UPPER SERVICE CELL #
  3580. LLR$Z[0] = SC$UPPER$Z;
  3581. LLR$LOWSC[0] = FALSE;
  3582. LLR$UPSC[0] = TRUE;
  3583. RETURN;
  3584. END # UPPER #
  3585.  
  3586. LLR$DR[0] = RESPTYP4"OK4"; # IF LAST STORE HAD ERROR #
  3587. LLR$SC[0] = 0;
  3588. END # SRV CELL #
  3589.  
  3590. END # NOT BUSY #
  3591.  
  3592. SM$SCCU[LLR$SMO[0]] = FALSE; # BOTH SRV CELLS CHECKED #
  3593.  
  3594. INITSM2:
  3595. SMST = SMST1; # ASSUME 2ND CU #
  3596. IF LLR$CU[0] EQ SM$CUO0[LLR$SMO[0]]
  3597. THEN # 1ST CU CHANGED SM #
  3598. BEGIN # RESET #
  3599. SMST = SMST0;
  3600. END # RESET #
  3601.  
  3602. P<PTHSTAT> = LOC(SM$STS[LLR$SMO[0]]);
  3603. PI = SMST;
  3604. GOTO INITSM1;
  3605. END # CLEAR SM #
  3606.  
  3607. P<PTHSTAT> = P<UDT$CN> + ((LLR$CU[0]-1) * UDTCNTL)
  3608. + LLR$ACKLN[0];
  3609. PI = LLR$ACKIN[0];
  3610. GOTO INITSM1;
  3611. END # MSG COMPLETE #
  3612.  
  3613. IF UD$DRDWAIT[LLR$CU[0]] ##
  3614. AND MS$MSG[0] EQ HFC$CHSSMA # STOPS HANG ON AIF-S #
  3615. THEN # WAIT FOR SM TO EMPTY #
  3616. BEGIN # WAIT #
  3617. LLR$RS[0] = PROCST"INITIAL"; # IN CASE RESERVED BY NEXT PASS #
  3618. RETURN;
  3619. END # WAIT #
  3620.  
  3621. #
  3622. * ADVANCE TO THE NEXT PATH IN THE M860 INITIALIZING SEQUENCE.
  3623. #
  3624.  
  3625. IF MS$MSG[0] EQ HFC$CHSDRC
  3626. THEN # *DRC* STATUSES CHANGED #
  3627. BEGIN # EXIT #
  3628. LLR$RS[0] = PROCST"COMPLETE";
  3629. RETURN;
  3630. END # EXIT #
  3631.  
  3632. IF MS$MSG[0] EQ HFC$CHSCIF
  3633. THEN # *CIF* STATUSES CHANGED #
  3634. BEGIN # DRC #
  3635. MS$MSG[0] = HFC$CHSDRC; # NEXT FUNCTION #
  3636. END # DRC #
  3637.  
  3638. IF MS$MSG[0] EQ HFC$CHSDIO
  3639. THEN # *DTI/DTO* STATUSES CHANGED #
  3640. BEGIN # CIF #
  3641. MS$MSG[0] = HFC$CHSCIF; # NEXT FUNCTION #
  3642. END # CIF #
  3643.  
  3644. IF MS$MSG[0] EQ HFC$CHSDIF
  3645. THEN # *DIF* STATUSES CHANGED #
  3646. BEGIN # DIO #
  3647. MS$MSG[0] = HFC$CHSDIO; # NEXT FUNCTION #
  3648. END # DIO #
  3649.  
  3650. IF MS$MSG[0] EQ HFC$CHSSMA
  3651. THEN # SM STATUSES CHANGED #
  3652. BEGIN # DIF #
  3653. MS$MSG[0] = HFC$CHSDIF; # NEXT FUNCTION #
  3654. END # DIF #
  3655.  
  3656. IF MS$MSG[0] EQ HFC$CHSAIF
  3657. THEN # *AIF* STATUSES CHANGED #
  3658. BEGIN # SM #
  3659. MS$MSG[0] = HFC$CHSSMA; # NEXT FUNCTION #
  3660. END # SM #
  3661.  
  3662. RETURN;
  3663.  
  3664. #
  3665. * PRESET MESSAGE BUFFER BEFORE CHANGING STATUSES.
  3666. #
  3667.  
  3668. INITSM1:
  3669. P<MBFHDR> = LOC(UD$MSG[LLR$CU[0]]) - 1; # RESET FROM SM ORD #
  3670. P<UDT$MSG> = P<MBFHDR> + 1;
  3671. IF MS$MSG[0] EQ HFC$CHSDRD
  3672. THEN # BAD DRD WHILE SM TURNED ON #
  3673. BEGIN # RESET #
  3674. MS$MSG[0] = HFC$CHSSMA; # GO BACK TO CHECKING SM-S #
  3675. END # RESET #
  3676.  
  3677. IF LLR$DR[0] EQ RESPTYP4"M86$HDW$PR"
  3678. THEN # RECOVER SM/PATH STATUS #
  3679. BEGIN # RECOVER #
  3680. DRVRACTIVE = TRUE; # FORCE NEXT NORMAL UDT PASS #
  3681. IF (PATHBIT(PI,PATH$DF"U$ON") EQ ON ##
  3682. OR PATHBIT(PI,PATH$DF"U$RQ$DIAG") EQ ON) # SM-S ONLY #
  3683. AND MBF$SENT[0] # SM/PATH REALLY OFF IN HARDWARE #
  3684. THEN # INFORM OPER OF SM/PATH PROBLEM #
  3685. BEGIN # K #
  3686. P<KWORD> = LOC(LLR$KWORDS[0]);
  3687. KW$WORD[0] = 0;
  3688. KW$LINE1[0] = KM"KM2"; # ASSUME SM PROBLEM #
  3689. KW$LINE2[0] = KM"KM16";
  3690. IF MS$MSG[0] NQ HFC$CHSSMA
  3691. THEN # PROBLEM IS IN VARYING PATH ON #
  3692. BEGIN # RESET #
  3693. KW$LINE1[0] = KM"KM1";
  3694. KW$LINE2[0] = KM"KM10";
  3695. END # RESET #
  3696.  
  3697. KP$EQ = UD$ESTO[LLR$CU[0]]; # SET MESSAGE PARAMETERS #
  3698. P<MWBTMP> = LOC(UD$CAMF[LLR$CU[0]]);
  3699. P<FETMWB> = MWB$ADDR[LLR$CIF[0]];
  3700. P<FETMRA> = P<FETMWB> - 1;
  3701. P<FETMRB> = FRA$MRBADR[0];
  3702. KP$CN = FMR$CHAN[0];
  3703. KP$DT = SM$ID[LLR$SMO[0]];
  3704. KW$IC[0] = TRUE; # SET IMMEDIATE COMPLETION #
  3705. KW$DF[0] = TRUE; # SEND TO JOB DAYFILE #
  3706. KW$RPGO[0] = TRUE; # ALLOW GO RESPONSE #
  3707. KREQ(LOC(KWORD),KLINK); # SEND K-DISPLAY REQUEST #
  3708. END # K #
  3709.  
  3710. IF PATHBIT(PI,PATH$DF"U$ON") EQ OFF ##
  3711. AND PATHBIT(PI,PATH$DF"U$RQ$DIAG") EQ OFF ##
  3712. AND NOT MBF$SENT[0]
  3713. THEN # STATUS UNCHANGED #
  3714. BEGIN # SAME #
  3715. PATHBIT(PI,PATH$DF"U$ON") = PATHBIT(PI,PATH$DF"U$CU$ACK");
  3716. PATHBIT(PI,PATH$DF"U$RQ$DIAG") =
  3717. PATHBIT(PI,PATH$DF"U$DIAG$ACK");
  3718. END # SAME #
  3719.  
  3720. ELSE # SM/PATH ASSUMED OFF IN M860 #
  3721. BEGIN # OFF #
  3722. PATHBIT(PI,PATH$DF"U$ON") = OFF;
  3723. PATHBIT(PI,PATH$DF"U$RQ$DIAG") = OFF;
  3724. END # OFF #
  3725.  
  3726. END # RECOVER #
  3727.  
  3728. PATHBIT(PI,PATH$DF"U$CU$ACK") = OFF;
  3729. PATHBIT(PI,PATH$DF"U$DIAG$ACK") = OFF;
  3730. IF MBF$SBADDR[0] NQ 0
  3731. THEN # STORAGE BUFFER HAS RESPONSE #
  3732. BEGIN # CLEAR #
  3733. P<UDT$MSG> = MBF$SBADDR[0];
  3734. ZFILL(UDT$MSG,MSGLT); # CLEAR STORAGE BUFFER #
  3735. END # CLEAR #
  3736.  
  3737. MBF$WORD[0] = 0;
  3738. LLR$RS[0] = PROCST"CONT1";
  3739. RETURN;
  3740. END # INITSM #
  3741.  
  3742. TERM
  3743. PROC PPDONE((CBORD));
  3744. # TITLE PPDONE - PROCESSED COMPLETED PP CALLS. #
  3745.  
  3746. BEGIN # PPDONE #
  3747.  
  3748. #
  3749. ** PPDONE - PROCESS COMPLETED PP CALLS.
  3750. *
  3751. * *PPDONE* PROCESSES A PP CALL BLOCK ENTRY WHEN ITS
  3752. * ASSOCIATED PP HAS COMPLETED.
  3753. *
  3754. * PROC PPDONE((CBORD))
  3755. *
  3756. * ENTRY (CBORD) = PP CALL BLOCK ENTRY OF COMPLETED PP.
  3757. *
  3758. * EXIT IF ANY INCOMPLETE MESSAGE OR DATA TRANSFERS EXIST ON
  3759. * THE CHANNEL, *1SS* IS RECALLED ON IT. OTHERWISE, THE
  3760. * ENTRY IS PRESET, AND THE ACTIVE CALL BLOCK ENTRY COUNT
  3761. * IS DECREMENTED.
  3762. *
  3763. * MESSAGES *EXEC ABNORMAL, PPDONE2.* - ERROR IN CALL BLOCK ENTRY
  3764. * FIELDS NOT CLEARED WHEN
  3765. * PRESETTING. ALSO OCCURS
  3766. * WHEN ACTIVE CALL BLOCK
  3767. * ENTRY COUNT NOT GREATER
  3768. * THAN ZERO.
  3769. *
  3770. * *EXEC ABNORMAL, PPDONE3.* - ERROR IN CALL BLOCK ENTRY
  3771. * ADDRESSES CLEARED WHEN
  3772. * PRESETTING.
  3773. #
  3774.  
  3775.  
  3776. #
  3777. **** PROC PPDONE - XREF LIST BEGIN.
  3778. #
  3779.  
  3780. XREF
  3781. BEGIN
  3782. PROC ABORT; # ABORT #
  3783. PROC FSCLOG; # DUMP FSC LOG TO BML #
  3784. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  3785. PROC PROCMRB; # PROCESS MSG READ BUFFERS #
  3786. PROC SYSTEM; # CALL PP #
  3787. END
  3788.  
  3789. #
  3790. **** PROC PPDONE - XREF LIST END.
  3791. #
  3792.  
  3793. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  3794. *CALL,COMBFAS
  3795. *CALL,COMBCDD
  3796. *CALL,COMBFET
  3797. *CALL,COMBUDT
  3798. *CALL,COMXCTF
  3799. *CALL,COMXMSC
  3800.  
  3801. ITEM CBORD U; # PP CALL BLOCK ENTRY ORDINAL #
  3802. ITEM MRBSTAT B; # SET IF MSG MOVED FROM READ BUF #
  3803. CONTROL EJECT;
  3804.  
  3805. IF PPU$PADDR[CBORD] EQ 0 ##
  3806. OR PPCBENCNT LQ 0 ##
  3807. OR PPU$ACTIVE[CBORD]
  3808. THEN # CALL BLOCK ENTRY ERRORS #
  3809. BEGIN # ABORT #
  3810. FE$RTN[0] = "PPDONE2.";
  3811. GOTO PPDONE1;
  3812. END # ABORT #
  3813.  
  3814. IF PPU$MBADDR[CBORD] NQ 0
  3815. THEN # PP TRANSFER COMPLETE #
  3816. BEGIN # DONE #
  3817. P<FETMWB> = PPU$MBADDR[CBORD]; # GET WRITE BUF ADDRESS #
  3818. P<FETMRA> = P<FETMWB> - 1;
  3819. P<FETMRB> = FRA$MRBADR[0]; # GET READ BUF ADDRESS #
  3820. IF PPU$ESTORD[CBORD] EQ 0 ##
  3821. OR PPU$CNTORD[CBORD] EQ 0 ##
  3822. OR B<FMR$CIF[0],1>UD$WBACT[FMR$CU[0]] EQ 0 ##
  3823. OR (PPU$DBADDR[CBORD] NQ 0 ##
  3824. AND B<FMR$CIF[0],1>UD$DBACT[FMR$CU[0]] EQ 0)
  3825. THEN # ERRORS IN PRESETTING #
  3826. BEGIN # ABORT #
  3827. FE$RTN[0] = "PPDONE3.";
  3828. GOTO PPDONE1;
  3829. END # ABORT #
  3830.  
  3831. IF FMW$AT[0] NQ 0
  3832. THEN # PP ERROR FOUND #
  3833. BEGIN # FSC #
  3834. FSCLOG(WFET); # DUMP FSC LOG TO BML #
  3835. IF PPU$ACTIVE[CBORD]
  3836. THEN # ERROR CAUSED PP TO DOWN CHANNEL #
  3837. BEGIN # EXIT #
  3838. RETURN; # DO NOT PROCESS ACTIVE PP #
  3839. END # EXIT #
  3840.  
  3841. END # FSC #
  3842.  
  3843. DRVRACTIVE = TRUE; # DRIVER HAS WORK TO DO #
  3844. MRBSTAT = TRUE;
  3845. REPEAT WHILE MRBSTAT
  3846. DO # REMOVE MSGS FROM READ BUFFER #
  3847. BEGIN # REMOVE MSGS #
  3848. PROCMRB(MRBSTAT); # PROCESS READ BUFFER #
  3849. END # REMOVE MSGS #
  3850.  
  3851. P<FETFHB> = PPU$DBADDR[CBORD]; # IN CASE DATA TRANSFER #
  3852. IF PPU$DBADDR[CBORD] NQ 0 ##
  3853. AND (FHB$CODE[0] NQ FCRUN # STILL TRANSFERRING DATA #
  3854. OR NOT FHB$LOCK[0]) # FUNCTION NOT ANSWERED #
  3855. THEN # DATA TRANSFER INCOMPLETE #
  3856. BEGIN # RECALL PP #
  3857. PPU$FC[CBORD] = IRMDAT; # IN CASE OF CHANNEL FUNCTION #
  3858. GOTO PPDONE2;
  3859. END # RECALL PP #
  3860.  
  3861. IF PPU$DBADDR[CBORD] NQ 0 # NOT MOUNT-VOLUME MESSAGE #
  3862. THEN # DATA TRANSFER COMPLETE #
  3863. BEGIN # OFF #
  3864. PPU$DBADDR[CBORD] = 0;
  3865. B<FMR$CIF[0],1>UD$DBACT[FMR$CU[0]] = OFF;
  3866. END # OFF #
  3867.  
  3868. IF FMW$IN[0] NQ FMW$OUT[0] # WRITE BUFFER NOT EMPTY #
  3869. OR MSGCNT(FMR$CIF[0],FMR$CU[0]) NQ 0 # MSGS EXPECTED #
  3870. THEN # MESSAGE TRANSFER INCOMPLETE #
  3871. BEGIN # RECALL PP #
  3872. PPU$FC[CBORD] = IRPMSG; # IN CASE OF DATA/CHN FUNCTION #
  3873. GOTO PPDONE2; # ISSUE PP RECALL #
  3874. END # RECALL PP #
  3875.  
  3876. B<FMR$CIF[0],1>UD$WBACT[FMR$CU[0]] = OFF;
  3877. # CLEAR WRITE BUFFER ACTIVE FLAG #
  3878. END # DONE #
  3879.  
  3880. PPU$W0INFO[CBORD] = 0; # PRESET FOR NEXT PP CALL #
  3881. PPU$WORD1[CBORD] = 0;
  3882. PPU$DRCL[CBORD] = LOC(DRVRRECALL); # RESET RECALL ADDRESS #
  3883. PPCBENCNT = PPCBENCNT - 1; # MARK ENTRY AS REMOVED #
  3884. RETURN;
  3885.  
  3886. PPDONE1:
  3887. MESSAGE(FEMSG,UDFL1); # ABORT PROCESSING #
  3888. ABORT;
  3889.  
  3890. PPDONE2:
  3891. PPU$CHAN[CBORD] = 0;
  3892. PPU$ACTIVE[CBORD] = TRUE; # SET PP ACTIVE #
  3893. PPT$WORD0[0] = PPU$WORD0[CBORD];
  3894. SPC$ADDR[0] = LOC(PPT$WORD0[0]);
  3895. REPEAT WHILE PPT$WORD0[0] NQ 0
  3896. DO # ISSUE PP CALL #
  3897. BEGIN # PP #
  3898. SYSTEM(SPC,NRCL);
  3899. END # PP #
  3900.  
  3901. RETURN;
  3902. END # PPDONE #
  3903.  
  3904. TERM
  3905. PROC PROCDRQ;
  3906. # TITLE PROCDRQ - PROCESS DRIVER REQUESTS. #
  3907.  
  3908. BEGIN # PROCDRQ #
  3909.  
  3910. #
  3911. ** PROCDRQ - PROCESS DRIVER REQUESTS.
  3912. *
  3913. * *PROCDRQ* PROCESSES A *DRQUEUE* REQUEST. IT ROUTES IT
  3914. * TO THE APPROPRIATE REQUEST PROCEDURE BASED ON THE
  3915. * *DRQUEUE* ENTRY REQUEST CODE.
  3916. *
  3917. * PROC PROCDRQ
  3918. *
  3919. * ENTRY P<LLRQ> = *DRQUEUE* ENTRY ADDRESS.
  3920. *
  3921. * EXIT THE *DRQUEUE* ENTRY REQUEST STATE FIELD HAS BEEN
  3922. * UPDATED TO INDICATE WHERE SUBSEQUENT PROCESSING OF
  3923. * THIS REQUEST IS TO CONTINUE.
  3924. #
  3925.  
  3926.  
  3927. #
  3928. **** PROC PROCDRQ - XREF LIST BEGIN.
  3929. #
  3930.  
  3931. XREF
  3932. BEGIN
  3933. PROC ACQCART; # LOAD CARTRIDGE #
  3934. PROC GENREQ; # GENERAL DRIVER REQUESTS #
  3935. PROC INITDRD; # INITIALIZE DRD-S #
  3936. PROC INITSM; # INITIALIZE SM-S #
  3937. PROC RESTCU; # RESTART CONTROLLER #
  3938. PROC STRCART; # STORE CARTRIDGE #
  3939. PROC XFRDATA; # TRANSFER DATA TO/FROM M860 #
  3940. END
  3941.  
  3942. #
  3943. **** PROC PROCDRQ - XREF LIST END.
  3944. #
  3945.  
  3946. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  3947. *CALL,COMBFAS
  3948. *CALL,COMBCDD
  3949. *CALL COMBCPR
  3950. *CALL,COMBLRQ
  3951. *CALL,COMBRCD
  3952. *CALL,COMBUDT
  3953. *CALL,COMXMSC
  3954.  
  3955. SWITCH DRQCODE:REQCODE # DRIVER REQUEST CODES #
  3956. DRQINDR:SINIT$DRD, # INITIALIZE DRD-S #
  3957. DRQINSM:SINIT$SM, # INITIALIZE SM-S AND PATHS #
  3958. DRQSTRC:SDISMOUNT, # STORE CARTRIDGE #
  3959. DRQACQC:SMOUNT, # LOAD CARTRIDGE #
  3960. DRQRDRW:SRDRAW$STP, # READ RAW DATA #
  3961. DRQXFRD:SREAD$VOL, # TRANSFER DATA #
  3962. DRQRSCU:SRESTART$CU, # RESTART CONTROLLER #
  3963. DRQWRCL:SWRT$LABEL, # WRITE CARTRIDGE LABEL #
  3964. DRQWRVL:SWRT$VOL; # WRITE VOLUME LABEL #
  3965. CONTROL EJECT;
  3966.  
  3967. GOTO DRQCODE[LLR$RC[0]];
  3968.  
  3969. #
  3970. * LOAD CARTRIDGE.
  3971. #
  3972.  
  3973. DRQACQC:
  3974. ACQCART;
  3975. IF LLR$RS[0] EQ PROCST"COMPLETE" ##
  3976. AND LLR$PRCNME[0] EQ REQTYP4"INITHW"
  3977. THEN # LOAD FROM SERVICE CELL #
  3978. BEGIN # CELL #
  3979. LLR$RC[0] = LLR$SRC[0]; # INITDRD OR INITSM #
  3980. LLR$RS[0] = PROCST"CONT2";
  3981. END # CELL #
  3982.  
  3983. IF (LLR$Y[0] EQ SM$EXIT$TY # EJECT CARTRIDGE #
  3984. AND LLR$Z[0] EQ SM$TY$Z) ##
  3985. OR LLR$LDERR[0] # DDE ON LOAD #
  3986. THEN # PROCESS PROBLEM #
  3987. BEGIN # EJECT #
  3988. LLR$RC[0] = DISMOUNT;
  3989. LLR$RS[0] = PROCST"INITIAL";
  3990. END # EJECT #
  3991.  
  3992. RETURN;
  3993.  
  3994. #
  3995. * INITIALIZE DRD-S.
  3996. #
  3997.  
  3998. DRQINDR:
  3999. INITDRD;
  4000. IF LLR$DRDOFF[0] # DRD OFF DUE TO ERROR #
  4001. AND (LLR$RS[0] EQ PROCST"COMPLETE" # NORMAL REQUEST DONE #
  4002. OR LLR$PRCNME[0] EQ REQTYP4"INITHW") # INIT REQUEST NOT DONE #
  4003. THEN # SEND K-DISPLAY MSG #
  4004. BEGIN # K #
  4005. LLR$RC[0] = DISMOUNT;
  4006. LLR$RS[0] = PROCST"CONT3";
  4007. END # K #
  4008.  
  4009. IF LLR$SC[0] NQ 0 ##
  4010. AND NOT LLR$DRFUL[0] # NOT IF TURNING OFF DRD #
  4011. THEN # PROCESSING SERVICE CELL #
  4012. BEGIN # CELL #
  4013. GOTO PROCDRQ1;
  4014. END # CELL #
  4015.  
  4016. RETURN;
  4017.  
  4018. #
  4019. * INITIALIZE SM-S AND ALL CONTROLLER PATHS.
  4020. #
  4021.  
  4022. DRQINSM:
  4023. INITSM;
  4024. IF LLR$RS[0] EQ PROCST"COMPLETE" ##
  4025. AND LLR$DR[0] EQ RESPTYP4"OK4"
  4026. THEN # COMPLETED REQUEST #
  4027. BEGIN # COMPLETE #
  4028. LLR$RC[0] = INIT$DRD; # PROCESS DRD-S #
  4029. LLR$RS[0] = PROCST"INITIAL";
  4030. END # COMPLETE #
  4031.  
  4032. IF LLR$SC[0] NQ 0
  4033. THEN # PROCESSING SERVICE CELLS #
  4034. BEGIN # CELL #
  4035. GOTO PROCDRQ1;
  4036. END # CELL #
  4037.  
  4038. RETURN;
  4039.  
  4040. #
  4041. * READ RAW DATA.
  4042. #
  4043.  
  4044. DRQRDRW:
  4045. GENREQ;
  4046. RETURN;
  4047.  
  4048. #
  4049. * RESTART CONTROLLER.
  4050. #
  4051.  
  4052. DRQRSCU:
  4053. RESTCU;
  4054. IF LLR$RS[0] EQ PROCST"COMPLETE" ##
  4055. AND LLR$DR[0] EQ RESPTYP4"OK4"
  4056. THEN # COMPLETED REQUEST #
  4057. BEGIN # COMPLETE #
  4058. LLR$RC[0] = INIT$SM; # PROCESS SM-S AND CU PATHS #
  4059. LLR$RS[0] = PROCST"INITIAL";
  4060. END # COMPLETE #
  4061.  
  4062. RETURN;
  4063.  
  4064. #
  4065. * STORE CARTRIDGE.
  4066. #
  4067.  
  4068. DRQSTRC:
  4069. STRCART;
  4070. IF LLR$RS[0] EQ PROCST"CONT3"
  4071. THEN # TURN DRD OFF #
  4072. BEGIN # OFF #
  4073. LLR$RC[0] = INIT$DRD;
  4074. LLR$RS[0] = PROCST"INITIAL";
  4075. END # OFF #
  4076.  
  4077. IF LLR$RS[0] EQ PROCST"COMPLETE" ##
  4078. AND LLR$PRCNME[0] EQ REQTYP4"INITHW"
  4079. THEN # SM/DRD INITIALIZING #
  4080. BEGIN # INIT #
  4081. LLR$RC[0] = LLR$SRC[0]; # INITDRD OR INITSM #
  4082. LLR$RS[0] = PROCST"CONT3";
  4083. END # INIT #
  4084.  
  4085. RETURN;
  4086.  
  4087. #
  4088. * WRITE CARTRIDGE LABEL.
  4089. #
  4090.  
  4091. DRQWRCL:
  4092. GENREQ;
  4093. IF LLR$RS[0] EQ PROCST"COMPLETE" ##
  4094. AND LLR$DR[0] EQ RESPTYP4"OK4"
  4095. THEN # COMPLETED REQUEST #
  4096. BEGIN # COMPLETE #
  4097. LLR$RC[0] = DISMOUNT; # STORE CARTRIDGE #
  4098. LLR$RS[0] = PROCST"INITIAL";
  4099. END # COMPLETE #
  4100.  
  4101. RETURN;
  4102.  
  4103. #
  4104. * WRITE VOLUME LABEL.
  4105. #
  4106.  
  4107. DRQWRVL:
  4108. GENREQ;
  4109. IF LLR$RS[0] EQ PROCST"COMPLETE" ##
  4110. AND LLR$DR[0] EQ RESPTYP4"OK4"
  4111. THEN # COMPLETED REQUEST #
  4112. BEGIN # COMPLETE #
  4113. LLR$RC[0] = READ$VOL; # MOUNT VOLUME #
  4114. LLR$RS[0] = PROCST"INITIAL";
  4115. END # COMPLETE #
  4116.  
  4117. RETURN;
  4118.  
  4119. #
  4120. * TRANSFER DATA TO/FROM M860.
  4121. #
  4122.  
  4123. DRQXFRD:
  4124. XFRDATA;
  4125. RETURN;
  4126.  
  4127. PROCDRQ1:
  4128. LLR$SRC[0] = LLR$RC[0]; # SAVE IN CASE OF DRD ERROR #
  4129. LLR$RC[0] = DISMOUNT; # ASSUME STORE #
  4130. LLR$RS[0] = PROCST"INITIAL";
  4131. IF (LLR$Y[0] EQ SC$LOWER$Y ##
  4132. AND LLR$Z[0] EQ SC$LOWER$Z) ##
  4133. OR (LLR$Y[0] EQ SC$UPPER$Y ##
  4134. AND LLR$Z[0] EQ SC$UPPER$Z)
  4135. THEN # LOADING CARTRIDGE #
  4136. BEGIN # RESET #
  4137. LLR$RC[0] = MOUNT;
  4138. END # RESET #
  4139.  
  4140. RETURN;
  4141. END # PROCDRQ #
  4142.  
  4143. TERM
  4144. PROC PROCMRB(MSTAT);
  4145. # TITLE PROCMRB - PROCESS MESSAGE READ BUFFERS. #
  4146.  
  4147. BEGIN # PROCMRB #
  4148.  
  4149. #
  4150. ** PROCMRB - PROCESS MESSAGE READ BUFFERS.
  4151. *
  4152. * *PROCMRB* PROCESSES ALL INCOMING M860 RESPONSES FOUND WITHIN THE
  4153. * MESSAGE READ FET BUFFERS.
  4154. *
  4155. * PROC PROCMRB(MSTAT)
  4156. *
  4157. * ENTRY (MSTAT) = NONZERO, IF AN M860 MESSAGE WAS REMOVED FROM
  4158. * THE READ BUFFER.
  4159. *
  4160. * THE MESSAGE FET BASED ARRAYS POINT TO THE FETS
  4161. * ASSOCIATED WITH THE DESIRED CHANNEL.
  4162. *
  4163. * EXIT THE M860 RESPONSE IS TRANSFERRED OUT OF THE MESSAGE
  4164. * READ BUFFER AND INTO A STORAGE BUFFER TABLE ENTRY. IF
  4165. * THE RESPONSE WAS INITIATED BY THE CPU DRIVER, THE
  4166. * CHANNEL MESSAGE COUNT IS DECREMENTED.
  4167. *
  4168. * MESSAGES *EXEC ABNORMAL, PROCMRB2.* - ERROR LOG COUNT IS ZERO
  4169. * WITH AN ERROR LOG IN THE
  4170. * SBT.
  4171. *
  4172. * *EXEC ABNORMAL, PROCMRB3.* - NO RAW DATA ADDRESS FOUND
  4173. * FOR AN M860 *READ RAW
  4174. * DATA* RESPONSE.
  4175. *
  4176. * *EXEC ABNORMAL, PROCMRB4.* - M860 RESPONSE FOUND
  4177. * CSN/DRD IN USE.
  4178. *
  4179. * *EXEC ABNORMAL, PROCMRB7.* - ERROR IN READING
  4180. * CARTRIDGE LABEL.
  4181. *
  4182. * *EXEC ABNORMAL, PROCMRB8.* - ERROR WHEN FLUSHING DATA
  4183. * FROM THE MESSAGE READ
  4184. * BUFFER.
  4185. #
  4186.  
  4187.  
  4188. #
  4189. **** PROC PROCMRB - XREF LIST BEGIN.
  4190. #
  4191.  
  4192. XREF
  4193. BEGIN
  4194. PROC ABORT; # ABORT #
  4195. PROC BMLOG; # SEND LOG TO BML #
  4196. PROC CALLPP; # PASS MESSAGES TO PP #
  4197. PROC DOWNCU; # DOWN BAD CONTROLLER #
  4198. PROC FSCLOG; # DUMP FSC LOG TO BML #
  4199. PROC GDATA; # GET DATA FROM READ BUFFER #
  4200. PROC GMSG; # CHECKSUM MSG FROM READ BUFFER #
  4201. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  4202. PROC ZFILL; # ZERO-FILL BUFFER #
  4203. END
  4204.  
  4205. #
  4206. **** PROC PROCMRB - XREF LIST END.
  4207. #
  4208.  
  4209. DEF DBLEN #10#; # BAD-DATA BUFFER LENGTH #
  4210. DEF ERRLOGLEN #18#; # ERROR LOG LENGTH #
  4211.  
  4212. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  4213. *CALL,COMBFAS
  4214. *CALL,COMBCDD
  4215. *CALL,COMBFET
  4216. *CALL,COMBCPR
  4217. *CALL,COMBHFC
  4218. *CALL,COMBLBL
  4219. *CALL,COMBKDD
  4220. *CALL,COMBLRQ
  4221. *CALL,COMBMAT
  4222. *CALL,COMBUDT
  4223. *CALL,COMXCTF
  4224. *CALL,COMXMSC
  4225.  
  4226. ITEM ASSOCDATA U; # ASSOCIATED DATA LENGTH #
  4227. ITEM DATASIZE U; # SIZE OF BAD DATA MOVED #
  4228. ITEM I I; # INDEX #
  4229. ITEM MSTAT B; # SET IF MSG REMOVED #
  4230. ITEM STAT U; # MSG/DATA TRANSFER STATUS #
  4231.  
  4232. #
  4233. * ARRAY TO READ DATA FROM ABORTED MESSAGE INTO.
  4234. #
  4235.  
  4236. ARRAY DBUF [0:0] S(DBLEN); ; # BAD-DATA ARRAY #
  4237. CONTROL EJECT;
  4238.  
  4239. MSTAT = FALSE; # NO MESSAGE REMOVED #
  4240. P<KWORD> = LOC(FMR$KWORDS[0]);
  4241. IF NOT KW$COMP[0]
  4242. THEN # K-DISPLAY REQUEST INCOMPLETE #
  4243. BEGIN # WAIT #
  4244. DRVRRECALL = TRUE; # INSURE K-DISPLAY MSG SENT #
  4245. RETURN;
  4246. END # WAIT #
  4247.  
  4248. IF FMR$AT[0] NQ 0
  4249. THEN # PP ERROR CODE FOUND #
  4250. BEGIN # FSC #
  4251. FSCLOG(RFET); # DUMP FSC LOG TO BML #
  4252. END # FSC #
  4253.  
  4254. IF FMR$ELCNT[0] NQ 0
  4255. THEN # ERROR LOG RESPONSES NOT SENT #
  4256. BEGIN # ERROR LOG #
  4257. SLOWFOR I = 0 STEP 1 WHILE I LS MAT$COUNT[MAT$ENTRY"SBT"]
  4258. DO # SEARCH FOR ERROR LOG RESPONSE #
  4259. BEGIN # SEARCH #
  4260. P<UDT$MSG> = MAT$FWA[MAT$ENTRY"SBT"] + (I * MSGLT);
  4261. IF MS$CU[0] NQ FMR$CU[0] # NOT RIGHT CU #
  4262. OR UD$MASC[FMR$CU[0]] NQ FMR$CHAN[0] # NOT MASTER CHAN #
  4263. THEN # NOT ERROR LOG FROM THIS CU #
  4264. BEGIN # NEXT #
  4265. TEST I;
  4266. END # NEXT #
  4267.  
  4268. IF UD$CUON[FMR$CU[0]]
  4269. THEN # HARDWARE AVAILABLE #
  4270. BEGIN # SEND #
  4271. CALLPP(IRPMSG); # SEND RESPONSE TO CU #
  4272. IF MS$CU[0] NQ 0 ##
  4273. AND LLR$DR[0] NQ RESPTYP4"M86$HDW$PR"
  4274. THEN # RESPONSE NOT SENT #
  4275. BEGIN # NEXT #
  4276. TEST I;
  4277. END # NEXT #
  4278.  
  4279. END # SEND #
  4280.  
  4281. IF FMR$ELCNT[0] EQ 0
  4282. THEN # LOG COUNT TOO LOW #
  4283. BEGIN # ABORT #
  4284. FE$RTN[0] = "PROCMRB2.";
  4285. GOTO PROCMRB1;
  4286. END # ABORT #
  4287.  
  4288. FMR$ELCNT[0] = FMR$ELCNT[0] - 1; # MARK RESPONSE AS SENT #
  4289. ZFILL(UDT$MSG,MSGLT); # CLEAR SBT ENTRY #
  4290. END # SEARCH #
  4291.  
  4292. END # ERROR LOG #
  4293.  
  4294. IF FMR$IN[0] EQ FMR$OUT[0]
  4295. THEN # EMPTY READ BUFFER #
  4296. BEGIN # EXIT #
  4297. RETURN;
  4298. END # EXIT #
  4299.  
  4300. P<UDT$MSG> = FMR$OUT[0];
  4301. IF MS$MSG[0] EQ HFC$RDRAW ##
  4302. AND FMR$RDBA[0] EQ 0
  4303. THEN # MISSING RAW DATA BUF ADDRESS #
  4304. BEGIN # ABORT #
  4305. FE$RTN[0] = "PROCMRB3.";
  4306. GOTO PROCMRB1;
  4307. END # ABORT #
  4308.  
  4309. IF MS$MSG[0] EQ HFC$RDRAW # READ-RAW-DATA MSG #
  4310. THEN # READ MSG INTO DATA BUFFER #
  4311. BEGIN # DATA BUF #
  4312. P<UDT$MSG> = FMR$RDBA[0] - MSGLT;
  4313. END # DATA BUF #
  4314.  
  4315. ELSE # READ MSG INTO SBT ENTRY #
  4316. BEGIN # SBT #
  4317. P<UDT$MSG> = SBTADR;
  4318. SLOWFOR I = 1 STEP 1 WHILE MS$MSG0[0] NQ 0
  4319. DO # FIND FREE STORAGE BUFFER #
  4320. BEGIN # FIND #
  4321. IF I GQ MAT$COUNT[MAT$ENTRY"SBT"]
  4322. THEN # NO FREE ENTRY #
  4323. BEGIN # EXIT #
  4324. RETURN;
  4325. END # EXIT #
  4326.  
  4327. P<UDT$MSG> = P<UDT$MSG> + MSGLT; # NEXT ENTRY #
  4328. END # FIND #
  4329.  
  4330. END # SBT #
  4331.  
  4332. GMSG(FETMRB,UDT$MSG,STAT); # CHECKSUM TO STORAGE BUFFER #
  4333. MSTAT = TRUE; # INDICATE MESSAGE REMOVED #
  4334. DRVRACTIVE = TRUE; # NOTE DRIVER HAD ACTIVITY #
  4335. ASSOCDATA = ((MS$ASS$DT[0]*2)+14)/15;
  4336. IF STAT NQ 0 # BAD CHECKSUM ON READ #
  4337. OR ((MS$RETCODE[0] EQ HRC$XSMERR # BAD CHECKSUM ON WRITE #
  4338. OR MS$RETCODE[0] EQ HRC$XSMNA) # NO ABORT ON CHECKSUM #
  4339. AND MS$MSG[0] LS HRF$M860) # NOT M860-INITIATED #
  4340. THEN # FATAL CHANNEL ERROR #
  4341. BEGIN # DOWN #
  4342. IF FMW$CHON[0]
  4343. THEN # FIRST INDICATION OF BAD CHANNEL #
  4344. BEGIN # FIRST #
  4345. FMR$AT[0] = RCXSUM; # SET CHECKSUM ERROR IN FET #
  4346. FSCLOG(RFET); # DUMP FSC LOG TO BML #
  4347. END # FIRST #
  4348.  
  4349. GOTO PROCMRB2; # LET MESSAGE TIMEOUT HANDLE IT #
  4350. END # DOWN #
  4351.  
  4352. IF MS$MSG[0] EQ HFC$ENCRDR # *ENTER* MESSAGE #
  4353. AND MS$RETCODE[0] EQ HRC$DRVERR # DEVICE DRIVER ERROR #
  4354. THEN # ACTUALLY MEANS INPUT TRAY EMPTY #
  4355. BEGIN # RESET #
  4356. MS$RETCODE[0] = HRC$TRAYPR; ##
  4357. END # RESET #
  4358.  
  4359. IF MS$RETCODE[0] EQ HRC$DRVNA
  4360. AND MS$MSG[0] EQ HFC$RCLBP0
  4361. THEN # ** M860 PATCH #
  4362. BEGIN
  4363. MS$RETCODE[0] = HRC$NOLAB;
  4364. END
  4365.  
  4366. IF (MS$RETCODE[0] EQ HRC$DRVERR # DEVICE DRIVER ERROR #
  4367. OR MS$RETCODE[0] EQ HRC$DRVHW ##
  4368. OR MS$RETCODE[0] EQ HRC$DRVNA) ##
  4369. AND (MS$MSG[0] LS HFC$CHSCIF # LET CU ACCESS ON SM/DRD-S #
  4370. OR MS$MSG[0] GR HFC$CHSAIF) # HANDLE PATH STATUS ERRS LATER #
  4371. AND MS$MSQN$DI[0] EQ 0 # ONLY CU MESSAGES #
  4372. AND MS$MSG[0] LS HRF$M860 # NOT M860-INITIATED #
  4373. THEN # CONTROLLER HAVING PROBLEMS #
  4374. BEGIN # DOWN #
  4375. IF UD$CUON[FMR$CU[0]] OR UD$CNUP[FMR$CU[0]]
  4376. THEN # FIRST INDICATION OF BAD CU #
  4377. BEGIN # FIRST #
  4378. DOWNCU(FMR$CU[0]); # DOWN BAD CONTROLLER #
  4379. END # FIRST #
  4380.  
  4381. ZFILL(UDT$MSG,MSGLT); # THROW AWAY MESSAGE #
  4382. RETURN;
  4383. END # DOWN #
  4384.  
  4385. IF MS$MSG[0] GQ HRF$ELGFUL ##
  4386. AND MS$MSG[0] LQ HRF$REQDMP
  4387. THEN # SEND ERROR LOG TO BML #
  4388. BEGIN # BML #
  4389. IF ASSOCDATA GR ERRLOGLEN
  4390. THEN # THROW AWAY MESSAGE #
  4391. BEGIN # EXIT #
  4392. GOTO PROCMRB2;
  4393. END # EXIT #
  4394.  
  4395. BMLOG;
  4396. MS$RETCODE[0] = 0; # SEND OK BACK TO CU #
  4397. MS$MSG$R[0] = TRUE; # SET AS RESPONSE #
  4398. MS$ASS$DT[0] = 0; # SEND BACK MESSAGE ONLY #
  4399. MS$CU[0] = FMR$CU[0]; # SAVE CU ORDINAL #
  4400. FMR$ELCNT[0] = FMR$ELCNT[0] + 1; # COUNT ERROR LOG RESPONSES #
  4401. RETURN;
  4402. END # BML #
  4403.  
  4404. IF MS$RETCODE[0] EQ HRC$CSNERR # CSN/DRD IN USE #
  4405. AND MS$MSG[0] NQ HFC$STCRNF # RETRY AS NORMAL STORE #
  4406. AND MS$MSG[0] NQ HFC$STCRNV # IN CASE RCVY FROM *ACQ* ERROR #
  4407. THEN # SOFTWARE ERROR #
  4408. BEGIN # ABORT #
  4409. FE$RTN[0] = "PROCMRB4.";
  4410. GOTO PROCMRB1;
  4411. END # ABORT #
  4412.  
  4413. IF MSGCNT(FMR$CIF[0],FMR$CU[0]) EQ 0
  4414. THEN # THIS RESPONSE TIMED OUT #
  4415. BEGIN # THROW #
  4416. GOTO PROCMRB2; # ORIGINAL MESSAGE TIMED OUT #
  4417. END # THROW #
  4418.  
  4419. #
  4420. * LOCATE THE UDT MESSAGE BUFFER ASSOCIATED WITH THE
  4421. * INCOMING RESPONSE.
  4422. #
  4423.  
  4424. P<MBFHDR> = LOC(UD$MSG[MS$MSQN$CN[0]]) - 1; # ASSUME CU MSG #
  4425. IF MS$MSQN$D0[0]
  4426. THEN # DRD 0 MESSAGE #
  4427. BEGIN # DRD 0 #
  4428. P<MBFHDR> = LOC(D0$MSG[MS$MSQN$CN[0]]) - 1;
  4429. END # DRD 0 #
  4430.  
  4431. IF MS$MSQN$D1[0]
  4432. THEN # DRD 1 MESSAGE #
  4433. BEGIN # DRD 1 #
  4434. P<MBFHDR> = LOC(D1$MSG[MS$MSQN$CN[0]]) - 1;
  4435. END # DRD 1 #
  4436.  
  4437. IF MS$MSG[0] EQ HRF$CONRES
  4438. THEN # *CURESTART* MESSAGE #
  4439. BEGIN # LOCATE ADDRESS #
  4440. P<MBFHDR> = LOC(UD$MSG[FMR$CU[0]]) - 1; # USE PASSED CU ORD #
  4441. END # LOCATE ADDRESS #
  4442.  
  4443. IF MS$MSG[0] EQ HRF$UNITRW ##
  4444. OR MS$MSG[0] EQ HRF$FORCRW
  4445. THEN # *UNLOAD* MESSAGE #
  4446. BEGIN # LOCATE ADDRESS #
  4447. P<MBFHDR> = LOC(D1$MSG[MS$DEV$SM[0]+1]) - 1; # ASSUME LOWER #
  4448. IF NOT MS$DEV$ODD[0]
  4449. THEN # UPPER DRD IN USE #
  4450. BEGIN # RESET #
  4451. P<MBFHDR> = LOC(D0$MSG[MS$DEV$SM[0]+1]) - 1;
  4452. END # RESET #
  4453.  
  4454. END # LOCATE ADDRESS #
  4455.  
  4456. IF (NOT MBF$ACTIVE[0]) # NO ACTIVE MESSAGE BUFFER #
  4457. OR MBF$SBADDR[0] NQ 0 # STILL PROCESSING LAST RESPONSE #
  4458. THEN # MSG BUFFER FIELDS NOT READY #
  4459. BEGIN # ABORT #
  4460. GOTO PROCMRB2;
  4461. END # ABORT #
  4462.  
  4463. MBF$SBADDR[0] = P<UDT$MSG>; # SET STORAGE BUF ADDR #
  4464. IF MS$MSG[0] GQ HFC$RCLBP0 # *READCRTLBL* MESSAGE #
  4465. AND MS$MSG[0] LQ HFC$RCLBP9 ##
  4466. AND MS$ASS$DT[0] NQ 0
  4467. THEN # CARTRIDGE LABEL FOLLOWS MSG #
  4468. BEGIN # GET LABEL #
  4469. ASSOCDATA = ((MS$ASS$DT[0]*2)+14)/15;
  4470. IF ASSOCDATA GR LABLEN
  4471. THEN # COULD BE CE LABEL #
  4472. BEGIN # CLEAR #
  4473. MS$ASS$DT[0] = 0; # TREAT LIKE NO-LABEL #
  4474. MS$RETCODE[0] = HRC$NOLAB;
  4475. RETURN;
  4476. END # CLEAR #
  4477.  
  4478. GDATA(FETMRB,LABEL$CART,ASSOCDATA,STAT);
  4479. IF STAT NQ 0
  4480. THEN # ERROR IN READING LABEL #
  4481. BEGIN # ABORT #
  4482. FE$RTN[0] = "PROCMRB7.";
  4483. GOTO PROCMRB1;
  4484. END # ABORT #
  4485.  
  4486. END # GET LABEL #
  4487.  
  4488. IF MS$MSG[0] GQ HFC$DBLD0 ##
  4489. AND MS$MSG[0] LQ HFC$DBLD7
  4490. THEN # SEND BUFFERED LOG TO BML #
  4491. BEGIN # BML #
  4492. BMLOG;
  4493. END # BML #
  4494.  
  4495. IF MS$MSG[0] EQ HFC$RDRAW
  4496. THEN # FINISH RAW DATA BUF PROCESSING #
  4497. BEGIN # FINISH RAW #
  4498. P<FETFHB> = FMR$RDBA[0] - MSGLT - RFHBL; # GET DATA BUF ADDR #
  4499. FMR$RDBA[0] = 0; # NO RAW DATA EXPECTED #
  4500. IF MS$ASS$DT[0] NQ 0
  4501. THEN # RAW DATA READ OK #
  4502. BEGIN # OK #
  4503. FHB$IN[0] = FHB$FRST[0] + MSGLT + RWDATA;
  4504. END # OK #
  4505.  
  4506. ELSE # STRIPE HAS NO DATA #
  4507. BEGIN # NONE #
  4508. FHB$IN[0] = FHB$FRST[0] + MSGLT; # COUNT MSG ONLY #
  4509. END # NONE #
  4510.  
  4511. FHB$LOCK[0] = TRUE; # SET DATA TRANSFER COMPLETE #
  4512. END # FINISH RAW #
  4513.  
  4514. RETURN;
  4515.  
  4516. PROCMRB1:
  4517. MESSAGE(FEMSG,UDFL1); # ABORT PROCESSING #
  4518. ABORT;
  4519.  
  4520. PROCMRB2:
  4521. IF ASSOCDATA NQ 0 ##
  4522. AND MS$MSG[0] NQ HFC$RDRAW # RAW DATA ALREADY SENT #
  4523. THEN # THROW ASSOCIATED DATA #
  4524. BEGIN # THROW #
  4525. DATASIZE = DBLEN;
  4526. REPEAT WHILE ASSOCDATA GR 0
  4527. DO # READ DATA FROM FET BUFFER #
  4528. BEGIN # READ #
  4529. IF ASSOCDATA LS DBLEN
  4530. THEN # LAST DATA PORTION #
  4531. BEGIN # RESET #
  4532. DATASIZE = ASSOCDATA; # READ SMALL BLOCK #
  4533. END # RESET #
  4534.  
  4535. GDATA(FETMRB,DBUF,DATASIZE,STAT);
  4536. IF STAT NQ 0
  4537. THEN # DATA READ ERROR #
  4538. BEGIN # ABORT #
  4539. FE$RTN[0] = "PROCMRB8.";
  4540. GOTO PROCMRB1;
  4541. END # ABORT #
  4542.  
  4543. ASSOCDATA = ASSOCDATA - DATASIZE; # COUNT DATA REMOVED #
  4544. END # READ #
  4545.  
  4546. END # THROW #
  4547.  
  4548. ZFILL(UDT$MSG,MSGLT); # THROW AWAY MESSAGE #
  4549. RETURN;
  4550. END # PROCMRB #
  4551.  
  4552. TERM
  4553. PROC RESTCU;
  4554. # TITLE RESTCU - PERFORM CONTROLLER RESTART PROCESSING. #
  4555.  
  4556. BEGIN # RESTCU #
  4557.  
  4558. #
  4559. ** RESTCU - PERFORM CONTROLLER RESTART PROCESSING.
  4560. *
  4561. * *RESTCU* PROCESSES M860 CONTROLLER STATUS CHANGES. ALL M860
  4562. * MESSAGES NEEDED FOR CONTROLLER INITIALIZATION ARE SENT.
  4563. *
  4564. * PROC RESTCU
  4565. *
  4566. * ENTRY P<LLRQ> = *DRQUEUE* ENTRY ADDRESS.
  4567. *
  4568. * EXIT THE *DRQUEUE* ENTRY REQUEST STATE FIELD HAS BEEN
  4569. * UPDATED TO INDICATE WHERE SUBSEQUENT PROCESSING OF
  4570. * THIS REQUEST IS TO CONTINUE.
  4571. *
  4572. * MESSAGES *EXEC ABNORMAL, RESTCU1.* - UDT MESSAGE BUFFER STILL
  4573. * IN USE.
  4574. *
  4575. * *EXEC ABNORMAL, RESTCU2.* - THE NEXT M860 CONTROLLER
  4576. * INITIALIZATION FUNCTION
  4577. * WAS NOT FOUND IN THE
  4578. * FUNCTION LIST.
  4579. *
  4580. * NOTES THIS IS A PSEUDO-REENTRANT PROCEDURE.
  4581. #
  4582.  
  4583.  
  4584. #
  4585. **** PROC RESTCU - XREF LIST BEGIN.
  4586. #
  4587.  
  4588. XREF
  4589. BEGIN
  4590. PROC ABORT; # ABORT #
  4591. PROC DOWNCU; # DOWN CONTROLLER #
  4592. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  4593. PROC SENDMSG; # SEND M860 MESSAGE #
  4594. FUNC XCOD C(10); # CONVERT OCTAL TO DISPLAY-CODE #
  4595. PROC ZFILL; # ZERO-FILL BUFFER #
  4596. END
  4597.  
  4598. #
  4599. **** PROC RESTCU - XREF LIST END.
  4600. #
  4601.  
  4602. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  4603. *CALL,COMBFAS
  4604. *CALL,COMBCPR
  4605. *CALL,COMBFET
  4606. *CALL,COMBHFC
  4607. *CALL,COMBLRQ
  4608. *CALL,COMBUDT
  4609. *CALL,COMXCTF
  4610. *CALL,COMXMSC
  4611.  
  4612. DEF MSGNUMM1 #7#; # NUMBER OF CU MSGS TO SEND - 1 #
  4613.  
  4614. ITEM CORD U; # TEMP CU ORDINAL #
  4615. ITEM I I; # INDEX #
  4616.  
  4617. #
  4618. * THIS ARRAY DEFINES THE ORDER TO ISSUE CONTROLLER MESSAGES.
  4619. #
  4620.  
  4621. ARRAY NEXTMSG [0:MSGNUMM1] S(1); # NEXT MESSAGE TO ISSUE #
  4622. BEGIN
  4623. ITEM NEXTFTN U(00,00,60) = [HFC$RESCON, ##
  4624. HFC$SETMAS, ##
  4625. HFC$STDATM, ##
  4626. HFC$STERLN];
  4627. END
  4628.  
  4629. SWITCH RESTARTLBL:PROCST # DRIVER REQUEST STATE #
  4630. RESINIT:INITIAL, # INITIAL STATE #
  4631. RESMSGE:CONT1; # CONTINUATION 1 #
  4632. CONTROL EJECT;
  4633.  
  4634. GOTO RESTARTLBL[LLR$RS[0]];
  4635.  
  4636. #
  4637. * INITIAL DRIVER REQUEST STATE.
  4638. #
  4639.  
  4640. RESINIT:
  4641. P<MBFHDR> = LOC(UD$MSG[LLR$CU[0]]) - 1;
  4642. IF MBF$WORD[0] NQ 0
  4643. THEN # LAST MESSAGE NOT PROCESSED #
  4644. BEGIN # ABORT #
  4645. FE$RTN[0] = "RESTCU1.";
  4646. GOTO RESTCU1;
  4647. END # ABORT #
  4648.  
  4649. IF CURESERVED
  4650. THEN # ANOTHER CU INITIALIZING #
  4651. BEGIN # WAIT #
  4652. RETURN; # INITIALIZE CU-S ONE AT A TIME #
  4653. END # WAIT #
  4654.  
  4655. CURESERVED = TRUE; # ONLY THIS CU INITIALIZING #
  4656. P<UDT$MSG> = P<MBFHDR> + 1;
  4657. MS$MSG[0] = HFC$RESCON; # *RESTART* FUNCTION #
  4658. UD$SAVE[LLR$CU[0]] = SAVEPART;
  4659. LLR$RS[0] = PROCST"CONT1"; # SET NEW REQUEST STATE #
  4660.  
  4661. #
  4662. * ISSUE MESSAGES TO INITIALIZE CONTROLLER.
  4663. #
  4664.  
  4665. RESMSGE:
  4666. IF INITIALIZE ##
  4667. AND DRYUP
  4668. THEN # FORCE QUICK EXIT #
  4669. BEGIN # EXIT #
  4670. RETURN;
  4671. END # EXIT #
  4672.  
  4673. P<MBFHDR> = LOC(UD$MSG[LLR$CU[0]]) - 1;
  4674. SENDMSG; # SEND M860 MESSAGE #
  4675. IF (UD$SBADDR[LLR$CU[0]] EQ 0 # RESPONSE NOT YET RECEIVED #
  4676. OR NOT UD$MSGSENT[LLR$CU[0]])# CURESTART RESPONSE NOT SENT #
  4677. AND UD$MBACT[LLR$CU[0]] # *START ERROR LOG* NOT DONE #
  4678. AND LLR$DR[0] EQ RESPTYP4"OK4" # GOOD HARDWARE #
  4679. THEN # MESSAGE TRANSFER NOT COMPLETE #
  4680. BEGIN # TRY LATER #
  4681. RETURN;
  4682. END # TRY LATER #
  4683.  
  4684. IF MS$MSG[0] EQ HRF$CONRES # RESPONSE BIT NOT YET SET #
  4685. THEN # SEND CURESTART RESPONSE TO CU #
  4686. BEGIN # PRESET #
  4687. MBF$TMOUT[0] = 0; # RESET TIMEOUT #
  4688. MS$MSG$R[0] = TRUE; # SET RESPONSE FLAG #
  4689. MBF$SENT[0] = FALSE; # FORCE RESPONSE TO BE SENT #
  4690. RETURN;
  4691. END # PRESET #
  4692.  
  4693. IF UD$SBADDR[LLR$CU[0]] NQ 0 # RESPONSE RECEIVED #
  4694. OR LLR$DR[0] EQ RESPTYP4"M86$HDW$PR" # BAD HARDWARE #
  4695. THEN # PRESET FOR NEXT MESSAGE #
  4696. BEGIN # CLEAR #
  4697. IF MBF$SBADDR[0] NQ 0
  4698. THEN # CURESTART RESPONSE NOT SENT #
  4699. BEGIN # THROW #
  4700. P<UDT$MSG> = MBF$SBADDR[0];# CLEAR SBT ENTRY #
  4701. ZFILL(UDT$MSG,MSGLT);
  4702. END # THROW #
  4703.  
  4704. MBF$WORD[0] = 0; # CLEAR MESSAGE STATUS #
  4705. IF LLR$DR[0] EQ RESPTYP4"M86$HDW$PR"
  4706. THEN # RETURN LLRQ #
  4707. BEGIN # EXIT #
  4708. P<MWBTMP> = LOC(UD$CAMF[LLR$CU[0]]); # LOCATE WRITE FET #
  4709. IF MWB$ADDR[LLR$CIF[0]] NQ 0
  4710. THEN # CHANNEL WAS ALLOCATED #
  4711. BEGIN # EXISTS #
  4712. P<FETMWB> = MWB$ADDR[LLR$CIF[0]];
  4713. P<FETMRA> = P<FETMWB> - 1; # KEEP FET PAIRS TOGETHER #
  4714. P<FETMRB> = FRA$MRBADR[0];
  4715. IF UD$CUON[LLR$CU[0]] AND FMW$CHON[0]
  4716. THEN # NOT DUE TO DEVICE DRIVER ERROR #
  4717. BEGIN # OFF #
  4718. DOWNCU(LLR$CU[0]); # DOWN CONTROLLER #
  4719. END # OFF #
  4720.  
  4721. END # EXISTS #
  4722.  
  4723. LLR$RS[0] = PROCST"COMPLETE";
  4724. RETURN;
  4725. END # EXIT #
  4726.  
  4727. P<UDT$MSG> = LOC(UD$MSG[LLR$CU[0]]);
  4728. IF MS$MSG[0] EQ HFC$STERLG ##
  4729. OR MS$MSG[0] EQ HFC$STERDR
  4730. THEN # MULTIPLE MESSAGE NOT COMPLETED #
  4731. BEGIN # CONTINUE #
  4732. MBF$SAVE[0] = SAVENONE;
  4733. MS$DRDN[0] = MS$DRDN[0] + 1; # CHECK NEXT CIF/DRD #
  4734. RETURN;
  4735. END # CONTINUE #
  4736.  
  4737. END # CLEAR #
  4738.  
  4739. P<UDT$MSG> = LOC(UD$MSG[LLR$CU[0]]); # RESET BASED ARRAY #
  4740. IF MS$MSG[0] EQ HFC$STERLN
  4741. THEN # *SET ERROR LOG LENGTH* ISSUED #
  4742. BEGIN # EXIT #
  4743. LLR$RS[0] = PROCST"COMPLETE";
  4744. CORD = XCOD(UD$ESTO[LLR$CU[0]]); # SET EST ORDINAL #
  4745. CU$ORD[0] = C<6,4>CORD;
  4746. CU$STAT[0] = CUON;
  4747. MESSAGE(CUMSG,SYSUDF1); # SEND CU ON MESSAGE #
  4748. RETURN;
  4749. END # EXIT #
  4750.  
  4751. MBF$SAVE[0] = SAVEPART; # SET FOR MOST SINGLE MESSAGES #
  4752. IF MS$MSG[0] EQ HFC$RESCON
  4753. THEN # RESET FOR *SETMASCHAN* #
  4754. BEGIN # RESET #
  4755. MBF$SAVE[0] = SAVENONE;
  4756. END # RESET #
  4757.  
  4758. SLOWFOR I = 0 STEP 1 UNTIL MSGNUMM1
  4759. DO # SET UP NEXT CU MESSAGE #
  4760. BEGIN # NEXT #
  4761. IF NEXTFTN[I] EQ MS$MSG[0]
  4762. THEN # MESSAGE FOUND #
  4763. BEGIN # RESET #
  4764. MS$MSG[0] = NEXTFTN[I+1]; # GET NEXT FUNCTION #
  4765. RETURN;
  4766. END # RESET #
  4767.  
  4768. END # NEXT #
  4769.  
  4770. FE$RTN[0] = "RESTCU2."; # NEXT MESSAGE NOT FOUND #
  4771.  
  4772. RESTCU1:
  4773. MESSAGE(FEMSG,UDFL1);
  4774. ABORT;
  4775. END # RESTCU #
  4776.  
  4777. TERM
  4778. PROC SENDMSG;
  4779. # TITLE SENDMSG - SEND M860 MESSAGE. #
  4780.  
  4781. BEGIN # SENDMSG #
  4782.  
  4783. #
  4784. ** SENDMSG - SEND M860 MESSAGE.
  4785. *
  4786. * *SENDMSG* MONITORS M860 MESSAGE PROCESSING. IT CONTROLS THE
  4787. * PROGRESS OF AN M860 MESSAGE FROM ITS CREATION TO THE VERIFICATION
  4788. * OF ITS INCOMING M860 RESPONSE.
  4789. *
  4790. * PROC SENDMSG
  4791. *
  4792. * ENTRY P<LLRQ> = *DRQUEUE* ENTRY ADDRESS.
  4793. *
  4794. * P<MBFHDR> = UDT MESSAGE BUFFER HEADER ADDRESS.
  4795. *
  4796. * EXIT THE M860 RESPONSE TO THE ORIGINAL M860 MESSAGE IS
  4797. * STORED IN THE STORAGE BUFFER TABLE, AND HAS BEEN
  4798. * VERIFIED.
  4799. *
  4800. * MESSAGES *EXEC ABNORMAL, SENDMSG0.* - CHANNEL MESSAGE COUNT WAS
  4801. * ZERO WHEN AN M860 MESSAGE
  4802. * TIMED OUT.
  4803. *
  4804. * *EXEC ABNORMAL, SENDMSG2.* - FATAL RETURN CODE ERROR
  4805. * FOUND IN M860 RESPONSE.
  4806. *
  4807. * *EXEC ABNORMAL, SENDMSG3.* - CHANNEL MESSAGE COUNT WAS
  4808. * ZERO WHEN AN M860
  4809. * RESPONSE WAS RECEIVED.
  4810. *
  4811. * NOTES IF AN M860 RESPONSE TIMES OUT, *HARDWARE PROBLEM*
  4812. * STATUS IS RETURNED IN THE *DRQUEUE* ENTRY, AND THE
  4813. * CHANNEL MESSAGE COUNT IS DECREMENTED.
  4814. #
  4815.  
  4816.  
  4817. #
  4818. **** PROC SENDMSG - XREF LIST BEGIN.
  4819. #
  4820.  
  4821. XREF
  4822. BEGIN
  4823. PROC ABORT; # ABORT #
  4824. PROC CALLPP; # PASS MESSAGES/DATA TO PP #
  4825. PROC CRMSG; # CREATE M860 MESSAGE #
  4826. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  4827. PROC RTIME; # GET TIME SINCE DEADSTART #
  4828. PROC ZFILL; # ZERO-FILL BUFFER #
  4829. END
  4830.  
  4831. #
  4832. **** PROC SENDMSG - XREF LIST END.
  4833. #
  4834.  
  4835. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  4836. *CALL,COMBFAS
  4837. *CALL,COMBCDD
  4838. *CALL,COMBCPR
  4839. *CALL,COMBFET
  4840. *CALL,COMBHFC
  4841. *CALL,COMBKDD
  4842. *CALL,COMBLRQ
  4843. *CALL,COMBUDT
  4844. *CALL,COMXCTF
  4845. *CALL,COMXMSC
  4846.  
  4847. ITEM MBFTN U; # SAVE MSG BUFFER M860 FUNCTION #
  4848. CONTROL EJECT;
  4849.  
  4850. P<UDT$MSG> = P<MBFHDR> + 1; # ASSUME MESSAGE IN UDT #
  4851. MBFTN = MS$MSG[0]; # SAVE FOR LATER COMPARE #
  4852. IF MBF$SBADDR[0] NQ 0
  4853. THEN # PROCESS MESSAGE IN SBT #
  4854. BEGIN # SBT #
  4855. P<UDT$MSG> = MBF$SBADDR[0];
  4856. END # SBT #
  4857.  
  4858. P<KWORD> = LOC(LLR$KWORDS[0]);
  4859. IF MBF$TMOUT[0] NQ 0 # AWAITING M860 RESPONSE #
  4860. THEN # CHECK FOR CU OR CHANNEL OFF #
  4861. BEGIN # PRESET #
  4862. P<MWBTMP> = LOC(UD$CAMF[LLR$CU[0]]);
  4863. P<FETMWB> = MWB$ADDR[LLR$CIF[0]];
  4864. P<FETMRA> = P<FETMWB> - 1;
  4865. P<FETMRB> = FRA$MRBADR[0];
  4866. END # PRESET #
  4867.  
  4868. IF MBF$TMOUT[0] NQ 0 # MESSAGE EXISTS #
  4869. AND (RTIMSECS[0] - MBF$TMOUT[0] GQ MAX$MSTO # MSG TIMED OUT #
  4870. OR (NOT UD$CUON[LLR$CU[0]]) # CU TURNED OFF #
  4871. OR NOT FMW$CHON[0]) # CHANNEL TURNED OFF #
  4872. AND MBF$SBADDR[0] EQ 0 # RESPONSE NOT RECEIVED #
  4873. AND KW$COMP[0] # SKIP IF GO NOT YET RECEIVED #
  4874. THEN # CLEAN UP BEFORE RETURNING LLRQ #
  4875. BEGIN # CLEAN UP #
  4876. IF MSGCNT(LLR$CIF[0],LLR$CU[0]) EQ 0
  4877. THEN # MESSAGE COUNT INCORRECT #
  4878. BEGIN # ABORT #
  4879. FE$RTN[0] = "SENDMSG0.";
  4880. GOTO SENDMSG1;
  4881. END # ABORT #
  4882.  
  4883. MSGCNT(LLR$CIF[0],LLR$CU[0]) = MSGCNT(LLR$CIF[0],LLR$CU[0])-1;
  4884. # DECREMENT CHANNEL MSG COUNT #
  4885. IF MS$MSG[0] EQ HFC$RDRAW # READING RAW DATA #
  4886. THEN # RESET READ FET #
  4887. BEGIN # RESET #
  4888. FMR$RDBA[0] = 0; # REMOVE RAW DATA BUFFER ADDR #
  4889. END # RESET #
  4890.  
  4891. LLR$DR[0] = RESPTYP4"M86$HDW$PR"; # INDICATE HARDWARE PROBLEM #
  4892. IF MS$MSQN$DI[0] NQ 0 # DRD MESSAGE #
  4893. THEN # TURN DRD OFF #
  4894. BEGIN # OFF #
  4895. LLR$DRFUL[0] = TRUE; # FORCE STORE, IF POSSIBLE #
  4896. LLR$SCIF[0] = LLR$CIF[0]; # SAVE TO DECIDE IF DRD GOES OFF #
  4897. LLR$SCU[0] = LLR$CU[0];
  4898. END # OFF #
  4899.  
  4900. RETURN;
  4901. END # CLEAN UP #
  4902.  
  4903. IF NOT MBF$SENT[0]
  4904. THEN # MSG NOT ISSUED TO WRITE BUFFER #
  4905. BEGIN # SEND #
  4906. IF NOT MBF$ACTIVE[0]
  4907. THEN # MESSAGE NOT CREATED #
  4908. BEGIN # CREATE #
  4909. CRMSG; # CREATE M860 MESSAGE #
  4910. LLR$DR[0] = RESPTYP4"OK4"; # ASSUME RESPONSE OK #
  4911. END # CREATE #
  4912.  
  4913. IF NOT MBF$ACTIVE[0] ##
  4914. AND ((MS$MSG[0] GQ HFC$CHSCIF ##
  4915. AND MS$MSG[0] LQ HFC$CHSAIF) ##
  4916. OR MS$MSG[0] EQ HFC$SETMAS ##
  4917. OR MS$MSG[0] EQ HFC$STERLG ##
  4918. OR MS$MSG[0] EQ HFC$STERDR)
  4919. THEN # ALL SPECIAL MSGS COMPLETED #
  4920. BEGIN # EXIT #
  4921. RETURN;
  4922. END # EXIT #
  4923.  
  4924. CALLPP(IRPMSG); # SEND MSG TO WRITE BUFFER #
  4925. IF NOT MBF$SENT[0]
  4926. THEN # MESSAGE NOT YET SENT #
  4927. BEGIN # TRY LATER #
  4928. RETURN;
  4929. END # TRY LATER #
  4930.  
  4931. RTIME(RTIMESTAT); # PRESET MESSAGE TIMEOUT #
  4932. MBF$TMOUT[0] = RTIMSECS[0];
  4933. END # SEND #
  4934.  
  4935. IF MBF$SBADDR[0] EQ 0 # STILL AWAITING RESPONSE #
  4936. OR MS$MSG$R[0] # NO RESPONSE EXPECTED #
  4937. THEN # NO RESPONSE TO BE CHECKED #
  4938. BEGIN # EXIT #
  4939. RETURN;
  4940. END # EXIT #
  4941.  
  4942. DRVRACTIVE = TRUE; # NOTE DRIVER HAD ACTIVITY #
  4943. P<UDT$MSG> = MBF$SBADDR[0];
  4944. IF MS$MSG[0] NQ MBFTN ##
  4945. AND (NOT MS$MSG$R[0]) # M860 RESPONSES ALREADY CHECKED #
  4946. AND (NOT (MBFTN GQ HFC$MVLMVR # MOUNT VOLUME - UNLOAD PAIR #
  4947. AND MBFTN LQ HFC$MVLMNW ##
  4948. AND (MS$MSG[0] EQ HRF$UNITRW ##
  4949. OR MS$MSG[0] EQ HRF$FORCRW))) ##
  4950. AND NOT (MBFTN EQ HFC$RESCON # RESTART - CURESTART PAIR #
  4951. AND MS$MSG[0] EQ HRF$CONRES)
  4952. THEN # MESSAGE TYPE MISMATCH #
  4953. BEGIN # THROW #
  4954. ZFILL(UDT$MSG,MSGLT); # ASSUME THIS RESPONSE TIMED OUT #
  4955. MBF$SBADDR[0] = 0;
  4956. RETURN;
  4957. END # THROW #
  4958.  
  4959. IF ((MS$RETCODE[0] EQ HRC$CSNMIS # CSN MISMATCH #
  4960. AND MS$MSG[0] NQ HFC$ACCR) # POSSIBLE MAP ERROR #
  4961. OR MS$RETCODE[0] EQ HRC$DLERR# DATA LENGTH ERROR #
  4962. OR MS$RETCODE[0] EQ HRC$UNITAS) # UNIT ALREADY ASSIGNED #
  4963. AND MS$MSG[0] NQ HFC$RDRAW # HANDLE THESE OUT OF EXEC #
  4964. THEN # FATAL ERROR #
  4965. BEGIN # ABORT #
  4966. FE$RTN[0] = "SENDMSG2.";
  4967. GOTO SENDMSG1;
  4968. END # ABORT #
  4969.  
  4970. IF MSGCNT(LLR$CIF[0],LLR$CU[0]) EQ 0
  4971. THEN # MESSAGE COUNT INCORRECT #
  4972. BEGIN # ABORT #
  4973. FE$RTN[0] = "SENDMSG3.";
  4974. GOTO SENDMSG1;
  4975. END # ABORT #
  4976.  
  4977. MSGCNT(LLR$CIF[0],LLR$CU[0]) = MSGCNT(LLR$CIF[0],LLR$CU[0]) - 1;
  4978. # DECREMENT CHANNEL MSG COUNT #
  4979. IF MS$RETCODE[0] EQ HRC$DRVERR # DEVICE DRIVER ERROR #
  4980. OR MS$RETCODE[0] EQ HRC$DRVHO ##
  4981. OR MS$RETCODE[0] EQ HRC$DRVHW ##
  4982. OR MS$RETCODE[0] EQ HRC$DRVNA ##
  4983. OR MS$RETCODE[0] EQ HRC$THRERR # CARTRIDGE THREADING ERRFOR #
  4984. THEN # DRD MESSAGE ERROR #
  4985. BEGIN # DRD #
  4986. LLR$DR[0] = RESPTYP4"M86$HDW$PR";
  4987. IF MS$MSG[0] EQ HFC$WVLBUT # ASSUME WRITE ERROR INSTEAD #
  4988. AND MS$RETCODE[0] EQ HRC$DRVERR
  4989. THEN # LET DESTAGING TO SM CONTINUE #
  4990. BEGIN # RESET #
  4991. LLR$DR[0] = RESPTYP4"UN$WRT$ERR";
  4992. END # RESET #
  4993.  
  4994. IF (MS$MSG[0] LS HFC$CHSCIF # NOT STATUS CHANGES #
  4995. OR MS$MSG[0] GR HFC$CHSAIF) ##
  4996. AND (MS$MSG[0] NQ HFC$WVLBUT # ASSUME WRITE ERROR INSTEAD #
  4997. OR MS$RETCODE[0] NQ HRC$DRVERR)
  4998. THEN # TRY TO REMOVE CARTRIDGE #
  4999. BEGIN # REMOVE #
  5000. LLR$DRFUL[0] = TRUE; # FORCE STORE, IF NOT ACQUIRE #
  5001. LLR$SCIF[0] = LLR$CIF[0]; # SAVE IN CASE OVERWRITTEN #
  5002. LLR$SCU[0] = LLR$CU[0];
  5003. END # REMOVE #
  5004.  
  5005. END # DRD #
  5006.  
  5007. RETURN;
  5008.  
  5009. SENDMSG1:
  5010. MESSAGE(FEMSG,UDFL1); # ABORT PROCESSING #
  5011. ABORT;
  5012. END # SENDMSG #
  5013.  
  5014. TERM
  5015. PROC SSDRVR;
  5016. # TITLE SSDRVR - MSAS DRIVER MAIN ROUTINE. #
  5017.  
  5018. BEGIN # SSDRVR #
  5019.  
  5020. #
  5021. ** SSDRVR - MSAS DRIVER MAIN ROUTINE.
  5022. *
  5023. * *SSDRVR* IS THE INTERFACE BETWEEN *SSEXEC* AND
  5024. * THE PRIMARY FUNCTIONS OF THE MSAS DRIVER. IT IS
  5025. * CALLED TO BOTH PROCESS NEW REQUESTS FROM *SSEXEC*,
  5026. * AND TO CONTINUE PROCESSING FOR THOSE REQUESTS
  5027. * ALREADY STARTED.
  5028. *
  5029. * PROC SSDRVR
  5030. *
  5031. * ENTRY THE *DRQUEUE* CONTAINS A QUEUE OF *LLRQ* ENTRIES
  5032. * WHICH DEFINE THE SET OF NEW REQUESTS BEING PASSED
  5033. * FROM *SSEXEC* TO THE DRIVER. THIS QUEUE MAY
  5034. * BE EMPTY.
  5035. *
  5036. * EXIT ALL DRIVER REQUESTS HAVE BEEN PROCESSED AS FAR AS
  5037. * POSSIBLE, AND ALL COMPLETED DRIVER REQUESTS HAVE
  5038. * BEEN RETURNED TO THE *LLRQ* READY CHAIN. AN OPERATOR
  5039. * *N.IDLE* COMMAND DURING FULL INITIALIZATION FORCES
  5040. * AN IMMEDIATE RETURN TO *SSEXEC*.
  5041. *
  5042. #
  5043.  
  5044.  
  5045. #
  5046. **** PROC SSDRVR - XREF LIST BEGIN.
  5047. #
  5048.  
  5049. XREF
  5050. BEGIN
  5051. PROC ADD$LNK; # ADD ENTRY TO END OF CHAIN #
  5052. PROC DEL$LNK; # DELETE ENTRY FROM CHAIN #
  5053. PROC MESSAGE; # SEND DAYFILE MESSAGE #
  5054. PROC PPDONE; # PROCESS COMPLETED PP CALLS #
  5055. PROC PROCDRQ; # PROCESS DRIVER REQUESTS #
  5056. PROC PROCMRB; # PROCESS MESSAGE READ BUFFERS #
  5057. PROC RECALL; # SUSPEND PROCESSING #
  5058. END
  5059.  
  5060. #
  5061. **** PROC SSDRVR - XREF LIST END.
  5062. #
  5063.  
  5064. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  5065. *CALL COMBFAS
  5066. *CALL COMBCHN
  5067. *CALL,COMBKDA
  5068. *CALL,COMBFET
  5069. *CALL,COMBKDD
  5070. *CALL COMBLRQ
  5071. *CALL COMBUDT
  5072. *CALL COMXCTF
  5073. *CALL,COMXJCA
  5074. *CALL COMXMSC
  5075.  
  5076. ITEM I I; # INDEX #
  5077. ITEM J I; # INDEX #
  5078. ITEM MRBACTIVE B; # MSG READ BUFFER ACTIVITY FLAG #
  5079. ITEM MRBSTAT B; # SET IF MSG READ BUF PROCESSED #
  5080. ITEM NEXTREQ U; # ADDRESS OF NEXT DRIVER REQUEST #
  5081. CONTROL EJECT;
  5082.  
  5083. DRVRRECALL = FALSE; # INDICATE NO DRIVER RECALL #
  5084. DRVRACTIVE = TRUE;
  5085. REPEAT WHILE DRVRACTIVE
  5086. DO # DRIVER MAIN LOOP #
  5087. BEGIN # MAIN LOOP #
  5088. DRVRACTIVE = FALSE; # INDICATE NO ACTIVITY #
  5089.  
  5090. #
  5091. * PROCESS ALL DRIVER QUEUE ENTRIES.
  5092. #
  5093.  
  5094. P<LLRQ> = CHN$BOC[LCHN"DRQUEUE"]; # POINT TO FIRST REQUEST #
  5095. SLOWFOR I = 0 WHILE P<LLRQ> NQ 0
  5096. DO # PROCESS DRIVER QUEUE #
  5097. BEGIN # PROCESS #
  5098. P<KWORD> = LOC(LLR$KWORDS[0]);
  5099. IF NOT (KW$COMP[0] # K-DISPLAY ACTIVE #
  5100. OR LLR$UCPABT[0]) # UCP ABORTED #
  5101. THEN # RECALL DRIVER UNTIL COMPLETE #
  5102. BEGIN # RECALL #
  5103. DRVRRECALL = TRUE;
  5104. P<LLRQ> = LLR$LINK1[0]; # POINT TO NEXT REQUEST #
  5105. TEST I;
  5106. END # RECALL #
  5107.  
  5108. IF LLR$RS[0] NQ PROCST"COMPLETE"
  5109. THEN # MORE PROCESSING REQUIRED #
  5110. BEGIN # CONTINUE #
  5111. PROCDRQ; # PROCESS DRIVER REQUEST #
  5112. END # CONTINUE #
  5113.  
  5114. NEXTREQ = LLR$LINK1[0]; # SAVE NEXT REQUEST ADDRESS #
  5115. IF LLR$RS[0] EQ PROCST"COMPLETE" ##
  5116. AND KW$COMP[0] # REQUEST NOT PENDING #
  5117. THEN # PUT REQUEST BACK ON READY QUEUE #
  5118. BEGIN # BACK #
  5119. IF LLR$CU[0] NQ 0
  5120. THEN # CHECK FOR CU/CHANNEL OFF #
  5121. BEGIN # OFF #
  5122. P<MWBTMP> = LOC(UD$CAMF[LLR$CU[0]]);
  5123. P<FETMWB> = MWB$ADDR[LLR$CIF[0]];
  5124. IF P<FETMWB> EQ 0
  5125. THEN # NO CHANNEL ALLOCATED #
  5126. BEGIN # SKIP #
  5127. GOTO SSDRVR1; # NO HARDWARE TO CHECK #
  5128. END # SKIP #
  5129.  
  5130. P<FETMRA> = P<FETMWB> - 1;
  5131. P<FETMRB> = FRA$MRBADR[0];
  5132. IF NOT (FMW$CHON[0] # CHANNEL TURNED OFF #
  5133. AND UD$CUON[LLR$CU[0]]) # CU TURNED OFF #
  5134. THEN # CHECK IF SM STILL ACCESSIBLE #
  5135. BEGIN # STOP #
  5136. IF LLR$CU[0] EQ SM$CUO0[LLR$SMO[0]]
  5137. THEN # 1ST CU/CHAN BAD #
  5138. BEGIN # 1ST #
  5139. SM$HWOFF1[LLR$SMO[0]] = TRUE;
  5140. END # 1ST #
  5141.  
  5142. IF LLR$CU[0] EQ SM$CUO1[LLR$SMO[0]]
  5143. THEN # 2ND CU/CHAN BAD #
  5144. BEGIN # 2ND #
  5145. SM$HWOFF2[LLR$SMO[0]] = TRUE;
  5146. END # 2ND #
  5147.  
  5148. IF (SM$HWOFF1[LLR$SMO[0]] # 1ST HW BAD #
  5149. OR NOT UD$EXIST[SM$CUO0[LLR$SMO[0]]]) ##
  5150. AND (SM$HWOFF2[LLR$SMO[0]] # 2ND HW BAD #
  5151. OR NOT UD$EXIST[SM$CUO1[LLR$SMO[0]]])
  5152. THEN # ALL HW TO THIS SM BAD #
  5153. BEGIN # BAD #
  5154. SM$HWOFF[LLR$SMO[0]] = TRUE; # STOP ALL SM ACCESS #
  5155. END # BAD #
  5156.  
  5157. END # STOP #
  5158.  
  5159. END # OFF #
  5160.  
  5161. SSDRVR1:
  5162. DEL$LNK(LOC(LLRQ),LCHN"DRQUEUE",0);
  5163. ADD$LNK(LOC(LLRQ),LCHN"LL$READY",0);
  5164. END # BACK #
  5165.  
  5166. P<LLRQ> = NEXTREQ; # POINT TO NEXT REQUEST #
  5167. END # PROCESS #
  5168.  
  5169. #
  5170. * PROCESS ALL MESSAGE READ BUFFERS.
  5171. #
  5172.  
  5173. MRBACTIVE = TRUE; # SET MESSAGE PROCESSED #
  5174. REPEAT WHILE MRBACTIVE
  5175. DO # SCAN WHILE MESSAGES TO PROCESS #
  5176. BEGIN # SCAN #
  5177. MRBACTIVE = FALSE; # PRESET TO INDICATE NO ACTIVITY #
  5178. SLOWFOR I = 1 STEP 1 WHILE UD$EXIST[I] AND (I LQ MAXCTN)
  5179. DO # SCAN CONTROLLERS #
  5180. BEGIN # CHECK #
  5181. P<MWBTMP> = LOC(UD$CAMF[I]);
  5182. SLOWFOR J = 0 STEP 1 UNTIL MAX$CIF
  5183. DO # CHECK READ BUFFERS #
  5184. BEGIN # EXISTS #
  5185. IF MWB$ADDR[J] NQ 0
  5186. THEN # READ BUFFER EXISTS #
  5187. BEGIN # PROCESS INCOMING MESSAGES #
  5188. P<FETMWB> = MWB$ADDR[J];
  5189. P<FETMRA> = P<FETMWB> - 1;
  5190. P<FETMRB> = FRA$MRBADR[0]; # READ BUFFER ADDRESS #
  5191. PROCMRB(MRBSTAT);
  5192. MRBACTIVE = MRBACTIVE OR MRBSTAT;
  5193. END # PROCESS INCOMING MESSAGES #
  5194.  
  5195. END # EXISTS #
  5196.  
  5197. END # CHECK #
  5198.  
  5199. END # SCAN #
  5200.  
  5201. #
  5202. * PROCESS ALL COMPLETED PP CALL BLOCK ENTRIES.
  5203. #
  5204.  
  5205. SLOWFOR I = 1 STEP 1 UNTIL PPCBTSIZE
  5206. DO # PROCESS CALL BLOCK #
  5207. BEGIN # PROCESS #
  5208. IF PPU$FC[I] EQ 0
  5209. THEN # TRY NEXT ENTRY #
  5210. BEGIN # NEXT #
  5211. TEST I;
  5212. END # NEXT #
  5213.  
  5214. IF DRYUP ##
  5215. AND INITIALIZE # ACTIVE LLRQ-S WONT BE FINISHED #
  5216. AND PPU$ACTIVE[I]
  5217. THEN # RECALL DRIVER UNTIL PP DROPS #
  5218. BEGIN # RECALL #
  5219. DRVRRECALL = TRUE;
  5220. TEST I;
  5221. END # RECALL #
  5222.  
  5223. IF (NOT (DRYUP AND INITIALIZE)) # LET LLRQ-S END FIRST #
  5224. AND NOT PPU$ACTIVE[I]
  5225. THEN # PP COMPLETED #
  5226. BEGIN # REMOVE #
  5227. PPDONE(I); # PROCESS COMPLETED ENTRY #
  5228. END # REMOVE #
  5229.  
  5230. END # PROCESS #
  5231.  
  5232. END # MAIN LOOP #
  5233.  
  5234. #
  5235. * INFORM OPERATOR IF THE 7990 HARDWARE CAN NO LONGER BE ACCESSED.
  5236. #
  5237.  
  5238. IF UDT$HWOFF[0] NQ 0 # EXEC TO BE SHUT DOWN #
  5239. AND KREQCLEAR # B-DISPLAY AVAILABLE FOR MSG #
  5240. AND NOT INITIALIZE # *HALT* MSG TO BE SHOWN INSTEAD #
  5241. THEN # INFORM OPERATOR OF PROBLEM #
  5242. BEGIN # MSG #
  5243. IF UDT$CUS$O[0]
  5244. THEN # FLASH CONTROLLER MESSAGE #
  5245. BEGIN # CU #
  5246. MESSAGE("$ALL CONTROLLERS OFF.",LINE2);
  5247. END # CU #
  5248.  
  5249. ELSE # FLASH CHANNEL MESSAGE #
  5250. BEGIN # CHAN #
  5251. MESSAGE("$ALL CHANNELS OFF.",LINE2);
  5252. END # CHAN #
  5253.  
  5254. END # MSG #
  5255.  
  5256. RECALL(0); # KEEP CPU TIME DOWN #
  5257. RETURN;
  5258. END # SSDRVR #
  5259.  
  5260. TERM
  5261. PROC STRCART;
  5262. # TITLE STRCART - STORE CARTRIDGE. #
  5263.  
  5264. BEGIN # STRCART #
  5265.  
  5266. #
  5267. ** STRCART - STORE CARTRIDGE.
  5268. *
  5269. * *STRCART* PROCESSES *DRQUEUE* REQUESTS TO STORE CARTRIDGES. IF
  5270. * THE STORE WAS INITIATED BY A *TDAM* REQUEST, THE DRD BUFFERED LOG
  5271. * IS FORMATTED AND SENT TO THE BML, AND PART OF THE LOG IS SENT TO
  5272. * THE ASSOCIATED *HLRQ* ENTRY.
  5273. *
  5274. * PROC STRCART
  5275. *
  5276. * ENTRY P<LLRQ> = *DRQUEUE* ENTRY ADDRESS.
  5277. *
  5278. * EXIT THE *DRQUEUE* ENTRY REQUEST STATE FIELD HAS BEEN
  5279. * UPDATED TO INDICATE WHERE SUBSEQUENT PROCESSING OF
  5280. * THIS REQUEST IS TO CONTINUE.
  5281. *
  5282. * MESSAGES *EXEC ABNORMAL, STRCART1.* - UDT MESSAGE BUFFER STILL
  5283. * IN USE.
  5284. *
  5285. * *EXEC ABNORMAL, STRCART2.* - CSN OR DRD IN USE.
  5286. *
  5287. * A K-DISPLAY MESSAGE IS ISSUED IF THE CARTRIDGE WAS
  5288. * EJECTED, THE OUTPUT TRAY OR MATRIX CELL WAS FULL, OR
  5289. * THE ASSOCIATED DRD WAS TURNED OFF DUE TO AN ERROR
  5290. * FOUND BY THE M860 HARDWARE.
  5291. *
  5292. * NOTES THIS IS A PSEUDO-REENTRANT PROCEDURE.
  5293. #
  5294.  
  5295.  
  5296. #
  5297. **** PROC STRCART - XREF LIST BEGIN.
  5298. #
  5299.  
  5300. XREF
  5301. BEGIN
  5302. PROC ABORT; # ABORT #
  5303. PROC KREQ; # SEND K-DISPLAY REQUEST #
  5304. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  5305. PROC RTIME; # GET TIME SINCE DEADSTART #
  5306. PROC SENDMSG; # SEND M860 MESSAGE #
  5307. PROC ZFILL; # ZERO-FILL BUFFER #
  5308. END
  5309.  
  5310. #
  5311. **** PROC STRCART - XREF LIST END.
  5312. #
  5313.  
  5314. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  5315. *CALL,COMBFAS
  5316. *CALL,COMBCPR
  5317. *CALL,COMBFET
  5318. *CALL,COMBHFC
  5319. *CALL,COMBKDD
  5320. *CALL,COMBLRQ
  5321. *CALL,COMBUCR
  5322. *CALL,COMBUDT
  5323. *CALL,COMXCTF
  5324. *CALL,COMXMSC
  5325.  
  5326. SWITCH STRLBL:PROCST # DRIVER REQUEST STATE #
  5327. STRINIT:INITIAL, # INITIAL STATE #
  5328. STRCUBE:CONT1, # CONTINUATION 1 #
  5329. STRBUFL:CONT2, # CONTINUATION 2 #
  5330. STRDRDO:CONT3; # CONTINUATION 3 #
  5331. CONTROL EJECT;
  5332. CONTROL INERT;
  5333.  
  5334. GOTO STRLBL[LLR$RS[0]];
  5335.  
  5336. #
  5337. * INITIAL DRIVER REQUEST STATE.
  5338. #
  5339.  
  5340. STRINIT:
  5341. IF LLR$MBH[0] EQ 0
  5342. THEN # ** PATCH #
  5343. BEGIN
  5344. FE$RTN[0] = "STRCART0.";
  5345. GOTO STRCART2;
  5346. END
  5347.  
  5348. P<KWORD> = LOC(LLR$KWORDS[0]);
  5349. IF LLR$UCPABT[0] ##
  5350. AND NOT KW$COMP[0] # K-DISPLAY MSG PENDING #
  5351. THEN # IGNORE UCP ABORT #
  5352. BEGIN # EXIT #
  5353. RETURN; # AVOID ISSUING INFINITE STORES #
  5354. END # EXIT #
  5355.  
  5356. IF LLR$SCU[0] EQ 0 # NO CHANNEL/CU SAVED #
  5357. AND LLR$DRFUL[0] # ERROR OCCURRED #
  5358. THEN # DATA ERROR AFTER GOOD REW/UNL #
  5359. BEGIN # SAVE #
  5360. LLR$SCIF[0] = LLR$CIF[0]; # SAVE TO DECIDE ON RETRY #
  5361. LLR$SCU[0] = LLR$CU[0];
  5362. END # SAVE #
  5363.  
  5364. LLR$SDR[0] = LLR$DR[0]; # IN CASE EJECTING CARTRIDGE #
  5365. P<MBFHDR> = LLR$MBH[0];
  5366. P<UDT$MSG> = P<MBFHDR> + 1;
  5367. IF MBF$WORD[0] NQ 0
  5368. THEN # LAST MESSAGE NOT PROCESSED #
  5369. BEGIN # CHECK #
  5370. IF MS$MSG[0] GQ HFC$MVLMVR # MOUNT-VOLUME #
  5371. AND MS$MSG[0] LQ HFC$MVLMNW
  5372. THEN # FORCED STORE ON DATA TRANSFER #
  5373. BEGIN # OK #
  5374. MBF$WORD[0] = 0; # PRESET HEADER #
  5375. MS$MSG[0] = HFC$STCRNF; # FORCE REWIND/UNLOAD #
  5376. END # OK #
  5377.  
  5378. ELSE # SOFTWARE ERROR #
  5379. BEGIN # ABORT #
  5380. FE$RTN[0] = "STRCART1.";
  5381. GOTO STRCART2;
  5382. END # ABORT #
  5383.  
  5384. END # CHECK #
  5385.  
  5386. ELSE # ISSUE NORMAL STORE #
  5387. BEGIN # OK #
  5388. MS$MSG[0] = HFC$STCRNV;
  5389. END # OK #
  5390.  
  5391. MBF$SAVE[0] = SAVEMOST;
  5392. LLR$RS[0] = PROCST"CONT1";
  5393.  
  5394. #
  5395. * ISSUE M860 MESSAGE TO STORE CARTRIDGE.
  5396. #
  5397.  
  5398. STRCUBE:
  5399. P<MBFHDR> = LLR$MBH[0];
  5400. SENDMSG; # SEND M860 MESSAGE #
  5401. IF MBF$SBADDR[0] EQ 0 ##
  5402. AND LLR$DR[0] EQ RESPTYP4"OK4" # GOOD HARDWARE #
  5403. THEN # RESPONSE NOT YET RECEIVED #
  5404. BEGIN # RETRY #
  5405. RETURN;
  5406. END # RETRY #
  5407.  
  5408. IF MS$RETCODE[0] EQ HRC$CSNERR # CSN/DRD IN USE #
  5409. AND MS$MSG[0] EQ HFC$STCRNV # NORMAL STORE #
  5410. THEN # MAY BE *ACQUIRE* ERROR RCVY #
  5411. BEGIN # CHECK #
  5412. IF NOT LLR$LDERR[0]
  5413. THEN # DRIVER ERROR #
  5414. BEGIN # ABORT #
  5415. FE$RTN[0] = "STRCART2.";
  5416. GOTO STRCART2;
  5417. END # ABORT #
  5418.  
  5419. ELSE # CARTRIDGE HAD LOADED OK #
  5420. BEGIN # IGNORE #
  5421. MS$RETCODE[0] = 0; # DRD IN USE BY THIS LLRQ #
  5422. END # IGNORE #
  5423.  
  5424. END # CHECK #
  5425.  
  5426. SM$ACCBUSY[LLR$SMO[0]] = FALSE;# SM ARM NOT IN USE #
  5427. IF LLR$DR[0] EQ RESPTYP4"M86$HDW$PR"
  5428. THEN # HARDWARE PROBLEM #
  5429. BEGIN # EXIT #
  5430. IF LLR$SDR[0] EQ 0
  5431. THEN # SAVE THIS ERROR FOR EXEC #
  5432. BEGIN # SAVE #
  5433. LLR$SDR[0] = LLR$DR[0];
  5434. END # SAVE #
  5435.  
  5436. GOTO STRCART3; # ASSUME CARTRIDGE NOT STORED #
  5437. END # EXIT #
  5438.  
  5439. IF MS$RETCODE[0] EQ HRC$CSNERR # FORCED STORE VOLUME UNLOADED #
  5440. OR (MS$RETCODE[0] EQ 0 # NO M860 ERROR #
  5441. AND ((LLR$RQI[0] EQ REQNAME"RQILABL" # SSLABEL HANDLES EJECTS #
  5442. AND NOT LLR$UCPABT[0]) # SSLABEL MUST BE UP #
  5443. OR LLR$Y[0] NQ SM$EXIT$TY # CARTRIDGE NOT EJECTED #
  5444. OR LLR$Z[0] NQ SM$TY$Z))
  5445. THEN # DO NOT ISSUE K-DISPLAY MSG #
  5446. BEGIN # MATRIX #
  5447. GOTO STRCART3;
  5448. END # MATRIX #
  5449.  
  5450. IF MS$RETCODE[0] EQ HRC$CELEMP # CELL FULL #
  5451. AND NOT (LLR$Y[0] EQ SM$EXIT$TY # NOT OUTPUT TRAY FULL #
  5452. AND LLR$Z[0] EQ SM$TY$Z)
  5453. THEN # TURN SM OFF IN UDT #
  5454. BEGIN # OFF #
  5455. P<PTHSTAT> = LOC(SM$STS[LLR$SMO[0]]);
  5456. SMST = SMST1; # ASSUME 2ND CU #
  5457. IF LLR$CU[0] EQ SM$CUO0[LLR$SMO[0]]
  5458. THEN # RESET INDEX TO 1ST CU #
  5459. BEGIN # RESET #
  5460. SMST = SMST0;
  5461. END # RESET #
  5462.  
  5463. PATHBIT(SMST,PATH$DF"U$ON") = OFF;
  5464.  
  5465. CONTROL REACTIVE;
  5466.  
  5467. SM$FLAG[LLR$SMO[0]] = SM$STS0[LLR$SMO[0]] LOR # RESET GLOBALS #
  5468. SM$STS1[LLR$SMO[0]];
  5469.  
  5470. CONTROL INERT;
  5471.  
  5472. END # OFF #
  5473.  
  5474. #
  5475. * ISSUE A K-DISPLAY MESSAGE INFORMING THE OPERATOR THAT
  5476. * EITHER A CARTRIDGE WAS EJECTED, THE OUTPUT TRAY WAS
  5477. * FULL, OR A MATRIX CELL WAS FULL.
  5478. #
  5479.  
  5480. P<KWORD> = LOC(LLR$KWORDS[0]);
  5481. KW$WORD[0] = 0;
  5482. KW$LINE1[0] = KM"KM2"; # PRESET MESSAGE ORDINALS #
  5483. KW$LINE2[0] = KM"KM9"; # ASSUME CARTRIDGE EJECTED #
  5484. KW$IC[0] = TRUE; # SET IMMEDIATE COMPLETION #
  5485. KW$DF[0] = TRUE; # ISSUE TO JOB DAYFILE #
  5486. IF LLR$CSNT[0] NQ 0 # *TDAM* REQUEST #
  5487. AND (LLR$SDR[0] EQ RESPTYP4"UNK$CART" # UNEXPECTED LABEL #
  5488. OR LLR$SDR[0] EQ RESPTYP4"CART$LB$ERR")
  5489. THEN # INDICATE LABEL ERROR IN MESSAGE #
  5490. BEGIN # RESET #
  5491. KW$LINE2[0] = KM"KM8";
  5492. KW$LINE3[0] = KM"KM9"; # CARTRIDGE EJECTED #
  5493. END # RESET #
  5494.  
  5495. IF MS$RETCODE[0] EQ HRC$CELEMP
  5496. THEN # CELL WAS FULL #
  5497. BEGIN # FULL #
  5498. KW$LINE2[0] = KM"KM11"; # ASSUME MATRIX CELL FULL #
  5499. KW$LINE3[0] = KM"KM16"; # SM TURNED OFF #
  5500. IF LLR$Y[0] EQ SM$EXIT$TY ##
  5501. AND LLR$Z[0] EQ SM$TY$Z
  5502. THEN # OUTPUT TRAY IS FULL #
  5503. BEGIN # TRAY #
  5504. KW$LINE2[0] = KM"KM19";
  5505. KW$LINE3[0] = 0; # SM LEFT ON #
  5506. KW$IC[0] = FALSE; # WAIT FOR OPERATOR RESPONSE #
  5507. KW$DF[0] = FALSE;
  5508. END # TRAY #
  5509.  
  5510. END # FULL #
  5511.  
  5512. KW$RPGO[0] = TRUE; # ALLOW GO RESPONSE #
  5513. KP$EQ = UD$ESTO[LLR$CU[0]]; # PRESET MESSAGE PARAMETERS #
  5514. P<MWBTMP> = LOC(UD$CAMF[LLR$CU[0]]); # LOCATE READ FET #
  5515. P<FETMWB> = MWB$ADDR[LLR$CIF[0]];
  5516. P<FETMRA> = P<FETMWB> - 1;
  5517. P<FETMRB> = FRA$MRBADR[0];
  5518. KP$CN = FMR$CHAN[0];
  5519. KP$DT = SM$ID[LLR$SMO[0]];
  5520. KP$YA = LLR$Y[0]; # SET FULL CELL #
  5521. KP$ZA = LLR$Z[0];
  5522. KREQ(LOC(KWORD),KLINK); # SEND K-DISPLAY REQUEST #
  5523.  
  5524. STRCART3:
  5525. IF MS$RETCODE[0] EQ HRC$CSNERR # RETRY FORCED AS NORMAL STORE #
  5526. OR LLR$LDERR[0] # RCVY FROM *ACQ* ERROR #
  5527. OR LLR$CSNT[0] EQ 0 # ERROR RELATED TO UTILITY #
  5528. THEN # BUFFERED LOG NOT NEEDED #
  5529. BEGIN # SKIP #
  5530. GOTO STRCART5;
  5531. END # SKIP #
  5532.  
  5533. IF KW$LINE2[0] EQ KM"KM19" # OUTPUT TRAY FULL #
  5534. AND NOT KW$COMP[0]
  5535. THEN # RETRY STORE REQUEST #
  5536. BEGIN # EXIT #
  5537. GOTO STRCART4;
  5538. END # EXIT #
  5539.  
  5540. IF LLR$DR[0] EQ RESPTYP4"M86$HDW$PR"
  5541. THEN # BUFFERED LOG NOT NEEDED #
  5542. BEGIN # SKIP #
  5543. GOTO STRCART5; # TREAT DRD AS FULL #
  5544. END # SKIP #
  5545.  
  5546. IF MBF$SBADDR[0] NQ 0
  5547. THEN # CLEAR SBT ENTRY #
  5548. BEGIN # CLEAR #
  5549. P<UDT$MSG> = MBF$SBADDR[0];
  5550. ZFILL(UDT$MSG,MSGLT);
  5551. END # CLEAR #
  5552.  
  5553. MBF$WORD[0] = 0; # CLEAR MESSAGE STATUS #
  5554. MBF$SAVE[0] = SAVEPART;
  5555. P<UDT$MSG> = P<MBFHDR> + 1;
  5556. MS$MSG[0] = HFC$DBLD0; # SET *DUMP BUF LOG* FUNCTION #
  5557. LLR$RS[0] = PROCST"CONT2";
  5558.  
  5559. #
  5560. * ISSUE M860 MESSAGE TO DUMP BUFFERED LOG.
  5561. #
  5562.  
  5563. STRBUFL:
  5564. P<MBFHDR> = LLR$MBH[0];
  5565. SENDMSG; # SEND M860 MESSAGE #
  5566. IF MBF$SBADDR[0] EQ 0 ##
  5567. AND LLR$DR[0] EQ RESPTYP4"OK4"
  5568. THEN # RESPONSE NOT YET RECEIVED #
  5569. BEGIN # RETRY #
  5570. RETURN;
  5571. END # RETRY #
  5572.  
  5573. LLR$DR[0] = RESPTYP4"OK4"; # DO NOT RETURN ERRORS #
  5574.  
  5575. #
  5576. * TURN OFF THE DRD IF AN M860 RESPONSE TO
  5577. * A DRD MESSAGE WAS A DEVICE DRIVER ERROR, OR THE RESPONSE
  5578. * TIMED OUT.
  5579. #
  5580.  
  5581. STRCART5:
  5582. IF MS$RETCODE[0] EQ HRC$CSNERR # RETRY AS NORMAL STORE FIRST #
  5583. OR NOT LLR$DRFUL[0]
  5584. THEN # DO NOT TURN OFF DRD #
  5585. BEGIN # OK #
  5586. GOTO STRCART4;
  5587. END # OK #
  5588.  
  5589. #
  5590. * DECIDE IF RETRY COUNT AND RETRY TIME JUSTIFY TURNING DRD OFF.
  5591. #
  5592.  
  5593. P<MWBTMP> = LOC(UD$CAMF[LLR$SCU[0]]); # LOCATE BAD CHAN FETS #
  5594. P<FETMWB> = MWB$ADDR[LLR$SCIF[0]];
  5595. P<FETMRA> = P<FETMWB> - 1;
  5596. P<FETMRB> = FRA$MRBADR[0];
  5597. IF FMW$ERROR[0] # ORIGINALLY A CHANNEL ERROR #
  5598. THEN # RETRY CNT ALREADY INCREMENTED #
  5599. BEGIN # CLEAR #
  5600. FMW$ERROR[0] = FALSE; # IN CASE OF ANOTHER CHAN ERR #
  5601. END # CLEAR #
  5602.  
  5603. ELSE # ONLY A DRD ERROR #
  5604. BEGIN # BUMP #
  5605. FMW$RCNT[0] = FMW$RCNT[0] + 1; # RECORD ERROR #
  5606. END # BUMP #
  5607.  
  5608. RTIME(RTIMESTAT);
  5609. IF (FMW$RCNT[0] EQ 1 # START OF ERROR SEQUENCE #
  5610. AND FMW$RCNT[0] LS MAXCHERR) ##
  5611. OR (FMW$RCNT[0] GR 1 # RETRY TIME EXPIRED #
  5612. AND RTIMSECS[0] GQ FMW$RTIME[0])
  5613. THEN # RESET CHAN FOR NEW INTERVAL #
  5614. BEGIN # RESET #
  5615. FMW$RCNT[0] = 1; # IN CASE INTERVAL EXPIRED #
  5616. FMW$RTIME[0] = RTIMSECS[0] + MAXCHERRTM; # RESET RETRY TIME #
  5617. END # RESET #
  5618.  
  5619. IF LLR$DR[0] EQ RESPTYP4"M86$HDW$PR"
  5620. THEN # DRD CANNOT BE REUSED #
  5621. BEGIN # OFF #
  5622. FMW$RCNT[0] = MAXCHERR; # 7990 WOULD ABORT A RE-ACQUIRE #
  5623. END # OFF #
  5624.  
  5625. IF (FMW$RCNT[0] GR 1 ##
  5626. AND FMW$RCNT[0] GQ MAXCHERR ##
  5627. AND RTIMSECS[0] GQ FMW$RTIME[0]) # ERROR SEQUENCE EXPIRED #
  5628. OR FMW$RCNT[0] LS MAXCHERR # SEQUENCE NOT COMPLETE #
  5629. THEN # DRD NOT READY TO BE TURNED OFF #
  5630. BEGIN # ON #
  5631. GOTO STRCART4; # SKIP TURNING OFF DRD #
  5632. END # ON #
  5633.  
  5634. FMW$RCNT[0] = 0; # PRESET IN CASE OF MORE ERRORS #
  5635.  
  5636. #
  5637. * PRESET UDT TO TURN OFF DRD.
  5638. #
  5639.  
  5640. DRVRACTIVE = TRUE; # IN CASE DRD MSG TIMED OUT #
  5641. P<PTHSTAT> = LOC(D1$ST[LLR$SMO[0]]); # ASSUME LOWER DRD #
  5642. IF LLR$DRD[0] EQ 0
  5643. THEN # UPPER DRD GOING OFF #
  5644. BEGIN # RESET #
  5645. P<PTHSTAT> = LOC(D0$ST[LLR$SMO[0]]);
  5646. END # RESET #
  5647.  
  5648. DRST = DRST1; # ASSUME 2ND CU #
  5649. IF LLR$CU[0] EQ SM$CUO0[LLR$SMO[0]]
  5650. THEN # RESET DRD INDEX TO 1ST CU #
  5651. BEGIN # RESET #
  5652. DRST = DRST0;
  5653. END # RESET #
  5654.  
  5655. PATHBIT(DRST,PATH$DF"U$ON") = OFF;
  5656. PATHBIT(DRST,PATH$DF"U$CU$ACK") = ON;
  5657. PATHBIT(DRST,PATH$DF"U$DONE") = OFF;
  5658.  
  5659. CONTROL REACTIVE;
  5660.  
  5661. IF LLR$DRD[0] EQ 0
  5662. THEN # STOP LOADS TO UPPER DRD #
  5663. BEGIN # DRD 0 #
  5664. D0$FLAG[LLR$SMO[0]] = D0$STSP[LLR$SMO[0]] LOR
  5665. D0$STSS[LLR$SMO[0]];
  5666. END # DRD 0 #
  5667.  
  5668. ELSE # STOP LOADS TO LOWER DRD #
  5669. BEGIN # DRD 1 #
  5670. D1$FLAG[LLR$SMO[0]] = D1$STSP[LLR$SMO[0]] LOR
  5671. D1$STSS[LLR$SMO[0]];
  5672. END # DRD 1 #
  5673.  
  5674. CONTROL INERT;
  5675.  
  5676. LLR$SSD[0] = LLR$D$SMO[0]; # SAVE SM/DRD ORDINALS #
  5677. LLR$RS[0] = PROCST"CONT3";
  5678. RETURN;
  5679.  
  5680. #
  5681. * ISSUE A K-DISPLAY MESSAGE STATING THAT THE DRD WAS
  5682. * TURNED OFF.
  5683. #
  5684.  
  5685. STRDRDO:
  5686. P<MBFHDR> = LLR$MBH[0];
  5687. P<UDT$MSG> = P<MBFHDR> + 1;
  5688. LLR$D$SMO[0] = LLR$SSD[0]; # RESTORE SM/DRD ORDINALS #
  5689. P<KWORD> = LOC(LLR$KWORDS[0]);
  5690. KW$WORD[0] = 0;
  5691. KW$LINE1[0] = KM"KM3"; # PRESET MESSAGE ORDINALS #
  5692. KW$LINE2[0] = KM"KM16";
  5693. KW$IC[0] = TRUE; # SET IMMEDIATE COMPLETION #
  5694. KW$DF[0] = TRUE; # SEND TO JOB DAYFILE #
  5695. KW$RPGO[0] = TRUE; # ALLOW GO RESPONSE #
  5696. KP$EQ = UD$ESTO[LLR$CU[0]]; # PRESET MESSAGE PARAMETERS #
  5697. P<MWBTMP> = LOC(UD$CAMF[LLR$CU[0]]); # LOCATE READ FET #
  5698. P<FETMWB> = MWB$ADDR[LLR$CIF[0]];
  5699. P<FETMRA> = P<FETMWB> - 1;
  5700. P<FETMRB> = FRA$MRBADR[0];
  5701. KP$CN = FMR$CHAN[0];
  5702. KP$DT = SM$ID[LLR$SMO[0]];
  5703. KP$ID = D1$SUN[LLR$SMO[0]]; # ASSUME LOWER DRD #
  5704. IF LLR$DRD[0] EQ 0
  5705. THEN # LOWER DRD HAD ERROR #
  5706. BEGIN # RESET #
  5707. KP$ID = D0$SUN[LLR$SMO[0]];
  5708. END # RESET #
  5709.  
  5710. KREQ(LOC(KWORD),KLINK); # SEND K-DISPLAY REQUEST #
  5711.  
  5712. STRCART4:
  5713. IF LLR$DRD[0] EQ 0
  5714. THEN # UPPER DRD EMPTY #
  5715. BEGIN # CLEAR #
  5716. D0$FULL[LLR$SMO[0]] = FALSE;
  5717. END # CLEAR #
  5718.  
  5719. ELSE # LOWER DRD EMPTY #
  5720. BEGIN # CLEAR #
  5721. D1$FULL[LLR$SMO[0]] = FALSE;
  5722. END # CLEAR #
  5723.  
  5724. IF LLR$SDR[0] NQ 0
  5725. THEN # RESTORE ORIGINAL ERROR FOR EXEC #
  5726. BEGIN # RESET #
  5727. LLR$DR[0] = LLR$SDR[0];
  5728. END # RESET #
  5729.  
  5730. IF LLR$PRCNME[0] EQ REQTYP4"INITHW"
  5731. THEN # CLEAR SO UDT SCAN CAN FINISH #
  5732. BEGIN # CLEAR #
  5733. IF MS$RETCODE[0] NQ HRC$CSNERR # DRD NOT YET OFF #
  5734. THEN # NOT RETRYING AS NORMAL STORE #
  5735. BEGIN # OFF #
  5736. LLR$DRFUL[0] = FALSE;
  5737. END # OFF #
  5738.  
  5739. LLR$DRDOFF[0] = FALSE;
  5740. LLR$LDERR[0] = FALSE; # IN CASE LOAD ERROR OCCURRED #
  5741. END # CLEAR #
  5742.  
  5743. LLR$RS[0] = PROCST"COMPLETE";
  5744. IF MS$RETCODE[0] EQ HRC$CSNERR # RETRY AS NORMAL STORE #
  5745. OR (KW$LINE2[0] EQ KM"KM19" # RETRY STORE TO OUTPUT TRAY #
  5746. AND NOT KW$COMP[0])
  5747. THEN # RETRY STORING CARTRIDGE #
  5748. BEGIN # RETRY #
  5749. LLR$RS[0] = PROCST"INITIAL";
  5750. END # RETRY #
  5751.  
  5752. IF MBF$SBADDR[0] NQ 0
  5753. THEN # CLEAR SBT ENTRY #
  5754. BEGIN # CLEAR #
  5755. P<UDT$MSG> = MBF$SBADDR[0];
  5756. ZFILL(UDT$MSG,MSGLT);
  5757. END # CLEAR #
  5758.  
  5759. MBF$WORD[0] = 0; # CLEAR MESSAGE STATUS #
  5760. RETURN;
  5761.  
  5762. STRCART2:
  5763. MESSAGE(FEMSG,UDFL1);
  5764. ABORT;
  5765. END # STRCART #
  5766.  
  5767. TERM
  5768. PROC XFRDATA;
  5769. # TITLE XFRDATA - TRANSFER DATA TO/FROM M860. #
  5770.  
  5771. BEGIN # XFRDATA #
  5772.  
  5773. #
  5774. ** XFRDATA - TRANSFER DATA TO/FROM M860.
  5775. *
  5776. * *XFRDATA* PROCESSES *DRQUEUE* REQUESTS TO MOUNT AND UNLOAD
  5777. * VOLUMES, AND INITIATES DATA TRANSFERS BETWEEN *SSEXEC* AND THE
  5778. * M860 HARDWARE.
  5779. *
  5780. * PROC XFRDATA
  5781. *
  5782. * ENTRY P<LLRQ> = *DRQUEUE* ENTRY ADDRESS.
  5783. *
  5784. * EXIT THE *DRQUEUE* ENTRY REQUEST STATE FIELD HAS BEEN
  5785. * UPDATED TO INDICATE WHERE SUBSEQUENT PROCESSING OF
  5786. * THIS REQUEST IS TO CONTINUE.
  5787. *
  5788. * MESSAGES *EXEC ABNORMAL, XFRDATA1.* - UDT MESSAGE BUFFER STILL
  5789. * IN USE.
  5790. *
  5791. * *EXEC ABNORMAL, XFRDATA2.* - FATAL ERROR RECEIVED IN
  5792. * M860 *MOUNT VOLUME*
  5793. * RESPONSE.
  5794. *
  5795. * NOTES THIS IS A PSEUDO-REENTRANT PROCEDURE.
  5796. #
  5797.  
  5798.  
  5799. #
  5800. **** PROC XFRDATA - XREF LIST BEGIN.
  5801. #
  5802.  
  5803. XREF
  5804. BEGIN
  5805. PROC ABORT; # ABORT #
  5806. PROC CALLPP; # PASS MESSAGES/DATA TO PP #
  5807. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  5808. PROC RTIME; # GET TIME SINCE DEADSTART #
  5809. PROC SENDMSG; # SEND M860 MESSAGE #
  5810. PROC ZFILL; # ZERO-FILL BUFFER #
  5811. END
  5812.  
  5813. #
  5814. **** PROC XFRDATA - XREF LIST END.
  5815. #
  5816.  
  5817. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  5818. *CALL,COMBFAS
  5819. *CALL,COMBCDD
  5820. *CALL COMBCPR
  5821. *CALL,COMBFET
  5822. *CALL,COMBHFC
  5823. *CALL,COMBLRQ
  5824. *CALL,COMBUDT
  5825. *CALL,COMXMSC
  5826.  
  5827. ITEM I I; # INDEX #
  5828.  
  5829. SWITCH XFRLBL:PROCST # DRIVER REQUEST STATE #
  5830. XFRINIT:INITIAL, # INITIAL STATE #
  5831. XFRMNVL:CONT1, # CONTINUATION 1 #
  5832. XFRPDAT:CONT2, # CONTINUATION 2 #
  5833. XFRINCR:CONT3, # CONTINUATION 3 #
  5834. XFRUNLD:CONT4, # CONTINUATION 4 #
  5835. XFRRESP:CONT5; # CONTINUATION 5 #
  5836. CONTROL EJECT;
  5837.  
  5838. GOTO XFRLBL[LLR$RS[0]];
  5839.  
  5840. #
  5841. * INITIAL DRIVER REQUEST STATE.
  5842. #
  5843.  
  5844. XFRINIT:
  5845. P<MBFHDR> = LLR$MBH[0];
  5846. IF MBF$WORD[0] NQ 0
  5847. THEN # DRD STILL IN USE #
  5848. BEGIN # ABORT #
  5849. FE$RTN[0] = "XFRDATA1.";
  5850. GOTO XFRDATA1;
  5851. END # ABORT #
  5852.  
  5853. P<UDT$MSG> = P<MBFHDR> + 1;
  5854. MBF$SAVE[0] = SAVEMOST;
  5855. MS$MSG[0] = HFC$MVLMVR; # ASSUME READING DATA #
  5856. LLR$RS[0] = PROCST"CONT1";
  5857.  
  5858. #
  5859. * ISSUE M860 MESSAGE TO MOUNT VOLUME.
  5860. #
  5861.  
  5862. XFRMNVL:
  5863. P<FETFHB> = LLR$MSFET[0];
  5864. FHB$UNIT[0] = D1$SUN[LLR$SMO[0]];
  5865. IF LLR$DRD[0] EQ 0
  5866. THEN # UPPER DRD BEING USED #
  5867. BEGIN # RESET #
  5868. FHB$UNIT[0] = D0$SUN[LLR$SMO[0]];
  5869. END # RESET #
  5870.  
  5871. P<MBFHDR> = LLR$MBH[0];
  5872. SENDMSG; # SEND M860 MESSAGE #
  5873. IF LLR$DR[0] EQ RESPTYP4"M86$HDW$PR"
  5874. THEN # HARDWARE PROBLEM #
  5875. BEGIN # EXIT #
  5876. IF MS$INTER[0] NQ 0 # CIF SELECTED #
  5877. THEN # DATA TRANSFER STOPPED #
  5878. BEGIN # NO DATA #
  5879. B<LLR$CIF[0],1>UD$DBACT[LLR$CU[0]] = OFF;
  5880. END # NO DATA #
  5881.  
  5882. IF MBF$SENT[0]
  5883. THEN # IGNORE RESPONSES #
  5884. BEGIN # IGNORE #
  5885. MSGCNT(LLR$CIF[0],LLR$CU[0]) = MSGCNT(LLR$CIF[0],LLR$CU[0])-1;
  5886. # COUNT INCLUDED REWIND/UNLOAD #
  5887. END # IGNORE #
  5888.  
  5889. GOTO XFRDATA2;
  5890. END # EXIT #
  5891.  
  5892. IF MBF$SBADDR[0] EQ 0
  5893. THEN # RESPONSE NOT YET RECEIVED #
  5894. BEGIN # RETRY #
  5895. RETURN;
  5896. END # RETRY #
  5897.  
  5898. IF MS$RETCODE[0] NQ 0
  5899. THEN # SOFTWARE ERROR #
  5900. BEGIN # ABORT #
  5901. FE$RTN[0] = "XFRDATA2.";
  5902. GOTO XFRDATA1;
  5903. END # ABORT #
  5904.  
  5905. ZFILL(UDT$MSG,MSGLT); # CLEAR STORAGE BUFFER #
  5906. MBF$SBADDR[0] = 0; # CLEAR SBT ENTRY ADDRESS #
  5907. MBF$TMOUT[0] = 0; # CLEAR MESSAGE TIMEOUT #
  5908. LLR$RS[0] = PROCST"CONT2";
  5909.  
  5910. #
  5911. * PASS DATA BUFFER ADDRESS TO PP TO START DATA TRANSFER.
  5912. #
  5913.  
  5914. XFRPDAT:
  5915. P<MBFHDR> = LLR$MBH[0];
  5916. P<UDT$MSG> = P<MBFHDR> + 1;
  5917. CALLPP(IRMDAT);
  5918. IF LLR$DR[0] EQ RESPTYP4"M86$HDW$PR"
  5919. THEN # HARDWARE PROBLEM #
  5920. BEGIN # EXIT #
  5921. GOTO XFRDATA2;
  5922. END # EXIT #
  5923.  
  5924. IF B<FMR$CIF[0],1>UD$DBACT[LLR$CU[0]] EQ ON ##
  5925. AND P<FETMWB> NQ 0 # CHANNEL WAS ALLOCATED #
  5926. THEN # DATA TRANSFER STARTED #
  5927. BEGIN # RETRY #
  5928. LLR$RS[0] = PROCST"COMPLETE";# RETURN WHEN COPY COMPLETE #
  5929. END # RETRY #
  5930.  
  5931. RETURN;
  5932.  
  5933. #
  5934. * AWAIT M860-INITIATED UNLOAD MESSAGE.
  5935. #
  5936.  
  5937. XFRINCR:
  5938. SLOWFOR I = 1 STEP 1 UNTIL PPCBTSIZE
  5939. DO # NOTE DATA TRANSFER COMPLETE #
  5940. BEGIN # SCAN #
  5941. IF LLR$MSFET[0] EQ PPU$DBADDR[I]
  5942. THEN # REMOVE ADDRESS #
  5943. BEGIN # CLEAR #
  5944. PPU$DBADDR[I] = 0;
  5945. B<LLR$CIF[0],1>UD$DBACT[LLR$CU[0]] = OFF;
  5946. # FREE PP FOR NEXT DATA XFER #
  5947. END # CLEAR #
  5948.  
  5949. END # SCAN #
  5950.  
  5951. IF LLR$DRFUL[0]
  5952. THEN # DATA TRANSFER ERROR #
  5953. BEGIN # EXIT #
  5954. LLR$SCIF[0] = LLR$CIF[0]; # SAVE TO DECIDE IF DRD GOES OFF #
  5955. LLR$SCU[0] = LLR$CU[0];
  5956. MSGCNT(LLR$CIF[0],LLR$CU[0]) = MSGCNT(LLR$CIF[0],LLR$CU[0])-1;
  5957. GOTO XFRDATA2; # DO NOT EXPECT REWIND/UNLOAD #
  5958. END # EXIT #
  5959.  
  5960. RTIME(RTIMESTAT); # RESET MESSAGE TIMEOUT #
  5961. P<MBFHDR> = LLR$MBH[0];
  5962. MBF$TMOUT[0] = RTIMSECS[0];
  5963. LLR$RS[0] = PROCST"CONT4";
  5964.  
  5965. XFRUNLD:
  5966. P<MBFHDR> = LLR$MBH[0];
  5967. SENDMSG; # AWAIT UNLOAD MESSAGE #
  5968. IF LLR$DR[0] EQ RESPTYP4"M86$HDW$PR"
  5969. THEN # RESPONSE TIMED OUT #
  5970. BEGIN # EXIT #
  5971. GOTO XFRDATA2;
  5972. END # EXIT #
  5973.  
  5974. IF MBF$SBADDR[0] EQ 0
  5975. THEN # MESSAGE NOT YET RECEIVED #
  5976. BEGIN # RETRY #
  5977. RETURN;
  5978. END # RETRY #
  5979.  
  5980. IF LLR$PRCNME[0] EQ REQTYP4"CPY$DA" # VOLUME DESTAGE #
  5981. THEN # RETURN STATISTICS #
  5982. BEGIN # STATS #
  5983. LLR$LT$ST[0] = MS$PARM1A[0]; # LAST STRIPE WRITTEN #
  5984. LLR$LOG$ST[0] = MS$PARM2[0]; # LOGICAL STRIPE POSITION #
  5985. END # STATS #
  5986.  
  5987. MBF$SENT[0] = FALSE;
  5988. MS$MSG$R[0] = TRUE; # SET AS UNLOAD RESPONSE #
  5989. LLR$RS[0] = PROCST"CONT5";
  5990.  
  5991. #
  5992. * ISSUE RESPONSE TO M860-INITIATED UNLOAD MESSAGE.
  5993. #
  5994.  
  5995. XFRRESP:
  5996. P<MBFHDR> = LLR$MBH[0];
  5997. SENDMSG; # SEND UNLOAD RESPONSE #
  5998. IF LLR$DR[0] EQ RESPTYP4"OK4" # HARDWARE GOOD #
  5999. AND NOT MBF$SENT[0]
  6000. THEN # RESPONSE NOT YET SENT #
  6001. BEGIN # RETRY #
  6002. RETURN;
  6003. END # RETRY #
  6004.  
  6005. XFRDATA2:
  6006. IF MBF$SBADDR[0] NQ 0
  6007. THEN # CLEAR SBT ENTRY #
  6008. BEGIN # CLEAR #
  6009. P<UDT$MSG> = MBF$SBADDR[0];
  6010. ZFILL(UDT$MSG,MSGLT);
  6011. END # CLEAR #
  6012.  
  6013. IF NOT LLR$DRFUL[0]
  6014. THEN # DO NOT ISSUE FORCED-STORE #
  6015. BEGIN # NORMAL #
  6016. MBF$WORD[0] = 0; # STOP *STRCART* FROM FORCING #
  6017. END # NORMAL #
  6018.  
  6019. LLR$RS[0] = PROCST"COMPLETE";
  6020. RETURN;
  6021.  
  6022. XFRDATA1:
  6023. MESSAGE(FEMSG,UDFL1);
  6024. ABORT;
  6025. END # XFRDATA #
  6026.  
  6027. TERM
1)
FCODE
2)
CO
3)
FETTYPE
4)
FNCODE
5)
CBORD
cdc/nos2.source/opl871/exdrvr.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator