User Tools

Site Tools


cdc:nos2.source:opl871:sxllr

Table of Contents

SXLLR

Table Of Contents

  • [00001] PROC L
  • [00002] L - LOW LEVEL REQUEST PROCESSOR DOCUMENTATION.
  • [00060] PROC CPY$DS1)
  • [00061] CPY$DS - COPY DISK TO VOLUME.
  • [00066] CPY$DS - COPY DISK TO VOLUME.
  • [00105] PROC ADD$LNK
  • [00106] PROC GETBUF
  • [00107] PROC RLSBUF
  • [00108] PROC READCW
  • [00109] PROC SETFET
  • [00260] PROC CPY$RS2)
  • [00261] CPY$RS - COPY RAW VOLUME.
  • [00266] CPY$RS - COPY RAW VOLUME.
  • [00304] PROC ABORT
  • [00305] PROC ADD$LNK
  • [00306] PROC DELAY
  • [00307] PROC GETBUF
  • [00308] PROC MESSAGE
  • [00309] PROC PFD
  • [00310] PROC RETERN
  • [00311] PROC RLSBUF
  • [00312] PROC SETFET
  • [00313] PROC SETPFP
  • [00314] PROC SFCALL
  • [00315] PROC SKIPEI
  • [00316] PROC UCP$RESP
  • [00317] PROC WRITE
  • [00318] PROC WRITER
  • [00580] PROC CPY$SD3)
  • [00581] CPY$SD - COPY VOLUME TO DISK.
  • [00586] CPY$SD - COPY VOLUME TO DISK.
  • [00624] PROC ADD$LNK
  • [00625] PROC GETBUF
  • [00626] PROC RLSBUF
  • [00627] PROC SETFET
  • [00797] PROC INIT$HW4)
  • [00798] INIT$HW - INITIALIZE M860 HARDWARE.
  • [00803] INIT$HW - INITIALIZE M860 HARDWARE.
  • [00835] PROC ABORT
  • [00836] PROC ADD$LNK
  • [00837] PROC MESSAGE
  • [00838] PROC UCP$RES
  • [00952] PROC KCG
  • [00953] KCG - KEEP COPY GOING.
  • [00958] KCG - KEEP COPY GOING.
  • [01002] PROC ADD$LNK
  • [01003] PROC CALLPPU
  • [01004] PROC DEL$LNK
  • [01005] PROC READCW
  • [01006] PROC WRITECW
  • [01007] PROC K8G
  • [01008] PROC MESSAGE
  • [01218] PROC K8G5)
  • [01219] K8G - KEEP M860 COPY GOING.
  • [01224] K8G - KEEP M860 COPY GOING.
  • [01243] PROC ABORT
  • [01244] PROC FSCLOG
  • [01245] PROC MESSAGE
  • [01385] PROC LD$CAR6)
  • [01386] LD$CAR - LOAD CARTRIDGE.
  • [01391] LD$CAR - LOAD CARTRIDGE.
  • [01432] PROC ABORT
  • [01433] PROC ADD$LNK
  • [01434] PROC DELAY
  • [01435] PROC KILL$UC
  • [01436] PROC MESSAGE
  • [01437] PROC SFCALL
  • [01438] PROC UCP$RES
  • [01822] PROC LLRQENQ(ADDR)
  • [01823] LLRQENQ - LOW LEVEL REQUEST QUEUE ENQUEUER.
  • [01828] LLRQENQ - LOW LEVEL REQUEST QUEUE ENQUEUER.
  • [01849] PROC ABORT
  • [01850] PROC ADD$LNK
  • [01851] PROC DEL$LNK
  • [01852] PROC MESSAGE
  • [01892] PROC LLRQMTR
  • [01893] LLRQMTR - LOW LEVEL REQUEST QUEUE MONITOR.
  • [01898] LLRQMTR - LOW LEVEL REQUEST QUEUE MONITOR.
  • [01920] PROC ADD$LNK
  • [01921] PROC CPY$DS
  • [01922] PROC CPY$RS
  • [01923] PROC CPY$SD
  • [01924] PROC DEL$LNK
  • [01925] PROC INIT$HW
  • [01926] PROC LD$CAR
  • [01927] PROC SSDRVR
  • [01928] PROC UNL$CAR
  • [01929] PROC WT$LAB
  • [01930] PROC ZFILL
  • [02054] PROC UNL$CAR7)
  • [02055] UNL$CAR - RETURN CARTRIDGE TO MATRIX.
  • [02060] UNL$CAR - RETURN CARTRIDGE TO MATRIX.
  • [02102] PROC ADD$LNK
  • [02103] PROC UCP$RES
  • [02214] PROC SETFET(LLRADR)
  • [02215] SETFET - SETS LARGE BUFFER POINTERS
  • [02220] SETFET - SETS LARGE BUFFER POINTERS.
  • [02246] PROC ZFILL
  • [02247] PROC ZSETFET
  • [02301] PROC WT$LAB8)
  • [02302] WT$LAB - WRITE CARTRIDGE LABEL.
  • [02307] WT$LAB - WRITE CARTRIDGE LABEL.
  • [02349] PROC ABORT
  • [02350] PROC ADD$LNK
  • [02351] PROC DELAY
  • [02352] PROC KILL$UC
  • [02353] PROC MESSAGE
  • [02354] PROC SFCALL
  • [02355] PROC UCP$RES

Source Code

SXLLR.txt
  1. PROC L;
  2. # TITLE L - LOW LEVEL REQUEST PROCESSOR DOCUMENTATION. #
  3. BEGIN # L #
  4.  
  5. #
  6. **** LOW LEVEL REQUEST PROCESSORS.
  7. *
  8. * THE FOLLOWING PROCESSORS CONSTITUTE THE LOW LEVEL REQUEST
  9. * PROCESSORS:
  10. * CPY$DS
  11. * CPY$RS
  12. * CPY$SD
  13. * INIT$HW
  14. * LD$CAR
  15. * RD$LAB
  16. * TEST$YZ
  17. * UNL$CAR
  18. * WT$LAB
  19. *
  20. * THESE PROCESSORS ARE ALL CODED IN A SPECIAL WAY THAT IS TERMED
  21. * "PSEUDO-REENTRANT".
  22. *
  23. * WHEN A LOW LEVEL REQUEST PROCESSOR IS CALLED IT IS PASSED THE
  24. * ADDRESS OF AN *LLRQ* ENTRY (A REQUEST) WHICH IS READY FOR
  25. * FURTHER PROCESSING. ALL THE PARAMETERS THE PROCESSOR NEEDS FOR
  26. * ADVANCING THE REQUEST ARE CONTAINED IN THE *LLRQ* ENTRY. IN
  27. * PARTICULAR, THE PROCESS STATE FIELD (LLR$PS) TELLS THE PROCESSOR
  28. * WHERE IT LEFT OFF THE LAST TIME IT WAS PROCESSING THIS REQUEST,
  29. * AND THUS WHAT TO DO NEXT TO ADVANCE THE REQUEST.
  30. *
  31. * WHEN A LOW LEVEL REQUEST PROCESSOR REACHES A POINT WHERE IT
  32. * CANNOT CONTINUE ADVANCING THE REQUEST WITHOUT A LONG DELAY, IT
  33. * SETS UP SOME CONDITION THAT WILL EVENTUALLY GET THE REQUEST PUT
  34. * BACK ON THE *LLRQ* READY CHAIN, AND THEN DROPS OUT BY
  35. * 1) SETTING THE PROCESS STATE FIELD IN THE *LLRQ* ENTRY TO A
  36. * VALUE THAT WILL ALLOW THE PROCESSOR TO RESTART THE REQUEST
  37. * AT THE CORRECT POINT LATER, AND
  38. * 2) RETURNING CONTROL TO THE *LLRQ* MONITOR.
  39. *
  40. * WHEN A LOW LEVEL REQUEST PROCESSOR COMPLETES THE PROCESSING OF
  41. * A REQUEST, IT CAUSES THE ORIGINATOR OF THE REQUEST TO BE
  42. * NOTIFIED OF THE COMPLETION. IF THE REQUEST ORIGINATED FROM A
  43. * *UCP* THE NOTIFICATION IS DONE BY STORING THE RESPONSE CODE IN
  44. * THE LONG TERM CONNECT TABLE ENTRY FOR THE *UCP* AND THEN
  45. * CALLING *UCP$RES*. IF THE REQUEST ORIGINATED FROM A HIGH LEVEL
  46. * REQUEST PROCESSOR, THE NOTIFICATION IS DONE BY STORING THE
  47. * RESPONSE CODE IN THE *HLRQ* ENTRY FOR THE HIGH LEVEL REQUEST,
  48. * AND PUTTING THE *HLRQ* ENTRY ON THE *HLRQ* READY CHAIN.
  49. *
  50. * WHEN THE PROCESSOR HAS NOTIFIED THE ORIGINATOR, IT THEN SETS
  51. * PROCESS STATE FIELD IN THE *LLRQ* ENTRY TO "COMPLETE" AND
  52. * RETURNS CONTROL TO THE *LLRQ* MONITOR. THE MONITOR THEN ZEROES
  53. * OUT THE *LLRQ* ENTRY AND PUTS IT ON THE *LLRQ* FREE SPACE
  54. * CHAIN.
  55. #
  56.  
  57. END # L #
  58.  
  59. TERM
  60. PROC CPY$DS((LLRADR));
  61. # TITLE CPY$DS - COPY DISK TO VOLUME. #
  62.  
  63. BEGIN # CPY$DS #
  64.  
  65. #
  66. ** CPY$DS - COPY DISK TO VOLUME.
  67. *
  68. * *CPY$DS* COPIES THE DISK FILE (FROM ITS CURRENT POSITION) TO THE
  69. * VOLUME, UNTIL END OF VOLUME OR END OF FILE IS ENCOUNTERED.
  70. *
  71. * PROC CPY$DS((LLRADR))
  72. *
  73. * ENTRY (LLRADR) - ADDRESS OF *LLRQ* ENTRY FOR THE COPY
  74. * CONTAINING THE SMA-ID, YZ COORDINATES,
  75. * ADDRESS OF THE DISK AND M860 FET-S. THE
  76. * FET-S MUST BE INITIALIZED.
  77. *
  78. * EXIT THE PROCESS STATE FIELD IN THE *LLRQ* ENTRY HAS BEEN
  79. * ADVANCED TO INDICATE WHERE PROCESSING OF THIS REQUEST
  80. * LEFT OFF AND THUS WHAT TO DO NEXT TO ADVANCE THE
  81. * REQUEST. WHEN THE COPY IS COMPLETE AN ERROR RESPONSE
  82. * CODE IS RETURNED IN THE *HLRQ* ENTRY WHICH GENERATED
  83. * THE COPY REQUEST.
  84. * (HLR$RESP[0]) - ERROR RESPONSE CODE.
  85. * (VALUES DEFINED IN *COMBCPR*).
  86. * = RESPTYP4"OK4".
  87. * = RESPTYP4"UN$WRT$ERR".
  88. * = RESPTYP4"EX$WRT$ERR".
  89. * = RESPTYP4"M86$HDW$PR".
  90. * = RESPTYP4"RMS$FL$ERR".
  91. *
  92. * NOTES THIS MODULE IS A PSEUDO REENTRANT ROUTINE, CALLED ONLY
  93. * BY *DESTAGR* THRU THE *HLRQ* PROCESSOR.
  94. #
  95.  
  96. ITEM LLRADR U; # *LLRQ* ENTRY ADDRESS #
  97. ITEM STRPCT U; # NUMBER OF STRIPES #
  98.  
  99. #
  100. **** PROC CPY$DS - XREF LIST BEGIN.
  101. #
  102.  
  103. XREF
  104. BEGIN
  105. PROC ADD$LNK; # ADD ENTRY TO CHAIN #
  106. PROC GETBUF; # GET LARGE BUFFER #
  107. PROC RLSBUF; # RELASE LARGE BUFFER #
  108. PROC READCW; # READ WITH CONTROL WORDS #
  109. PROC SETFET; # INITIALIZE LARGE BUFFER #
  110. END
  111.  
  112. #
  113. **** PROC CPY$DS - XREF LIST END.
  114. #
  115.  
  116. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  117. *CALL COMBFAS
  118. *CALL COMBCDD
  119. *CALL COMBCHN
  120. *CALL COMBCPR
  121. *CALL COMBFET
  122. *CALL COMBLRQ
  123. *CALL COMBRCD
  124. *CALL COMXCCB
  125. *CALL COMXHLR
  126. *CALL COMXMSC
  127.  
  128. ITEM FLAG B; # FLAG #
  129.  
  130. SWITCH CDSENTR:PROCST # COPY DISK TO VOLUME ENTRIES #
  131. CDSINIT:INITIAL, # INITIAL ENTRY #
  132. CDS1:CONT1, # WAIT LARGE BUFFER #
  133. CDS2:CONT2, # DRIVER VOLUME RETURN #
  134. CDS3:CONT3; # DRIVER RETURN *REWIND/UNLOAD* #
  135. CONTROL EJECT;
  136.  
  137. P<LLRQ> = LLRADR;
  138. P<HLRQ> = LLR$UCPRA[0];
  139. GOTO CDSENTR[LLR$PRCST[0]];
  140.  
  141. #
  142. * "INITIAL" PROCESS STATE.
  143. #
  144.  
  145. CDSINIT: # SET UP COPY CONTROL BLOCK #
  146. GETBUF(LLRADR,HLRQIND,FLAG);
  147. IF NOT FLAG
  148. THEN # NO BUFFER AVAILABLE #
  149. BEGIN
  150. LLR$PRCST[0] = PROCST"CONT1"; # WAIT BUFFER ASSIGNMENT #
  151. ADD$LNK(LLRADR,LCHN"LL$LGBUF",0);
  152. RETURN;
  153. END
  154.  
  155. #
  156. * *CONT1* PROCESS STATE.
  157. #
  158.  
  159. CDS1:
  160. SETFET(LLRADR); # INITIALIZE,LARGE BUFFER #
  161. P<HLRQ> = LLR$UCPRA[0];
  162. P<LLRQ> = LLRADR;
  163. P<CCB> = LLR$CCB[0];
  164. P<FETSET> = LLR$DSKFET[0];
  165. P<FETFHB> = LLR$MSFET[0];
  166. CCBOPCODE[0] = CPYC"DISKAU";
  167. FET$RR[0] = HLR$PRU[0];
  168.  
  169. #
  170. * SET STRIPE INFORMATION IN LARGE BUFFER.
  171. #
  172.  
  173. FHB$TIME[0] = PDATEV;
  174. FHB$SMIF[0] = LLR$SMIF[0];
  175. FHB$CCSN[0] = HLR$CSNTCU[0];
  176. FHB$SHDWD[0] = HLR$FETMT[0];
  177. FHB$PCSN[0] = HLR$CSNTPS[0];
  178. FHB$PFC[0] = HLR$PFC[0];
  179. FHB$CODE[0] = FCCWW; # CONTROL WORD WRITE #
  180. READCW(FETSET[0],0,NRCL);
  181. LLR$RC[0] = REQCODE"SWRT$VOL"; # ISSUE WRITE VOLUME REQUEST #
  182. LLR$RS[0] = PROCST"INITIAL";
  183. ADD$LNK(CCBLLRQ[0],LCHN"DRQUEUE",0);
  184. LLR$PRCST[0] = PROCST"CONT2";
  185. RETURN;
  186.  
  187. #
  188. * *CONT2* PROCESS STATE.
  189. * CPU DRIVER RETURN FROM VOLUME MOUNT.
  190. #
  191.  
  192. CDS2: # PROCESS DRIVER RESPONSE #
  193. IF LLR$DR[0] NQ RESPTYP4"OK4"
  194. THEN
  195. BEGIN # PROCESS DRIVER ERROR RETURN CODE #
  196. IF LLR$DR[0] EQ RESPTYP4"UN$WRT$ERR"
  197. THEN
  198. BEGIN # UNRECOVERED WRITE ERROR #
  199. HLR$AUUD[0] = (LLR$ST$LW[0] - INFTST) / INSPAU + 1;
  200. HLR$HRDE[0] = HLR$HRDE[0] + 1; # SET WRITE ERROR #
  201. END # WRITE ERROR #
  202. GOTO CONT;
  203. END
  204.  
  205. ADD$LNK(LLR$CCB[0],LCHN"KC$GOING",0);
  206. LLR$PRCST[0] = PROCST"CONT3";
  207. RETURN;
  208.  
  209.  
  210. #
  211. * *CONT3* PROCESS STATE.
  212. * KEEP COPY GOING RETURN AFTER REWIND/UNLOAD COMMAND.
  213. #
  214.  
  215. CDS3:
  216. P<CCB> = LLR$CCB[0];
  217. HLR$AUUD[0] = (LLR$LT$ST[0] - INFTST) / INSPAU + 1;
  218. STRPCT = LLR$LOG$ST[0] / INSPAU;
  219.  
  220. IF CCBDERR[0]
  221. THEN
  222. BEGIN # DISK ERROR #
  223. LLR$DR[0] = RESPTYP4"RMS$FL$ERR";
  224. GOTO CONT;
  225. END
  226.  
  227. IF (CCBHDWPM[0])
  228. OR (LLR$DR[0] NQ RESPTYP4"OK4")
  229. OR (HLR$AUUD[0] LS HLR$VOLAU[0])
  230. OR (HLR$AUUD[0] GR (HLR$VOLAU[0] + HLR$VOLLN[0]))
  231. OR (STRPCT GR HLR$VOLLN[0])
  232. THEN # HARDWARE ERROR #
  233. BEGIN
  234. LLR$DR[0] = RESPTYP4"M86$HDW$PR";
  235. LLR$DRFUL[0] = TRUE; # FORCE UNLOAD OF CARTRIDGE #
  236. GOTO CONT;
  237. END
  238.  
  239. IF CCBTAPPAR
  240. THEN
  241. BEGIN # WRITE PARITY ERROR #
  242. LLR$DR[0] = RESPTYP4"UN$WRT$ERR";
  243. HLR$HRDE[0] = HLR$HRDE[0] + 1; # SET WRITE ERROR #
  244. GOTO CONT;
  245. END
  246.  
  247. HLR$PRU[0] = LLR$LOG$ST[0] * INPRUS + HLR$PRU[0];
  248.  
  249. CONT:
  250.  
  251. HLR$RESP[0] = LLR$DR[0]; # RETURN RESPONSE #
  252. ADD$LNK(LLR$UCPRA[0],LCHN"HL$READY",0);
  253. LLR$MSFET[0] = 0;
  254. LLR$DSKFET[0] = 0;
  255. RLSBUF(LLRADR); # RELEASE BUFFER #
  256. RETURN;
  257. END # CPY$DS #
  258.  
  259. TERM
  260. PROC CPY$RS((LLRADR));
  261. # TITLE CPY$RS - COPY RAW VOLUME. #
  262.  
  263. BEGIN # CPY$RS #
  264.  
  265. #
  266. ** CPY$RS - COPY RAW VOLUME.
  267. *
  268. * *CPY$RS* APPENDS A RAW VOLUME TO A FILE, STARTING WITH THE
  269. * CURRENT POSITION ON THE VOLUME TO THE END OF VOLUME.
  270. *
  271. * PROC CPY$RS((LLRADR))
  272. *
  273. * ENTRY (LLRADR) - ADDRESS OF *LLRQ* ENTRY FOR THE COPY
  274. * CONTAINING THE SMA-ID, THE VOLUME
  275. * NUMBER, AND THE YZ COORDINATES.
  276. *
  277. * EXIT THE PROCESS STATE FIELD IN THE *LLRQ* ENTRY HAS BEEN
  278. * ADVANCED TO INDICATE WHERE PROCESSING OF THIS REQUEST
  279. * LEFT OFF AND THUS WHAT TO DO NEXT TO ADVANCE THE
  280. * REQUEST. WHEN THE COPY IS COMPLETE AN ERROR RESPONSE
  281. * CODE IS RETURNED VIA *LTC$RQR[LTCENTRY]*.
  282. * (LTC$RQR[LTCENTRY]) - ERROR RESPONSE CODE.
  283. * (VALUES DEFINED IN *COMBCPR*).
  284. * = RESPTYP4"OK4".
  285. * = RESPTYP4"M86$HDW$PR".
  286. * = RESPTYP4"RMS$FL$ERR".
  287. * = RESPTYP4"DISK$FULL".
  288. *
  289. * MESSAGES * EXEC ABNORMAL, CPY$RS.*.
  290. *
  291. * NOTES THIS MODULE IS A PSEUDO REENTRANT ROUTINE. A COPY RAW
  292. * VOLUME REQUEST ONLY COMES FROM *ASDEBUG* AND IS USED
  293. * TO SALVAGE INFORMATION FROM A VOLUME WITH READ ERRORS.
  294. #
  295.  
  296. ITEM LLRADR U; # *LLRQ* ENTRY ADDRESS #
  297.  
  298. #
  299. **** PROC CPY$RS - XREF LIST BEGIN.
  300. #
  301.  
  302. XREF
  303. BEGIN
  304. PROC ABORT; # ABORT #
  305. PROC ADD$LNK; # ADD ENTRY TO CHAIN #
  306. PROC DELAY; # TIMED DELAY #
  307. PROC GETBUF; # GET LARGE BUFFERS #
  308. PROC MESSAGE; # ISSUE MESSAGE #
  309. PROC PFD; # PERMANENT FILE REQUEST DELAYS #
  310. PROC RETERN; # RETURN FILE #
  311. PROC RLSBUF; # RELEASE LARGE BUFFERS #
  312. PROC SETFET; # INITIALIZE LARGE BUFFER #
  313. PROC SETPFP; # SET PERMANENT FILE PARAMETERS #
  314. PROC SFCALL; # INTERFACE TO *SFCALL* MACRO #
  315. PROC SKIPEI; # SKIP TO *EOI* #
  316. PROC UCP$RESP; # UCP RESPONSE #
  317. PROC WRITE; # WRITE DATA FROM *CIO* BUFFER #
  318. PROC WRITER; # WRITE *EOR* #
  319. END
  320.  
  321. #
  322. **** PROC CPY$RS - XREF LIST END.
  323. #
  324.  
  325. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  326. *CALL COMBFAS
  327. *CALL COMBCHN
  328. *CALL COMBCPR
  329. *CALL COMBFET
  330. *CALL COMBLBL
  331. *CALL COMBLRQ
  332. *CALL COMBPFP
  333. *CALL COMBPFS
  334. *CALL COMBRCD
  335. *CALL COMBUCR
  336. *CALL COMXBST
  337. *CALL COMXIPR
  338. *CALL COMXLTC
  339. *CALL COMXMSC
  340. *CALL COMSPFM
  341.  
  342. ITEM FLAG B; # FLAG #
  343.  
  344. SWITCH CRSENTR:PROCST # COPY RAW VOLUME ENTRIES #
  345. CRSINIT:INITIAL, # INITIAL ENTRY #
  346. CRS1:CONT1, # CONTINUATION 1 #
  347. CRS2:CONT2, # CONTINUATION 2 #
  348. CRS3:CONT3, # CONTINUATION 3 #
  349. CRS4:CONT4; # CONTINUATION 4 #
  350. CONTROL EJECT;
  351.  
  352. P<LLRQ> = LLRADR;
  353. LLR$DR[0] = RESPTYP4"OK4";
  354. GOTO CRSENTR[LLR$PRCST[0]]; # PROCESS REQUEST #
  355.  
  356. #
  357. * "INITIAL" PROCESS STATE.
  358. #
  359.  
  360. CRSINIT:
  361. GETBUF(LLRADR,HLRQIND,FLAG);
  362. IF NOT FLAG
  363. THEN # NO BUFFER AVAILABLE #
  364. BEGIN
  365. LLR$PRCST[0] = PROCST"CONT1"; #WAIT BUFFER ASSIGNMENT#
  366. ADD$LNK(LLRADR,LCHN"LL$LGBUF",0);
  367. RETURN;
  368. END
  369.  
  370.  
  371. CRS1:
  372. SETFET(LLRADR);
  373.  
  374. #
  375. * "CONT1" PROCESS STATE.
  376. *
  377. * REREAD THE UCP REQUEST BLOCK TO GET THE FAMILY, USER INDEX,
  378. * AND FILE NAME.
  379. #
  380.  
  381. CRS2:
  382. IF LLR$UCPABT[0]
  383. THEN
  384. BEGIN
  385. GOTO CRSCOMP;
  386. END
  387.  
  388. P<FETSET> = LLR$DSKFET[0];
  389. LTCENTRY = LLR$LTCT[0];
  390. LTC$SFUCPA[LTCENTRY] = LLR$UCPRA[0];
  391. LTC$SFSCPA[LTCENTRY] = FET$IN[0];
  392. LTC$SFFP[LTCENTRY] = TYP4$WC + 1;
  393. LTC$SFFC[LTCENTRY] = SFREAD;
  394. SFCALL(LOC(LTC$WORD0[LTCENTRY]),RCL);
  395. IF LTC$SFRC[LTCENTRY] NQ 0
  396. THEN
  397. BEGIN # PROCESS ERROR RESPONSE #
  398. IF LTC$SFRC[LTCENTRY] EQ SFRCSWPOUT
  399. THEN
  400. BEGIN # SWAP IN UCP #
  401. LTC$SFUCPA[LTCENTRY] = 0;
  402. LTC$SFSCPA[LTCENTRY] = 0;
  403. LTC$SFFC[LTCENTRY] = SFSWPI;
  404. SFCALL(LOC(LTC$WORD0[LTCENTRY]),NRCL);
  405.  
  406. #
  407. * "CONT3" PROCESS STATE.
  408. #
  409.  
  410. CRS3:
  411. LTCENTRY = LLR$LTCT[0];
  412. IF LTC$SFFCC[LTCENTRY]
  413. THEN # RETRY *SFREAD* #
  414. BEGIN
  415. LLR$PRCST[0] = PROCST"CONT2";
  416. END
  417.  
  418. ELSE # DELAY FOR REQUEST COMPLETION #
  419. BEGIN
  420. LLR$PRCST[0] = PROCST"CONT3";
  421. DELAY(UCP$INTV,LLRADR,LLRQIND);
  422. END
  423.  
  424. RETURN;
  425. END # SWAP IN UCP #
  426.  
  427. ELSE # FATAL ERROR #
  428. BEGIN
  429. GOTO CRSFERR;
  430. END
  431.  
  432. END # PROCESS ERROR RESPONSE #
  433.  
  434. P<CPR> = FET$IN[0];
  435. FET$LFN[0] = CPR$PFN[0];
  436. PFP$WRD0[0] = 0; # SET FAMILY AND USER INDEX #
  437. PFP$FAM[0] = CPR$FAM[0];
  438. PFP$UI[0] = CPR$UI[0];
  439. PFP$FG1[0] = TRUE;
  440. PFP$FG4[0] = TRUE;
  441. SETPFP(PFP);
  442. IF PFP$STAT[0] NQ 0
  443. THEN
  444. BEGIN
  445. GOTO CRSFERR;
  446. END
  447.  
  448. PFD("ATTACH",FET$LFN[0],0,"M","W","RC",PFSTAT,"NA",0,"UP",0,0);
  449. PFP$FAM[0] = DEF$FAM; # RETURN TO DEFAULT FAMILY #
  450. PFP$UI[0] = DEF$UI;
  451. SETPFP(PFP);
  452. IF PFP$STAT[0] NQ 0
  453. THEN
  454. BEGIN
  455. GOTO CRSFERR;
  456. END
  457.  
  458. IF PFSTAT NQ 0
  459. THEN # IF *ATTACH* ERROR #
  460. BEGIN
  461. LLR$DR[0] = RESPTYP4"ATTACH$ERR";
  462. GOTO CRSCOMP;
  463. END
  464.  
  465. SKIPEI(FETSET[0],RCL);
  466.  
  467. #
  468. * SET READ ONE STRIPE AT A TIME.
  469. #
  470.  
  471. LLR$SAV$HI[0] = LLR$ST$HI[0]; # SAVE LAST STRIPE TO READ #
  472. LLR$ST$HI[0] = LLR$ST$LW[0] + 1;
  473.  
  474. #
  475. * ISSUE A READ RAW STRIPE REQUEST TO THE DRIVER. WHEN IT IS
  476. * COMPLETED, WRITE THE RAW STRIPE TO THE DISK FILE. THEN LOOP
  477. * BACK TO READ THE NEXT RAW STRIPE. CONTINUE THIS LOOP UNTIL
  478. * THE LAST STRIPE IS READ.
  479. #
  480.  
  481. LLR$RC[0] = REQCODE"SRDRAW$STP";
  482. LLR$PRCST[0] = PROCST"CONT4";
  483.  
  484. RDRAWSTP: # ISSUE READ RAW STRIPE REQUEST #
  485. IF LLR$UCPABT[0]
  486. THEN
  487. BEGIN
  488. GOTO CRSCOMP;
  489. END
  490.  
  491. LLR$DR[0] = 0;
  492. LLR$RS[0] = PROCST"INITIAL";
  493. ADD$LNK(LLRADR,LCHN"DRQUEUE",0);
  494. RETURN;
  495.  
  496. #
  497. * "CONT4" PROCESS STATE.
  498. #
  499.  
  500. CRS4:
  501. IF LLR$DR[0] NQ RESPTYP4"OK4" ##
  502. THEN
  503. BEGIN # PROCESS ERROR #
  504. GOTO CRSCOMP;
  505. END
  506. P<FETFHB> = LLR$MSFET[0];
  507. P<FETSET> = LLR$DSKFET[0];
  508. FET$IN[0] = FHB$IN[0];
  509.  
  510. WRITER(FETSET[0],RCL);
  511.  
  512. IF FET$AT[0] NQ 0
  513. THEN
  514. BEGIN # WRITE ERROR #
  515. IF FET$AT[0] EQ ATCODE AND FET$DEC[0] EQ DISKFULL
  516. THEN # DISK FULL #
  517. BEGIN
  518. LLR$DR[0] = RESPTYP4"DISK$FULL";
  519. END
  520.  
  521. ELSE # FILE WRITE ERROR #
  522. BEGIN
  523. LLR$DR[0] = RESPTYP4"RMS$FL$ERR";
  524. END
  525.  
  526. GOTO CRSCOMP;
  527. END # WRITE ERROR #
  528.  
  529. LLR$ST$LW[0] = LLR$ST$LW[0] + 1;
  530. LLR$ST$HI[0] = LLR$ST$LW[0] + 1;
  531.  
  532. IF LLR$ST$LW[0] LQ LLR$SAV$HI[0]
  533. THEN # IF NOT END OF VOLUME #
  534. BEGIN
  535. FHB$IN[0] = FET$FRST[0];
  536. FHB$OUT[0] = FET$FRST[0];
  537. FET$IN[0] = FET$FRST[0];
  538. FET$OUT[0] = FET$FRST[0];
  539. GOTO RDRAWSTP; # CONTINUE READING STRIPES #
  540. END
  541.  
  542. LLR$DR[0] = RESPTYP4"OK4";
  543.  
  544. CRSCOMP:
  545. P<FETSET> = LLR$DSKFET[0];
  546. IF FET$LFN[0] NQ 0
  547. THEN
  548. BEGIN
  549. RETERN(FETSET[0],RCL);
  550. END
  551.  
  552. LLR$MSFET[0] = 0;
  553. LLR$DSKFET[0] =0;
  554. RLSBUF(LLRADR); # RELEASE BUFFERS #
  555. P<LLRQ> = LLRADR;
  556. IF NOT LLR$UCPABT[0]
  557. THEN # ISSUE RESPONSE TO THE UCP #
  558. BEGIN
  559. LTCENTRY = LLR$LTCT[0];
  560. LTC$RQR[LTCENTRY] = LLR$DR[0];
  561. UCP$RESP;
  562. END
  563. ELSE
  564. BEGIN # FORCE UNLOAD OF CARTRIDGE #
  565. LLR$PRCNME[0] = REQTYP4"UNLD$CART";
  566. LLR$PRCST[0] = PROCST"INITIAL";
  567. LLR$RQI[0] = REQNAME"RQIAUCP";
  568. ADD$LNK(LLRADR,LCHN"LL$READY",0);
  569. END # UNLOAD CARTRIDGE #
  570.  
  571. RETURN;
  572.  
  573. CRSFERR: # FATAL ERROR #
  574. FE$RTN[0] = "CPY$RS.";
  575. MESSAGE(FEMSG,UDFL1);
  576. ABORT;
  577. END # CPY$RS #
  578.  
  579. TERM
  580. PROC CPY$SD((LLRADR));
  581. # TITLE CPY$SD - COPY VOLUME TO DISK. #
  582.  
  583. BEGIN # CPY$SD #
  584.  
  585. #
  586. ** CPY$SD - COPY VOLUME TO DISK.
  587. *
  588. * *CPY$SD* COPIES A VOLUME TO A DISK FILE.
  589. *
  590. * PROC CPY$SD((LLRADR))
  591. *
  592. * ENTRY (LLRADR) - ADDRESS OF *LLRQ* ENTRY FOR THE COPY
  593. * CONTAINING THE SMA-ID, YZ COORDINATES,
  594. * ADDRESS OF THE DISK AND M860 FET-S. THE
  595. * FET-S MUST BE INITIALIZED.
  596. *
  597. * EXIT THE PROCESS STATE FIELD IN THE *LLRQ* ENTRY HAS BEEN
  598. * ADVANCED TO INDICATE WHERE PROCESSING OF THIS REQUEST
  599. * LEFT OFF AND THUS WHAT TO DO NEXT TO ADVANCE THE
  600. * REQUEST. WHEN THE COPY IS COMPLETE AN ERROR RESPONSE
  601. * CODE IS RETURNED IN THE *HLRQ* ENTRY WHICH GENERATED
  602. * THE COPY REQUEST.
  603. * (HLR$RESP[0]) - ERROR RESPONSE CODE.
  604. * (VALUES DEFINED IN *COMBCPR*).
  605. * = RESPTYP4"OK4".
  606. * = RESPTYP4"UNR$RD$ERR".
  607. * = RESPTYP4"M86SYS$ERR".
  608. * = RESPTYP4"M86$HDW$PR".
  609. * = RESPTYP4"RMS$FL$ERR".
  610. * = RESPTYP4"DISK$FULL".
  611. *
  612. * NOTES THIS MODULE IS A PSEUDO REENTRANT ROUTINE, CALLED ONLY
  613. * BY *STAGER* THRU THE *HLRQ* PROCESSOR.
  614. #
  615.  
  616. ITEM LLRADR U; # *LLRQ* ENTRY ADDRESS #
  617.  
  618. #
  619. **** PROC CPY$SD - XREF LIST BEGIN.
  620. #
  621.  
  622. XREF
  623. BEGIN
  624. PROC ADD$LNK; # ADD ENTRY TO CHAIN #
  625. PROC GETBUF; # GET LARGE BUFFER #
  626. PROC RLSBUF; # RELEASE LARGE BUFFER #
  627. PROC SETFET; # INITIALIZE LARGE BUFFER #
  628. END
  629.  
  630. #
  631. **** PROC CPY$SD - XREF LIST END.
  632. #
  633.  
  634. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  635. *CALL COMBFAS
  636. *CALL COMBCDD
  637. *CALL COMBCHN
  638. *CALL COMBCPR
  639. *CALL COMBFET
  640. *CALL COMBLRQ
  641. *CALL COMBRCD
  642. *CALL COMXCCB
  643. *CALL COMXHLR
  644. *CALL COMXMSC
  645.  
  646. ITEM FLAG B; # FLAG #
  647.  
  648. SWITCH CSDENTR:PROCST # COPY VOLUME TO DISK ENTRIES #
  649. CSDINIT:INITIAL, # INITIAL ENTRY #
  650. CSD1:CONT1, # WAIT LARGE BUFFER #
  651. CSD2:CONT2, # DRIVER VOLUME RETURN #
  652. CSD3:CONT3; # DRIVER RETURN *REWIND/UNLOAD* #
  653. CONTROL EJECT;
  654.  
  655. P<LLRQ> = LLRADR;
  656. P<HLRQ> = LLR$UCPRA[0];
  657. GOTO CSDENTR[LLR$PRCST[0]];
  658.  
  659. #
  660. * "INITIAL" PROCESS STATE.
  661. #
  662.  
  663. CSDINIT: # SET UP COPY CONTROL BLOCK #
  664. GETBUF(LLRADR,HLRQIND,FLAG);
  665. IF NOT FLAG
  666. THEN # NO BUFFER AVAILABLE #
  667. BEGIN
  668. LLR$PRCST[0] = PROCST"CONT1"; # WAIT BUFFER ASSIGNMENT #
  669. ADD$LNK(LLRADR,LCHN"LL$LGBUF",0);
  670. RETURN;
  671. END
  672.  
  673.  
  674. #
  675. * *CONT1* PROCESS STATE.
  676. #
  677.  
  678. CSD1:
  679. SETFET(LLRADR); # INITIALIZE LARGE BUFFER #
  680. P<LLRQ> = LLRADR;
  681. P<CCB> = LLR$CCB[0];
  682. P<FETSET> = LLR$DSKFET[0];
  683. P<FETFHB> = LLR$MSFET[0];
  684. CCBOPCODE[0] = CPYC"AUDISK";
  685. FHB$CODE[0] = FCCWR;
  686. LLR$RC[0] = REQCODE"SREAD$VOL"; # ISSUE READ VOLUME REQUEST #
  687. LLR$RS[0] = PROCST"INITIAL";
  688. ADD$LNK(CCBLLRQ[0],LCHN"DRQUEUE",0);
  689. LLR$PRCST[0] = PROCST"CONT2";
  690. RETURN;
  691.  
  692. #
  693. * *CONT2* PROCESS STATE.
  694. * CPU DRIVER MOUNT VOLUME RETURN.
  695. #
  696.  
  697. CSD2: # PROCESS DRIVER RETURN #
  698. IF LLR$DR[0] NQ RESPTYP4"OK4"
  699. THEN
  700. BEGIN # PROCESS DRIVER ERROR RETURN CODE #
  701. GOTO CONT;
  702. END
  703.  
  704. ADD$LNK(LLR$CCB[0],LCHN"KC$GOING",0);
  705. LLR$PRCST[0] = PROCST"CONT3";
  706. RETURN;
  707.  
  708.  
  709. #
  710. * *CONT3* PROCESS STATE.
  711. * CPU DRIVER RETURN FROM REWIND/UNLOAD COMMAND.
  712. #
  713.  
  714.  
  715. CSD3:
  716. P<CCB> = LLR$CCB[0];
  717. P<FETSET> = LLR$DSKFET[0];
  718. P<FETFHB> = LLR$MSFET[0];
  719. IF CCBDERR[0]
  720. THEN # DISK ERROR #
  721. BEGIN
  722. LLR$DR[0] = RESPTYP4"RMS$FL$ERR";
  723. GOTO CONT;
  724. END
  725.  
  726. IF CCBDFULL[0]
  727. THEN # DISK FULL ERROR #
  728. BEGIN
  729. LLR$DR[0] = RESPTYP4"DISK$FULL";
  730. GOTO CONT;
  731. END
  732. IF CCBHDWPM[0] OR LLR$DR[0] NQ RESPTYP4"OK4"
  733. THEN # IF HARDWARE ERROR #
  734. BEGIN
  735. LLR$DR[0] = RESPTYP4"M86$HDW$PR";
  736. LLR$DRFUL[0] = TRUE; # FORCE UNLOAD OF CARTRIDGE #
  737. GOTO CONT;
  738. END
  739. IF CCBTAPPAR
  740. THEN
  741. BEGIN # READ PARITY ERROR #
  742. LLR$DR[0] = RESPTYP4"UN$RD$ERR";
  743. IF NOT HLR$RETRY[0] # FIRST PARITY ERROR #
  744. THEN
  745. BEGIN # FORCE UNLOAD AND DELINK OF CARTRIDGE #
  746. LLR$DRFUL[0] = TRUE;
  747. END
  748. GOTO CONT;
  749. END
  750.  
  751. IF CCPPUDCK
  752. THEN
  753. BEGIN # PPU FOUND DATA TRANSFER ERROR #
  754. LLR$DR[0]= RESPTYP4"PPU$D$PROB";
  755. IF NOT HLR$RETRY[0] # FIRST DATA ERROR #
  756. THEN
  757. BEGIN # FORCE UNLOAD AND DELINK OF CARTRIDGE #
  758. LLR$DRFUL[0] = TRUE;
  759. END
  760.  
  761. GOTO CONT;
  762. END
  763.  
  764. IF FHB$PVLN[0] NQ HLR$VOLLNP[0] # PREVIOUS VOLUME LENGTH #
  765. OR FHB$PVSN[0] NQ HLR$VOLAUP[0] # PREVIOUS VOLUME NUMBER #
  766. OR FHB$CVSN[0] NQ HLR$VOLAU[0] # VOLUME NUMBER #
  767. OR FHB$PCSN[0] NQ HLR$CSNTPS # CSN OR PREVIOUS VOLUME #
  768. OR FHB$PFC$UI[0] NQ HLR$TDAMUI[0] # USER INDEX #
  769. OR FHB$PFC$DT[0] NQ HLR$TDAMCD[0] # CREATION DATE / TIME #
  770. THEN
  771. BEGIN # SET VOLUME HEADER ERROR #
  772. LLR$DR[0] = RESPTYP4"VOL$HD$ERR";
  773. GOTO CONT;
  774. END
  775.  
  776.  
  777. HLR$PRU[0] = FET$CRI[0] + HLR$PRU[0];
  778.  
  779. IF CCBTPMARK
  780. THEN
  781. BEGIN
  782. HLR$EOI[0] = TRUE;
  783. END
  784.  
  785. CONT:
  786.  
  787.  
  788. HLR$RESP[0] = LLR$DR[0]; # RETURN RESPONSE #
  789. ADD$LNK(LLR$UCPRA[0],LCHN"HL$READY",0);
  790. LLR$MSFET[0] = 0;
  791. LLR$DSKFET[0] = 0;
  792. RLSBUF(LLRADR); # RELEASE BUFFER #
  793. RETURN;
  794. END # CPY$SD #
  795.  
  796. TERM
  797. PROC INIT$HW((LLRADR));
  798. # TITLE INIT$HW - INITIALIZE M860 HARDWARE. #
  799.  
  800. BEGIN # INIT$HW #
  801.  
  802. #
  803. ** INIT$HW - INITIALIZE M860 HARDWARE.
  804. *
  805. * *INIT$HW* PASSES M860 HARDWARE INITIALIZATION
  806. * REQUESTS TO THE MSAS DRIVER. IT CLEARS THE
  807. * *INITIALIZE* FLAG TO INDICATE THAT FULL
  808. * INITIALIZATION HAS COMPLETED WHEN IT FINDS THE
  809. * *LLRQ* READY CHAIN AND *DRQUEUE* BOTH INACTIVE, WHILE
  810. * PROCESSING A REQUEST JUST RETURNED FROM THE DRIVER.
  811. *
  812. * PROC INIT$HW((LLRADR))
  813. *
  814. * ENTRY (LLRADR) - *LLRQ* ENTRY ADDRESS CONTAINING
  815. * CONTROLLER ORDINAL FROM WHICH HARDWARE
  816. * INITIALIZATION IS TO BE BASED.
  817. *
  818. * EXIT THE *LLRQ* ENTRY PROCESS STATE FIELD HAS BEEN
  819. * ADVANCED TO INDICATE WHERE SUBSEQUENT PROCESSING OF
  820. * THIS REQUEST IS TO CONTINUE.
  821. *
  822. * NOTES THIS MODULE IS A PSEUDO-REENTRANT ROUTINE.
  823. #
  824.  
  825. ITEM BYNR U; # OFF SET BIT ADDRESS #
  826. ITEM LLRADR U; # *LLRQ* ENTRY ADDRESS #
  827. ITEM STAT U; # STATUS BIT #
  828.  
  829. #
  830. **** PROC INIT$HW - XREF LIST BEGIN.
  831. #
  832.  
  833. XREF
  834. BEGIN
  835. PROC ABORT; # ABORT #
  836. PROC ADD$LNK; # ADD ENTRY TO END OF CHAIN #
  837. PROC MESSAGE; # ISSUE MESSAGE #
  838. PROC UCP$RES; # RETURN RESPONSE TO UCP #
  839. END
  840.  
  841. #
  842. **** PROC INIT$HW - XREF LIST END.
  843. #
  844.  
  845. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  846.  
  847. *CALL,COMBFAS
  848. *CALL,COMBCHN
  849. *CALL,COMBCPR
  850. *CALL,COMBLRQ
  851. *CALL,COMBRCD
  852. *CALL,COMBUCR
  853. *CALL COMBUDT
  854. *CALL,COMXCTF
  855. *CALL,COMXLTC
  856. *CALL,COMXMSC
  857.  
  858. BASED
  859. ARRAY UDTBIT [0:0] P(1); # CHECK *UDT* AREA #
  860. BEGIN
  861. ITEM UDT$BIT U(00,00,60);
  862. END
  863.  
  864. #
  865. * GENERAL MESSAGE BUFFER.
  866. #
  867.  
  868. ARRAY GMSB [0:0] S(5);
  869. BEGIN # INIT MSGS #
  870. ITEM MSG$LINE C(00,00,40); # MESSAGE LINE #
  871. ITEM MSG$ZERO U(04,00,12) = [0]; # ZERO-BYTE TERMINATOR #
  872. END # INIT MSGS #
  873.  
  874. SWITCH INITIALS:PROCST # INITIALIZATION ENTRIES #
  875. INIT1:INITIAL, # INITIAL ENTRY #
  876. INIT2:CONT1; # FINAL ENTRY #
  877. CONTROL EJECT;
  878.  
  879. P<LLRQ> = LLRADR;
  880. GOTO INITIALS[LLR$PRCST[0]];
  881.  
  882. #
  883. * "INITIAL" PROCESS STATE.
  884. #
  885.  
  886. INIT1:
  887. LLR$RC[0] = RESTART$CU; # ASSUME DRIVER RESTART REQUEST #
  888. IF NOT INITIALIZE ##
  889. THEN # NO CU RESTART REQUIRED #
  890. BEGIN # RESET #
  891. LLR$RC[0] = INIT$SM;
  892. END # RESET #
  893.  
  894. LLR$PRCST[0] = PROCST"CONT1";
  895. ADD$LNK(LLRADR,LCHN"DRQUEUE",0);
  896. RETURN;
  897.  
  898. #
  899. * "COMPLETE" PROCESS STATE.
  900. #
  901.  
  902. INIT2:
  903. IF CHN$BOC[LCHN"LL$READY"] EQ 0 ##
  904. AND CHN$BOC[LCHN"DRQUEUE"] EQ 0 ##
  905. AND INITIALIZE
  906. THEN # FULL INITIALIZATION COMPLETED #
  907. BEGIN # INIT DONE #
  908. IF UDT$HWOFF[0] EQ 0
  909. THEN # INITIALIZATION WAS SUCCESSFUL #
  910. BEGIN # OK #
  911. INITIALIZE = FALSE;
  912. MSG$LINE[0] = " INITIALIZATION COMPLETE.";
  913. MESSAGE(GMSB,SYSUDF1);
  914. END # OK #
  915.  
  916. ELSE # NO 7990 HARDWARE ACCESS #
  917. BEGIN # EXIT #
  918. MSG$LINE[0] = " INITIALIZATION HALTED.";
  919. MESSAGE(GMSB,SYSUDF1);
  920. MSG$LINE[0] = "$INITIALIZATION HALTED.";
  921. MESSAGE(GMSB,LINE2);
  922. END # EXIT #
  923.  
  924. END # INIT DONE #
  925.  
  926. IF LLR$RQI[0] EQ REQNAME"RQIALTER" # SSALTER WORKING #
  927. AND NOT LLR$UCPABT[0]
  928. THEN # REQUEST FROM UCP #
  929. BEGIN # RETURN #
  930. BYNR = LLR$BYNR[0];
  931. P<UDTBIT> = LLR$UDTQ[0];
  932. STAT = B<BYNR,1> UDT$BIT[0];
  933. LTCENTRY = LLR$LTCT[0];
  934. LTC$RQR[LTCENTRY] = RESPTYP5"OK5";
  935. IF STAT NQ LLR$PMMR[0] # STATUS UNCHANGED #
  936. OR LLR$DR[0] EQ RESPTYP4"M86$HDW$PR" # HARDWARE PROBLEM #
  937. THEN
  938. BEGIN # STATUS REMAINED #
  939. LTC$RQR[LTCENTRY] = RESPTYP5"SSA$ERROR";
  940. END # STATUS REMAINED #
  941.  
  942. LTC$LLRQA[LTCENTRY] = 0;
  943. UCP$RES; # RETURN RESPONSE TO UCP #
  944. END # RETURN #
  945.  
  946. LLR$PRCST[0] = PROCST"COMPLETE";
  947. RETURN;
  948.  
  949. END # INIT$HW #
  950.  
  951. TERM
  952. PROC KCG;
  953. # TITLE KCG - KEEP COPY GOING. #
  954.  
  955. BEGIN # KCG #
  956.  
  957. #
  958. ** KCG - KEEP COPY GOING.
  959. *
  960. * *KCG* MONITORS THE PROGRESS OF COPIES BETWEEN DISK AND A
  961. * CARTRIDGE VOLUME, MOVES *IN* AND *OUT* POINTERS BETWEEN THE *CIO*
  962. * AND *1SS* FET AND RESTARTS *CIO* OR *1SS* AS NECESSARY TO
  963. * KEEP THE COPY PROCESS GOING.
  964. *
  965. * PROC KCG
  966. *
  967. * EXIT ALL COPY REQUESTS WHICH HAVE BEEN COMPLETED ARE
  968. * DELETED FROM THE KEEP COPY GOING CHAIN AND ADDED BACK
  969. * ON THE *LLRQ* READY CHAIN.
  970. *
  971. * SENSE SWITCH 2 IS USED TO SET READ AND WRITE 1MS
  972. * CALLS IN THE DAYFILE. THE NUMBER OF TIMES 1MS IS CALLED
  973. * IN A VOLUME CAN BE TRACED BY SETTING SENSE SWITCHS 1 AND 2.
  974. *
  975. * THE STRIPES ARE READ OR WRITTEN IN 13 PRU BLOCKS.
  976. * THE BUFFER HAS BEEN SET FOR 4 PLUS BLOCKS.
  977. * THE BUFFER SIZE IS CHANGED BY *DATABL* IN COMXBST.
  978. *
  979. *
  980. * THE CODE IS SET TO CALL 1MS WHEN A BUFFER IS 1/2 FULL.
  981. *
  982. * THE BUFFER SIZE CAN BE VARIED, BUT 1/3 OF A BUFFER MUST BE
  983. * OVER 13 PRU-S OR A LOCK WILL HAPPEN BETWEEN 1SS AND 1MS.
  984. * DATABL (BUFFER SIZE) HAS BEEN INCREASED FROM 3700 TO
  985. * 6501.
  986. *
  987. * TO CHANGE FROM 1/2 TO 2/3 BUFFER FULL CALLS TO *1MS* -
  988. * ((DATABL-1) / 2) TO ((DATABL-1) / 3) * 2
  989. *
  990. #
  991.  
  992.  
  993. DEF BUFSTART #((DATABL-1) / 2)#; # SETS HALF BUFFER START #
  994.  
  995. DEF EOI$IWRD #O"2000 0000 0000 0000 0000"#; # *EOI* WORD #
  996. #
  997. **** PROC KCG - XREF LIST BEGIN.
  998. #
  999.  
  1000. XREF
  1001. BEGIN
  1002. PROC ADD$LNK; # ADD ENTRY TO CHAIN #
  1003. PROC CALLPPU; # CALL PPU #
  1004. PROC DEL$LNK; # DELETE ENTRY FROM CHAIN #
  1005. PROC READCW; # READ WITH CONTROL WORDS #
  1006. PROC WRITECW; # WRITE WITH CONTROL WORDS #
  1007. PROC K8G; # KEEP M860 GOING #
  1008. PROC MESSAGE; # ISSUE MESSAGE #
  1009. END
  1010.  
  1011. #
  1012. **** PROC KCG - XREF LIST END.
  1013. #
  1014.  
  1015. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  1016. *CALL COMBFAS
  1017. *CALL COMBCDD
  1018. *CALL COMBCHN
  1019. *CALL COMBFET
  1020. *CALL COMBLRQ
  1021. *CALL COMXBST
  1022. *CALL COMXCCB
  1023. *CALL COMXCTF
  1024. *CALL COMXJCA
  1025. *CALL COMXMSC
  1026.  
  1027. ITEM ENTADR U; # *CCB* ENTRY ADDRESS #
  1028. ITEM NEXTADDR U; # NEXT ENTRY ADDRESS #
  1029. ITEM TEMP U; # TEMPORARY STORAGE #
  1030. ITEM RD$READY B; # READ BUFFER READY #
  1031. ITEM WRT$READY B; # WRITE BUFFER READY #
  1032.  
  1033.  
  1034.  
  1035. ARRAY WRITEMG [0:0] S(2);
  1036. BEGIN
  1037. ITEM WRITEMSG C(00,00,12) = [" 1MS WRITE."];
  1038. ITEM TERMA U(01,48,12) = [0]; # TERMINATOR #
  1039. END
  1040.  
  1041.  
  1042. ARRAY READMG [0:0] S(2) ;
  1043. BEGIN
  1044. ITEM READMSG C(00,00,12) = [" 1MS READ."];
  1045. ITEM TERMB U(01,48,12) = [0]; # TERMINATOR #
  1046. END
  1047.  
  1048. CONTROL EJECT;
  1049.  
  1050. ENTADR = CHN$BOC[LCHN"KC$GOING"];
  1051. REPEAT WHILE ENTADR NQ 0
  1052. DO
  1053. BEGIN # MONITOR ENTRIES ON KEEP COPY GOING CHAIN #
  1054. P<CCB> = ENTADR;
  1055. P<LLRQ> = CCBLLRQ[0];
  1056. NEXTADDR = CCBLINK[0];
  1057. P<FETSET> = CCBDKFET[0];
  1058. P<FETFHB> = CCBM86FET[0];
  1059. IF CCBOPCODE[0] EQ CPYC"DISKAU"
  1060.  
  1061. THEN
  1062. BEGIN # COPY DISK TO M860 #
  1063. FHB$IN[0] = FET$IN[0];
  1064. FET$OUT[0] = FHB$OUT[0];
  1065. END
  1066. ELSE
  1067. BEGIN # COPY M860 TO DISK #
  1068. FET$IN[0] = FHB$IN[0];
  1069. FHB$OUT[0] = FET$OUT[0];
  1070. END
  1071.  
  1072. IF FET$LOCK[0] ##
  1073. AND NOT (CCBDERR[0] OR CCBDFULL[0])
  1074. THEN # IF MEDIA NOT EMPTY, NO DISK
  1075.   ERRORS AND *CIO* NOT RUNNING #
  1076. BEGIN
  1077. IF FET$AT[0] NQ 0
  1078. THEN
  1079. BEGIN # SET DISK ERROR FLAG #
  1080. IF FET$AT[0] EQ 1
  1081. THEN
  1082. BEGIN # DISK FULL #
  1083. CCBDFULL[0] = TRUE;
  1084. END
  1085.  
  1086. ELSE
  1087. BEGIN # DISK ERROR #
  1088. CCBDERR[0] = TRUE;
  1089. END
  1090.  
  1091. END
  1092.  
  1093.  
  1094. ELSE
  1095. BEGIN # START COPY #
  1096. IF CCBOPCODE[0] EQ CPYC"DISKAU"
  1097. THEN
  1098. BEGIN # DISK INPUT #
  1099. IF FET$EOI[0]
  1100. THEN
  1101. BEGIN # WRITE *EOI* WORD #
  1102. RA$WORD[FET$IN[0]] = EOI$IWRD;
  1103.  
  1104. IF FET$IN[0] EQ FET$LIM[0] - 1
  1105. THEN
  1106. BEGIN
  1107. FET$IN[0] = FET$FRST[0];
  1108. END
  1109.  
  1110. ELSE
  1111. BEGIN
  1112. FET$IN[0] = FET$IN[0] + 1;
  1113. END
  1114.  
  1115. CCBDEOI[0] = TRUE;
  1116. END # END OF *EOI* WRITE #
  1117.  
  1118. RD$READY = ((FET$OUT[0] GR FET$IN[0]) ##
  1119. AND ((FET$OUT[0] - FET$IN[0]) GR BUFSTART)) ##
  1120. OR ((FET$OUT[0] LQ FET$IN[0]) ##
  1121. AND (((FET$OUT[0]-FET$FRST[0]) + (FET$LIM[0]-FET$IN[0]))
  1122. GR BUFSTART));
  1123.  
  1124. IF RD$READY ##
  1125. AND (CCBRWCT[0] EQ 0) ##
  1126. AND (NOT CCBDEOI[0])
  1127. THEN
  1128. BEGIN
  1129. READCW(FETSET[0],0,NRCL);
  1130.  
  1131. IF RA$SW2
  1132. THEN
  1133. BEGIN
  1134. MESSAGE(READMSG,UDFL1);
  1135. END
  1136.  
  1137. END
  1138.  
  1139. END # END OF DISK INPUT #
  1140.  
  1141. ELSE
  1142. BEGIN # WRITE DISK #
  1143. WRT$READY = ((FET$IN[0] GR FET$OUT[0]) ##
  1144. AND ((FET$IN[0] - FET$OUT[0]) GR BUFSTART))
  1145. OR ((FET$IN[0] LQ FET$OUT[0]) ##
  1146. AND ((FET$LIM[0] - FET$OUT[0]) ##
  1147. + (FET$IN[0] - FET$FRST[0]) GR BUFSTART));
  1148.  
  1149. IF (WRT$READY OR CCBRWDULD[0] OR (CCBRWCT[0] NQ 0)) ##
  1150. AND (NOT FET$IN[0] EQ FET$OUT[0])
  1151.  
  1152.  
  1153. THEN
  1154. BEGIN
  1155. WRITECW(FETSET[0],NRCL);
  1156.  
  1157. IF RA$SW2
  1158. THEN
  1159. BEGIN
  1160. MESSAGE(WRITEMSG,UDFL1);
  1161. END
  1162.  
  1163. END
  1164. END # END OF WRITE DISK #
  1165. END # END OF COPY #
  1166.  
  1167. IF CCBDERR[0] OR CCBDFULL[0]
  1168. THEN # STOP *1SS* #
  1169. BEGIN
  1170. FHB$ST$SS[0] = TRUE;
  1171. END
  1172.  
  1173. END
  1174.  
  1175. IF FHB$LOCK[0] AND NOT CCBRWDULD[0]
  1176. THEN # IF *1SS* RUNNING #
  1177. BEGIN
  1178. K8G(ENTADR); # M860 SIDE OF COPY #
  1179. P<CCB> = ENTADR;
  1180. P<FETFHB> = CCBM86FET[0];
  1181. END
  1182.  
  1183. #
  1184. * IF THE INPUT COULD NOT BE RESTARTED (BECAUSE THE BUFFER WAS
  1185. * FULL OR THE INPUT MEDIA WAS EMPTY OR THERE WAS AN UNRECOVERABLE
  1186. * READ ERROR), AND THE OUTPUT COULD NOT BE RESTARTED (BECAUSE THE
  1187. * BUFFER WAS EMPTY OR THE OUTPUT MEDIA WAS FULL OR THERE WAS AN
  1188. * UNRECOVERABLE WRITE ERROR), THEN THE COPY OPERATION IS COMPLETE.
  1189. #
  1190.  
  1191.  
  1192. IF FET$LOCK[0] ##
  1193. AND ((CCBOPCODE[0] EQ CPYC"DISKAU" AND CCBRWDULD[0]) ##
  1194. OR (CCBOPCODE[0] EQ CPYC"AUDISK" AND CCBRWDULD[0] ##
  1195. AND FET$IN[0] EQ FHB$IN[0] AND FET$IN[0] EQ FET$OUT[0]) ##
  1196. OR (CCBRWDULD[0] AND (CCBDERR[0] OR CCBDFULL[0])))
  1197. THEN # INDICATE COPY COMPLETE #
  1198. BEGIN
  1199. DEL$LNK(ENTADR,LCHN"KC$GOING",0);
  1200. LLR$CCF[0] = TRUE;
  1201. LLR$RS[0] = PROCST"CONT3";
  1202. DRVRRECALL = TRUE; # INSURE DRIVER ACTIVE #
  1203. ADD$LNK(CCBLLRQ[0],LCHN"DRQUEUE",0);
  1204. IF CCBHDWPM
  1205. THEN
  1206. BEGIN # DELINK 1SS, NO REWIND/UNLOAD MESSAGE #
  1207. LLR$DRFUL[0] = TRUE; # FORCE UNLOAD OF CARTRIDGE #
  1208. END # RETURN OF COPY #
  1209. END
  1210.  
  1211. ENTADR = NEXTADDR;
  1212. END # MONITOR ENTRIES ON KEEP COPY GOING CHAIN #
  1213.  
  1214. RETURN;
  1215. END # KCG #
  1216.  
  1217. TERM
  1218. PROC K8G((CCBADR));
  1219. # TITLE K8G - KEEP M860 COPY GOING. #
  1220.  
  1221. BEGIN # K8G #
  1222.  
  1223. #
  1224. ** K8G - KEEP M860 COPY GOING.
  1225. *
  1226. * *K8G* KEEPS THE M860 COPY SIDE OF A VOLUME OPERATION GOING.
  1227. * FLAGS IN THE *CCB* ARE UPDATED TO INDICATE THE STATE OF THE COPY
  1228. * OPERATION AND A *1SS* CALL IS ISSUED IF NECESSARY.
  1229. *
  1230. * PROC K8G((CCBADR))
  1231. *
  1232. * ENTRY (CCBADR) - ADDRESS OF THE COPY CONTROL BLOCK.
  1233. #
  1234.  
  1235. ITEM CCBADR U; # COPY CONTROL BLOCK ADDRESS #
  1236.  
  1237. #
  1238. **** PROC K8G - XREF LIST BEGIN.
  1239. #
  1240.  
  1241. XREF
  1242. BEGIN
  1243. PROC ABORT; # ABORT #
  1244. PROC FSCLOG; # LOG FSC ERROR MESSAGE #
  1245. PROC MESSAGE; # ISSUE MESSAGE #
  1246. END
  1247.  
  1248. #
  1249. **** PROC K8G - XREF LIST END.
  1250. #
  1251.  
  1252. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  1253. *CALL COMBFAS
  1254. *CALL COMBCDD
  1255. *CALL COMBCHN
  1256. *CALL COMBFET
  1257. *CALL COMBRCD
  1258. *CALL COMXCCB
  1259. *CALL COMXCTF
  1260. *CALL COMXMSC
  1261. CONTROL EJECT;
  1262.  
  1263. #
  1264. * SET FLAGS TO INDICATE WHY *1SS* HAS STOPPED.
  1265. #
  1266.  
  1267. P<CCB> = CCBADR;
  1268. P<FETFHB> = CCBM86FET[0];
  1269. IF CCBRWCT[0] NQ 0
  1270. THEN # FIRST REWIND/UNLOAD EXECUTED #
  1271. BEGIN
  1272. IF FHB$AT[0] EQ 0
  1273. THEN
  1274. BEGIN # REWIND/UNLOAD COMPLETED #
  1275. CCBRWDULD[0] = TRUE;
  1276. RETURN;
  1277. END
  1278. ELSE
  1279. BEGIN # SET FOR ANOTHER TRY #
  1280. IF CCBRWCT[0] LQ 5
  1281. THEN
  1282. BEGIN # TRY AN OTHER REWIND/UNLOAD #
  1283. GOTO RWDAUND;
  1284. END
  1285. ELSE
  1286. BEGIN # HARDWARE PROBLEM - REWIND/UNLOAD #
  1287. CCBHDWPM[0] = TRUE;
  1288. CCBRWDULD[0] = TRUE; # FORCE COMPLETE #
  1289. RETURN;
  1290. END
  1291. END # END OF REWIND/UNLOAD SET UP #
  1292. END # IF REWIND/UNLOAD COMPLETED #
  1293. IF FHB$EOI[0]
  1294. THEN
  1295. BEGIN # SET TAPE MARK #
  1296. CCBTPMARK[0] = TRUE;
  1297. END
  1298.  
  1299. IF FHB$AT[0] EQ RCENDV # #
  1300. OR FHB$AT[0] EQ RCTBRT
  1301. THEN # *TAPE MARK* OR *END OF VOLUME* #
  1302. BEGIN
  1303. CCBENDVOL[0] = TRUE;
  1304. GOTO RWDAUND;
  1305. END
  1306.  
  1307. IF FHB$AT[0] EQ 0
  1308. THEN
  1309. BEGIN # NO ERROR #
  1310. GOTO RWDAUND;
  1311. END
  1312.  
  1313. IF FHB$AT[0] EQ RCTERF
  1314. THEN
  1315. BEGIN
  1316. FHB$ST$SS[0] = FALSE;
  1317. GOTO RWDAUND;
  1318. END
  1319.  
  1320. IF FHB$AT[0] EQ RCBFTO
  1321. THEN
  1322. BEGIN
  1323. CCBHDWPM[0] = TRUE;
  1324. GOTO BMLRWUL;
  1325. END
  1326.  
  1327. IF FHB$AT[0] EQ RCSTER # #
  1328. AND FHB$ERRCD[0] EQ 0 # #
  1329. AND FHB$PYERR[0] EQ 1
  1330. THEN
  1331. BEGIN # TAPE PARITY ERROR #
  1332. CCBTAPPAR[0] = TRUE;
  1333. GOTO BMLRWUL;
  1334. END
  1335.  
  1336.  
  1337. IF FHB$AT[0] EQ RCILLF
  1338. OR FHB$AT[0] EQ RCBARG
  1339. OR FHB$AT[0] EQ RCILLU
  1340. THEN # ABORT ON ERRORS #
  1341. BEGIN
  1342. FE$RTN[0] = "K8G.";
  1343. MESSAGE(FEMSG,UDFL1);
  1344. ABORT;
  1345. END
  1346.  
  1347. IF (FHB$AT[0] EQ RCDLER)
  1348. OR (FHB$AT[0] EQ RCCWER)
  1349. OR (FHB$AT[0] EQ RCHDER)
  1350. THEN
  1351. BEGIN # PPU FOUND DATA TRANSFER ERROR #
  1352. CCPPUDCK[0] = TRUE;
  1353. GOTO BMLRWUL;
  1354. END
  1355.  
  1356. FSCLOG(DFET); # ERROR LOG MESSAGE #
  1357.  
  1358. CCBHDWPM[0] = TRUE; # REMAINING ERRORS #
  1359. CCBRWDULD[0] = TRUE;
  1360. RETURN;
  1361.  
  1362.  
  1363. #
  1364. * SEND A *BML* MESSAGE BEFORE REWIND/UNLOAD.
  1365. #
  1366.  
  1367. BMLRWUL:
  1368.  
  1369. FSCLOG(DFET); # ERROR LOG MESSAGE #
  1370.  
  1371. #
  1372. * RELEASE THE HARDWARE WITH A REWIND/UNLOAD FUNCTION.
  1373. #
  1374.  
  1375. RWDAUND:
  1376.  
  1377. DRVRRECALL = TRUE; # INSURE CPUDRIVER ACTIVE #
  1378. FHB$CODE[0] = FCRUN; # SET REWIND/UNLOAD #
  1379. CCBRWCT[0] = CCBRWCT[0] + 1;
  1380.  
  1381. RETURN;
  1382. END # KDG #
  1383.  
  1384. TERM
  1385. PROC LD$CAR((LLRADR));
  1386. # TITLE LD$CAR - LOAD CARTRIDGE. #
  1387.  
  1388. BEGIN # LD$CAR #
  1389.  
  1390. #
  1391. ** LD$CAR - LOAD CARTRIDGE.
  1392. *
  1393. * LOAD CARTRIDGE GETS THE SPECIFIED CARTRIDGE LOADED ON A
  1394. * DRD AND THE LABEL VERIFIED BY *SSDRIVER*.
  1395. *
  1396. * PROC LD$CAR((LLRADR))
  1397. *
  1398. * ENTRY (LLRADR) - ADDRESS OF *LLRQ* ENTRY FOR THE REQUEST
  1399. * CONTAINING THE SMA-ID AND THE YZ
  1400. * COORDINATES.
  1401. *
  1402. * EXIT THE PROCESS STATE FIELD IN THE *LLRQ* ENTRY HAS BEEN
  1403. * ADVANCED TO INDICATE WHERE PROCESSING OF THIS REQUEST
  1404. * LEFT OFF, AND THUS WHAT TO DO NEXT TO ADVANCE THE
  1405. * REQUEST. IF THE MOUNT IS COMPLETE AN ERROR RESPONSE
  1406. * CODE IS RETURNED VIA *HLR$RESP[0]* FOR INTERNAL
  1407. * REQUESTOR OR *LTC$RQR[LTCENTRY]* FOR EXTERNAL
  1408. * REQUESTORS.
  1409. * ERROR RESPONSE CODES (VALUES DEFINED IN *COMBCPR*).
  1410. * = RESPTYP4"OK4".
  1411. * = RESPTYP4"NO$CART".
  1412. * = RESPTYP4"M86$HDW$PR".
  1413. *
  1414. * NOTES THIS MODULE IS A PSEUDO REENTRANT ROUTINE.
  1415. *
  1416. #
  1417.  
  1418. ITEM DRDCOUNT I; # *DRD-S* ACTIVE #
  1419. ITEM LLRADR U; # *LLRQ* ENTRY ADDRESS #
  1420. ITEM I U; # COUNTER #
  1421. ITEM MUCPRA U; # *UCP* OR *HLRQ* ADDRESS #
  1422. ITEM RQIID B; # INTERIAL REQUEST #
  1423. ITEM SMAO U; # REQUEST SM-ID #
  1424. ITEM YZO U; # Y AND Z COORDINATE #
  1425.  
  1426. #
  1427. **** PROC LD$CAR - XREF LIST BEGIN.
  1428. #
  1429.  
  1430. XREF
  1431. BEGIN
  1432. PROC ABORT; # INTERFACE TO *ABORT* MACRO #
  1433. PROC ADD$LNK; # ADD ENTRY TO END OF CHAIN #
  1434. PROC DELAY; # TIMED DELAY #
  1435. PROC KILL$UC; # ABORT A UCP #
  1436. PROC MESSAGE; # INTERFACE TO *MESSAGE* MACRO #
  1437. PROC SFCALL; # INTERFACE TO *SFCALL* MACRO #
  1438. PROC UCP$RES; # SEND RESPONSE TO UCP #
  1439. END
  1440.  
  1441. #
  1442. **** PROC LD$CAR - XREF LIST END.
  1443. #
  1444.  
  1445. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  1446. *CALL COMBFAS
  1447. *CALL COMBCHN
  1448. *CALL COMBCPR
  1449. *CALL COMBLRQ
  1450. *CALL COMBLBL
  1451. *CALL COMBMAT
  1452. *CALL COMBRCD
  1453. *CALL COMBUCR
  1454. *CALL COMXHLR
  1455. *CALL COMXCTF
  1456. *CALL COMBUDT
  1457. *CALL COMXIPR
  1458. *CALL COMXLTC
  1459. *CALL COMXMSC
  1460.  
  1461. DEF SKELLAB #" E CSN=CCCCCCCC, SM=A, SF=X, FFFFFFF. "#;
  1462.  
  1463. ARRAY MSGS [0:0] S(4);
  1464. BEGIN
  1465. ITEM MSGS$SKEL C(00,00,36); # TEXT #
  1466. ITEM MSGS$TYPE C(00,06,01); # TYPE #
  1467. ITEM MSGS$CSN C(00,42,08); # CCCCCCCC #
  1468. ITEM MSGS$SM C(02,00,01); # A #
  1469. ITEM MSGS$SF C(02,36,01); # SUB FAMILY #
  1470. ITEM MSGS$FAM C(02,54,07); # FAMILY #
  1471. ITEM MSGS$FI U(03,36,24); # ZERO FILL #
  1472. END
  1473.  
  1474. BASED
  1475. ARRAY CLEAR [0:0] S(1);
  1476. BEGIN
  1477. ITEM CLN U(00,36,24); # CLEAR DRD ASSIGNMENT #
  1478. END
  1479.  
  1480. SWITCH LDENTR:PROCST # LOAD CARTRIDGE ENTRIES #
  1481. LDINIT:INITIAL, # INITIAL ENTRY INTO PROCESS #
  1482. LDCONT:CONT1, # CONTINUE PROCESS #
  1483. LDWAIT1:CONT2; # AFTER A SWAPIN DELAY #
  1484.  
  1485. CONTROL EJECT;
  1486.  
  1487. P<LLRQ> = LLRADR;
  1488. GOTO LDENTR[LLR$PRCST[0]];
  1489.  
  1490. #
  1491. * "INITIAL" PROCESS STATE.
  1492. #
  1493.  
  1494. LDINIT: # INITIAL ENTRY #
  1495. #
  1496. * SEARCH THE *LLRQ* FOR AN MATCHING *CSN*. IF AN INTERNAL
  1497. * REQUEST, LINK THE NEW REQUEST AT THE END OF THE DUPLICATE
  1498. * *CSN* REQUEST. IF THE REQUEST IS FROM A *UCP* RETURN AN
  1499. * *CSN$IN$USE* RESPONSE.
  1500. #
  1501.  
  1502.  
  1503. SMAO = LLR$SMA[0];
  1504. YZO = LLR$YZ[0];
  1505. RQIID = LLR$RQI[0] EQ REQNAME"RQIINT";
  1506. P<LLRQ> = MAT$FWA[MAT$ENTRY"LLRQ"];
  1507. SLOWFOR I=0 STEP LLRQENTL WHILE I LS MAT$SPACE[MAT$ENTRY"LLRQ"]
  1508. DO
  1509. BEGIN # CHECK IF CALL FROM *UCP* #
  1510. IF SMAO EQ LLR$SMA[0] ##
  1511. AND YZO EQ LLR$YZ[0] ##
  1512. AND (LLR$DRDL[0] OR LLR$UNLD[0])
  1513. THEN
  1514. BEGIN # CHECK FOR *UCP* OR *INTERNAL* CALL #
  1515.  
  1516. IF LLR$UNLD[0]
  1517. THEN # DUPLICATE CARTRIDGE IN UNLOAD STATE #
  1518. BEGIN
  1519. P<LLRQ> = LLRADR;
  1520. DELAY(UCP$INTV,LLRADR,LLRQIND);
  1521. RETURN;
  1522. END
  1523.  
  1524. IF NOT RQIID
  1525. THEN
  1526. BEGIN # *UCP* DUPLICATE CARTRIDGE REQUEST #
  1527. P<LLRQ> = LLRADR;
  1528. LTCENTRY = LLR$LTCT[0];
  1529. LTC$RQR[LTCENTRY] = RESPTYP4"CSN$IN$USE";
  1530. UCP$RES;
  1531. END # END *UCP* DUPLICATE CARTRIDGE #
  1532. ELSE
  1533. BEGIN # *INTERNAL* DUPLICATE CARTRIDGE REQUEST #
  1534. P<LLRQ> = LLRADR;
  1535. P<HLRQ> = LLR$UCPRA[0];
  1536. HLR$RESP[0] = RESPTYP4"CSN$IN$USE";
  1537. P<CLEAR> = HLR$DRDRA[0];
  1538. CLN = 0;
  1539. HLR$DRDRA[0] = 0;
  1540. HLR$LRQADR[0] = 0;
  1541. ADD$LNK(LLR$UCPRA[0],LCHN"HL$READY",0);
  1542. END
  1543.  
  1544. LLR$PRCST[0] = PROCST"COMPLETE";
  1545. RETURN;
  1546. END # END OF *DUPLICATE* CARTRIDGE FOUND #
  1547.  
  1548. P<LLRQ> = P<LLRQ> + LLRQENTL;
  1549. END # END OF DUPLICATE CARTRIDGE SEARCH #
  1550. P<LLRQ> = LLRADR;
  1551.  
  1552. IF NOT RQIID
  1553. THEN # ASSIGN *DRD* TO EXTERNAL REQUEST #
  1554. BEGIN
  1555. SLOWFOR I=1 STEP 1 UNTIL MAXSMUNIT
  1556. DO
  1557. BEGIN # UNTIL *SM* FOUND #
  1558. IF SMAO EQ SM$ID[I]
  1559. THEN
  1560. BEGIN # *SM* FOUND #
  1561. GOTO SMFOUND;
  1562. END
  1563. END
  1564.  
  1565. SMFOUND:
  1566. DRDCOUNT = 0;
  1567. IF D0$ON[I]
  1568. THEN
  1569. BEGIN
  1570. DRDCOUNT = 1;
  1571. END
  1572.  
  1573. IF D1$ON[I]
  1574. THEN
  1575. BEGIN
  1576. DRDCOUNT = DRDCOUNT + 1;
  1577. END
  1578.  
  1579. IF SM$REQRES1[I] NQ 0 ##
  1580. AND SM$REQRES2[I] NQ 0
  1581. THEN # NO *DRD-S* AVAILABLE #
  1582. BEGIN
  1583. DELAY(UCP$INTV,LLRADR,LLRQIND);
  1584. RETURN;
  1585. END
  1586.  
  1587. IF DRDCOUNT EQ 1
  1588. THEN # ONLY ONE *DRD* ACTIVE #
  1589. BEGIN
  1590. IF (SM$REQRES1[I] NQ 0) ##
  1591. OR (SM$REQRES2[I] NQ 0)
  1592. THEN # NO *DRD* AVAILABLE #
  1593. BEGIN
  1594. DELAY(UCP$INTV,LLRADR,LLRQIND);
  1595. RETURN;
  1596. END
  1597.  
  1598. END # *DRD* = 1 #
  1599.  
  1600. IF SM$REQRES1[I] EQ 0
  1601. THEN # RESERVE A *DRD* #
  1602. BEGIN
  1603. SM$REQRES1[I] = LLRADR;
  1604. SM$LLRQ1[I] = TRUE;
  1605. LLR$DRDRA[0] = LOC(SM$REQRES1[I]);
  1606. END
  1607.  
  1608. ELSE
  1609. BEGIN
  1610. SM$REQRES2[I] = LLRADR;
  1611. SM$LLRQ2[I] = TRUE;
  1612. LLR$DRDRA[0] = LOC(SM$REQRES2[I]);
  1613. END
  1614.  
  1615. END # EXTERNAL *DRD*ASSIGNMENT #
  1616. LLR$RC[0] = REQCODE"SMOUNT"; # ISSUE MOUNT REQUEST TO DRIVER #
  1617. LLR$DRDL[0] = TRUE;
  1618. ADD$LNK(LLRADR,LCHN"DRQUEUE",0);
  1619. LLR$PRCST[0] = PROCST"CONT1";
  1620. RETURN;
  1621.  
  1622. #
  1623. * "CONT1" PROCESS STATE.
  1624. *
  1625. * RETURN RESPONSE FROM *SSDRVR* TO THE REQUESTOR.
  1626. #
  1627.  
  1628. LDCONT: # CONTINUE PROCESSING #
  1629. LTCENTRY = LLR$LTCT[0];
  1630. IF LLR$RQI[0] LQ REQNAME"RQITEST"
  1631. THEN
  1632. BEGIN # REQUEST IS FROM A UCP #
  1633. IF LLR$UCPABT[0]
  1634. THEN
  1635. BEGIN # UCP HAS ABORTED #
  1636. IF LLR$DR[0] EQ RESPTYP4"OK4"
  1637. OR (LLR$DR[0] EQ RESPTYP4"M86$HDW$PR" AND NOT LLR$LDERR[0])
  1638. THEN
  1639. BEGIN # MOUNT WAS OK SO DISMOUNT CARTRIDGE #
  1640. GOTO UNLCART;
  1641. END # MOUNT WAS OK SO DISMOUNT CARTRIDGE #
  1642.  
  1643. ELSE
  1644. BEGIN # CLEAR LLRQ #
  1645. GOTO CL$EX$UDT;
  1646. END
  1647.  
  1648. END # UCP HAS ABORTED #
  1649.  
  1650. ELSE
  1651. BEGIN # UCP IS STILL RUNNING #
  1652. IF LLR$DR[0] EQ RESPTYP4"OK4"
  1653. OR LLR$DR[0] EQ RESPTYP4"CART$LB$ERR" # #
  1654. OR LLR$DR[0] EQ RESPTYP4"UNK$CART"
  1655. THEN
  1656. BEGIN # MOUNT OK, SET UP *LTC* #
  1657. LTC$CART[LTCENTRY] = TRUE;
  1658. LTC$DRD[LTCENTRY] = LLR$DRD[0];
  1659. LTC$YP[LTCENTRY] = LLR$Y[0];
  1660. LTC$ZP[LTCENTRY] = LLR$Z[0];
  1661.  
  1662. #
  1663. * RETURN THE LABEL TO THE UCP. IF THE UCP IS SWAPPED OUT,
  1664. * DELAY THE REQUEST AND TRY AGAIN LATER.
  1665. #
  1666.  
  1667. WRTLOOP:
  1668. LTCENTRY = LLR$LTCT[0];
  1669. LTC$SFUCPA[LTCENTRY] = LLR$ADDR2[0];
  1670. LTC$SFSCPA[LTCENTRY] = MAT$FWA[MAT$ENTRY"LABBUF"];
  1671. LTC$SFFP[LTCENTRY] = LABLEN;
  1672. LTC$SFFC[LTCENTRY] = SFWRIT;
  1673. SFCALL(LOC(LTC$WORD0[LTCENTRY]),RCL);
  1674. IF LTC$SFRC[LTCENTRY] EQ SFRCUCPGON
  1675. THEN
  1676. BEGIN
  1677. GOTO UNLCART;
  1678. END
  1679.  
  1680. IF LTC$SFRC[LTCENTRY] EQ SFRCBDUCPA
  1681. THEN
  1682. BEGIN
  1683. KILL$UC(KILLCODE"INVADDR");
  1684. GOTO UNLCART;
  1685. END
  1686.  
  1687. IF LTC$SFRC[LTCENTRY] EQ SFRCSWPOUT
  1688. THEN
  1689. BEGIN
  1690. LTC$SFUCPA[LTCENTRY] = 0;
  1691. LTC$SFSCPA[LTCENTRY] = 0;
  1692. LTC$SFFC[LTCENTRY] = SFSWPI;
  1693. SFCALL(LOC(LTC$WORD0[LTCENTRY]),RCL);
  1694.  
  1695. #
  1696. * "CONT2" PROCESS STATE.
  1697. #
  1698.  
  1699.  
  1700. LDWAIT1:
  1701.  
  1702. LTCENTRY = LLR$LTCT[0];
  1703. IF LTC$SFFCC[LTCENTRY]
  1704. THEN
  1705. BEGIN
  1706. GOTO WRTLOOP;
  1707. END
  1708.  
  1709. LLR$PRCST[0] = PROCST"CONT2";
  1710. DELAY(UCP$INTV,LLRADR,LLRQIND);
  1711. RETURN;
  1712. END
  1713.  
  1714. LTC$RQR[LTCENTRY] = LLR$DR[0];
  1715. LABELBUSY = FALSE;
  1716. UCP$RES;
  1717. RETURN;
  1718. END # MOUNT WAS OK SO BUILD UTC #
  1719.  
  1720.  
  1721. #
  1722. * ERROR - CLEAN UP *LTCT*.
  1723. #
  1724.  
  1725. LLR$RQR[0] = LLR$DR[0];
  1726. LTC$LLRQA[LTCENTRY] = 0; # CLEAR *LLRQ* ENTRY #
  1727. LTC$RQR[LTCENTRY] = LLR$DR[0];
  1728. UCP$RES;
  1729. END # UCP IS STILL RUNNING #
  1730. LABELBUSY = FALSE;
  1731. CL$EX$UDT:
  1732. P<CLEAR> = LLR$DRDRA[0]; # CLEAR *DRD* RESERVATION #
  1733. CLN = 0;
  1734. LLR$PRCST[0] = PROCST"COMPLETE";
  1735. RETURN;
  1736.  
  1737. END # REQUEST IS FROM A UCP #
  1738.  
  1739.  
  1740. IF LLR$RQI[0] EQ REQNAME"RQIINT"
  1741. THEN # IF REQUEST IS INTERNAL #
  1742. BEGIN
  1743.  
  1744. #
  1745. * ADD REQUESTING *HLRQ* ENTRY TO THE READY CHAIN.
  1746. #
  1747.  
  1748. P<HLRQ> = LLR$UCPRA[0];
  1749. HLR$RESP[0] = LLR$DR[0];
  1750. HLR$ADRD[0] = LLR$DRD[0];
  1751. IF LLR$DR[0] NQ RESPTYP4"OK4"
  1752. THEN
  1753. BEGIN # RETURN THE *LLRQ* #
  1754. MSGS$SKEL[0] = SKELLAB;
  1755. MSGS$CSN[0] = HLR$CSND[0];
  1756. MSGS$SM[0] = HLR$SM[0];
  1757. MSGS$SF[0] = O"33" + HLR$SBF[0];
  1758. MSGS$FAM[0] = HLR$FAM[0];
  1759. MESSAGE(MSGS,SYSUDF1);
  1760.  
  1761. IF (LLR$DR[0] NQ RESPTYP4"CELL$EMP") ##
  1762. AND (LLR$DR[0] NQ RESPTYP4"SMA$OFF") ##
  1763. AND (LLR$DR[0] NQ RESPTYP4"M86$HDW$PR")
  1764. THEN
  1765. BEGIN # OUTPUT DRIVER LABEL BUFFER #
  1766. MSGS$TYPE[0] = "R";
  1767. MSGS$CSN[0] = LAB$CSND[0];
  1768. MSGS$SM[0] = LAB$SMID;
  1769. MSGS$SF[0] = O"33" + LAB$SF;
  1770. MSGS$FAM[0] = LAB$FMLY;
  1771. MESSAGE(MSGS,SYSUDF1);
  1772. END # DRIVER LABEL BUFFER #
  1773.  
  1774. IF LLR$DR[0] EQ RESPTYP4"M86$HDW$PR" AND NOT LLR$LDERR[0]
  1775. THEN
  1776. BEGIN # UNLOAD OF CARTRIDGE #
  1777. GOTO INTIALUNL; # LET EXEC UNLOAD CARTRIDGE #
  1778. END
  1779.  
  1780.  
  1781. #
  1782. * DELINK LLRQ FROM HLRQ.
  1783. * RELEASE LLRQ.
  1784. #
  1785.  
  1786. HLR$LRQADR[0] = 0;
  1787. LLR$PRCST[0] = PROCST"COMPLETE";
  1788. P<CLEAR> = HLR$DRDRA[0]; # CLEAR *DRD* RESERVATION #
  1789. CLN = 0;
  1790. HLR$DRDRA[0] = 0;
  1791. IF LLR$DR[0] EQ RESPTYP4"CELL$EMP" ##
  1792. OR LLR$DR[0] EQ RESPTYP4"SMA$OFF" ##
  1793. OR LLR$DR[0] EQ RESPTYP4"M86$HDW$PR"
  1794. THEN
  1795. BEGIN # DO NOT RELEASE LABEL BUFFER #
  1796. GOTO NOLABREL;
  1797. END # RETURNED #
  1798. END
  1799.  
  1800. INTIALUNL:
  1801. LABELBUSY = FALSE;
  1802.  
  1803. NOLABREL:
  1804.  
  1805. ADD$LNK(LLR$UCPRA[0],LCHN"HL$READY",0);
  1806. RETURN;
  1807. END
  1808.  
  1809. #
  1810. * UNLOAD A CARTRIDGE.
  1811. #
  1812.  
  1813. UNLCART:
  1814. LLR$PRCNME[0] = REQTYP4"UNLD$CART";
  1815. LLR$PRCST[0] = PROCST"INITIAL";
  1816. LABELBUSY = FALSE;
  1817. ADD$LNK(LLRADR,LCHN"LL$READY",0);
  1818. RETURN;
  1819. END # LD$CAR #
  1820.  
  1821. TERM
  1822. PROC LLRQENQ(ADDR);
  1823. # TITLE LLRQENQ - LOW LEVEL REQUEST QUEUE ENQUEUER. #
  1824.  
  1825. BEGIN # LLRQENQ #
  1826.  
  1827. #
  1828. ** LLRQENQ - LOW LEVEL REQUEST QUEUE ENQUEUER.
  1829. *
  1830. * *LLRQENQ* DELETES AN ENTRY FROM THE FREE SPACE CHAIN AND
  1831. * LINKS IT INTO THE *LLRQ* READY CHAIN.
  1832. * *LLRQENQ* IS CALLED ONLY IF THE *LLRQ* IS NOT FULL.
  1833. *
  1834. * PROC LLRQENQ(ADDR)
  1835. *
  1836. * EXIT (ADDR) - ADDRESS OF ENTRY ADDED TO QUEUE.
  1837. *
  1838. * MESSAGES * EXEC ABNORMAL, LLRQENQ.*
  1839. #
  1840.  
  1841. ITEM ADDR U; # ADDRESS OF *LLRQ* ENTRY #
  1842.  
  1843. #
  1844. **** PROC LLRQENQ - XREF LIST BEGIN.
  1845. #
  1846.  
  1847. XREF
  1848. BEGIN
  1849. PROC ABORT; # ABORT #
  1850. PROC ADD$LNK; # ADD ENTRY TO END OF CHAIN #
  1851. PROC DEL$LNK; # DELETE ENTRY FROM CHAIN #
  1852. PROC MESSAGE; # ISSUE MESSAGE #
  1853. END
  1854.  
  1855. #
  1856. **** PROC LLRQENQ - XREF LIST END.
  1857. #
  1858.  
  1859. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  1860. *CALL COMBFAS
  1861. *CALL COMBCHN
  1862. *CALL,COMBKDD
  1863. *CALL COMBLRQ
  1864. *CALL COMXMSC
  1865.  
  1866. CONTROL EJECT;
  1867.  
  1868. #
  1869. * CHECK FOR NO FREE SPACE.
  1870. #
  1871.  
  1872. ADDR = CHN$BOC[LCHN"LL$FRSPC"];
  1873. IF ADDR EQ 0 # IF NO FREE ENTRIES #
  1874. THEN
  1875. BEGIN
  1876. FE$RTN[0] = "LLRQENQ.";
  1877. MESSAGE(FEMSG,UDFL1);
  1878. ABORT;
  1879. END
  1880.  
  1881. DEL$LNK(ADDR,LCHN"LL$FRSPC",0); # DELETE ENTRY FROM FREE SPACE
  1882.   CHAIN #
  1883. P<LLRQ> = ADDR;
  1884. P<KWORD> = LOC(LLR$KWORDS[0]); # PRESET K-DISPLAY WORDS #
  1885. KW$COMP[0] = TRUE;
  1886. ADD$LNK(ADDR,LCHN"LL$READY",0); # ADD ENTRY TO READY CHAIN #
  1887. RETURN;
  1888.  
  1889. END # LLRQENQ #
  1890.  
  1891. TERM
  1892. PROC LLRQMTR;
  1893. # TITLE LLRQMTR - LOW LEVEL REQUEST QUEUE MONITOR. #
  1894.  
  1895. BEGIN # LLRQMTR #
  1896.  
  1897. #
  1898. ** LLRQMTR - LOW LEVEL REQUEST QUEUE MONITOR.
  1899. *
  1900. * THE LOW LEVEL REQUEST QUEUE MONITOR CONTROLS THE ACTIVATION
  1901. * OF *LLRQ* PROCESSORS. EACH *LLRQ* ENTRY ON THE READY CHAIN IS
  1902. * ACTIVATED BY CALLING THE APPROPRIATE PROCESSOR.
  1903. *
  1904. * PROC LLRQMTR
  1905. *
  1906. * EXIT IF THE PROCESS STATE FIELD OF AN *LLRQ* ENTRY IS SET
  1907. * TO "COMPLETE" AFTER ITS PROCESSOR IS CALLED, THE ENTRY
  1908. * IS CLEARED AND LINKED INTO THE FREE SPACE CHAIN.
  1909. * OTHERWISE, THE PROCESSOR HAS SET UP SOME CONDITION
  1910. * THAT WILL EVENTUALLY CAUSE THE *LLRQ* ENTRY TO BE
  1911. * RELINKED INTO THE *LLRQ* READY CHAIN.
  1912. #
  1913.  
  1914. #
  1915. **** PROC LLRQMTR - XREF LIST BEGIN.
  1916. #
  1917.  
  1918. XREF
  1919. BEGIN
  1920. PROC ADD$LNK; # ADD ENTRY TO END OF CHAIN #
  1921. PROC CPY$DS; # COPY DISK TO VOLUME #
  1922. PROC CPY$RS; # COPY RAW VOLUME #
  1923. PROC CPY$SD; # COPY VOLUME TO DISK #
  1924. PROC DEL$LNK; # DELETE ENTRY FROM CHAIN #
  1925. PROC INIT$HW; # INITIALIZE M860 HARDWARE #
  1926. PROC LD$CAR; # LOAD CARTRIDGE #
  1927. PROC SSDRVR; # SS DRIVER #
  1928. PROC UNL$CAR; # UNLOAD CARTRIDGE #
  1929. PROC WT$LAB; # WRITE LABEL #
  1930. PROC ZFILL; # ZERO FILL BUFFER #
  1931. END
  1932.  
  1933. #
  1934. **** PROC LLRQMTR - XREF LIST END.
  1935. #
  1936.  
  1937. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  1938. *CALL COMBFAS
  1939. *CALL COMBCHN
  1940. *CALL COMBCPR
  1941. *CALL COMBLRQ
  1942. *CALL COMXMSC
  1943.  
  1944. ITEM LLRENT U; # *LLRQ* ENTRY ADDRESS #
  1945.  
  1946. SWITCH LLPROC:REQTYP4 # *LLRQ* PROCESSOR CALLS #
  1947. LL1:LOAD$CART, # #
  1948. LL2:UNLD$CART, # #
  1949. LL3:WRT$LAB, # #
  1950. LL4:CPY$AD, # #
  1951. LL5:CPY$DA, # #
  1952. LL6:CP$RAW$AU, # #
  1953. LL7:INITHW, # #
  1954.  
  1955. ENDLLP:LSTREQTYP4; # END OF *LLRQ* PROCESSOR CALLS #
  1956.  
  1957. CONTROL EJECT;
  1958.  
  1959. #
  1960. * *LLRQMTR* IS CALLED WHEN THERE IS WORK FOR *SSDRVR* TO DO OR
  1961. * WHEN THERE ARE ENTRIES ON THE *LLRQ* READY CHAIN TO BE PROCESSED.
  1962. * PROCESSING OF ENTRIES ON THE *LLRQ* READY CHAIN CAN CREATE WORK
  1963. * FOR *SSDRVR*, AND EXECUTION OF *SSDRVR* CAN PUT ENTRIES BACK
  1964. * ON THE *LLRQ* READY CHAIN.
  1965. #
  1966.  
  1967. IF CHN$BOC[LCHN"LL$READY"] EQ 0
  1968. THEN # IF READY CHAIN IS EMPTY #
  1969. BEGIN
  1970. SSDRVR;
  1971. END
  1972.  
  1973. #
  1974. * TRAVERSE THE *LLRQ* READY CHAIN.
  1975. #
  1976.  
  1977. REPEAT WHILE CHN$BOC[LCHN"LL$READY"] NQ 0
  1978. DO
  1979. BEGIN # PROCESS READY *LLRQ* ENTRIES #
  1980. LLRENT = CHN$BOC[LCHN"LL$READY"];
  1981. DEL$LNK(LLRENT,LCHN"LL$READY",0);
  1982. P<LLRQ> = LLRENT;
  1983.  
  1984. #
  1985. * SIMULATED CASE STATEMENT FOR *LLRQ* PROCESSOR CALLS.
  1986. #
  1987.  
  1988. GOTO LLPROC[LLR$PRCNME[0]];
  1989.  
  1990. LL1: # LOAD CARTRIDGE #
  1991. LD$CAR(LLRENT);
  1992. GOTO ENDLLP;
  1993.  
  1994. LL2: # UNLOAD CARTRIDGE #
  1995. UNL$CAR(LLRENT);
  1996. GOTO ENDLLP;
  1997.  
  1998. LL3: # WRITE LABEL #
  1999. WT$LAB(LLRENT);
  2000. GOTO ENDLLP;
  2001.  
  2002. LL4: # COPY VOLUME TO DISK #
  2003. CPY$SD(LLRENT);
  2004. GOTO ENDLLP;
  2005.  
  2006. LL5: # COPY DISK TO VOLUME #
  2007. CPY$DS(LLRENT);
  2008. GOTO ENDLLP;
  2009.  
  2010. LL6: # COPY RAW VOLUME #
  2011. CPY$RS(LLRENT);
  2012. GOTO ENDLLP;
  2013.  
  2014. LL7: # INITIALIZE M860 HARDWARE #
  2015. INIT$HW(LLRENT);
  2016. GOTO ENDLLP;
  2017.  
  2018.  
  2019.  
  2020. ENDLLP: # CONTINUE #
  2021.  
  2022. #
  2023. * END SIMULATED CASE STATEMENT FOR *LLRQ* PROCESSOR CALLS.
  2024. #
  2025.  
  2026. #
  2027. * IF A PROCESSOR CREATED WORK FOR THE DRIVER, CALL *SSDRVR*.
  2028. #
  2029.  
  2030. IF CHN$BOC[LCHN"DRQUEUE"] NQ 0
  2031. THEN # IF DRIVER QUEUE NOT EMPTY #
  2032. BEGIN
  2033. SSDRVR;
  2034. END
  2035.  
  2036. #
  2037. * ADD *LLRQ* ENTRY TO THE FREE SPACE CHAIN IF PROCESS IS COMPLETE.
  2038. #
  2039.  
  2040. P<LLRQ> = LLRENT;
  2041. IF LLR$PRCST[0] EQ PROCST"COMPLETE"
  2042. THEN # IF PROCESS IS COMPLETE #
  2043. BEGIN
  2044. ZFILL(LLRQ,LLRQENTL); # CLEAR *LLRQ* ENTRY #
  2045. ADD$LNK(LLRENT,LCHN"LL$FRSPC",0);
  2046. END
  2047.  
  2048. END # PROCESS READY *LLRQ* ENTRIES #
  2049.  
  2050. RETURN;
  2051. END # LLRQMTR #
  2052.  
  2053. TERM
  2054. PROC UNL$CAR((LLRENT));
  2055. # TITLE UNL$CAR - RETURN CARTRIDGE TO MATRIX. #
  2056.  
  2057. BEGIN # UNL$CAR #
  2058.  
  2059. #
  2060. ** UNL$CAR - RETURN CARTRIDGE TO MATRIX.
  2061. *
  2062. * *UNL$CAR* RETURNS THE CARTRIDGE FROM THE DRD TO THE
  2063. * DESIGNATED MATRIX POSITION. IF THE CARTRIDGE IS ASSIGNED TO THE
  2064. * INPUT TRAY ON ENTRY, THE ASSIGNMENT WILL BE CHANGED TO THE
  2065. * OUTPUT TRAY PRIOR TO DISMOUNTING THE CARTRIDGE.
  2066. *
  2067. * PROC UNL$CAR((LLRENT))
  2068. *
  2069. * ENTRY (LLRENT) - ADDRESS OF *LLRQ* ENTRY FOR THE REQUEST
  2070. * CONTAINING THE SMA-ID AND THE YZ
  2071. * COORDINATES.
  2072. *
  2073. * EXIT THE PROCESS STATE FIELD IN THE *LLRQ* ENTRY HAS BEEN
  2074. * ADVANCED TO INDICATE WHERE PROCESSING OF THIS REQUEST
  2075. * LEFT OFF, AND THUS WHAT TO DO NEXT TO ADVANCE THE
  2076. * REQUEST.
  2077. *
  2078. * WHEN THE PROCESS IS COMPLETED AN ERROR RESPONSE CODE
  2079. * IS RETURNED VIA *LTC$RQR[LTCENTRY]* FOR EXTERNAL
  2080. * REQUESTORS OR *HLR$RESP[0]* FOR INTERNAL REQUESTORS.
  2081. * RESPONSE CODE (VALUES ARE DEFINED IN *COMBCPR*).
  2082. * = RESPTYP4"OK4".
  2083. *
  2084. * THE CARTRIDGE LOAD, PASS, AND ERROR COUNTS ARE
  2085. * ALSO RETURNED WHEN THE REQUEST IS COMPLETED.
  2086. *
  2087. * NOTES THIS MODULE IS A PSEUDO REENTRANT ROUTINE.
  2088. #
  2089.  
  2090. ITEM LLRENT U; # *LLRQ* ENTRY TO PROCESS #
  2091. ITEM LLRENTI U; # WAITTING *LLRQ* ADDRESS #
  2092. ITEM SCR1 U; # SCRATCH WORD #
  2093. ITEM SCR2 U; # SCRATCH WORD #
  2094. ITEM SCR3 U; # SCRATCH WORD #
  2095.  
  2096. #
  2097. **** PROC UNL$CAR - XREF LIST BEGIN.
  2098. #
  2099.  
  2100. XREF
  2101. BEGIN
  2102. PROC ADD$LNK; # ADD ENTRY TO END OF CHAIN #
  2103. PROC UCP$RES; # NOTIFY UCP OF REQUEST COMPLETE #
  2104. END
  2105.  
  2106. #
  2107. **** PROC UNL$CAR - XREF LIST END.
  2108. #
  2109.  
  2110. DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
  2111.  
  2112. *CALL COMBFAS
  2113. *CALL COMBCHN
  2114. *CALL COMBCPR
  2115. *CALL COMBLRQ
  2116. *CALL COMBRCD
  2117. *CALL COMBUCR
  2118. *CALL COMXHLR
  2119. *CALL COMXLTC
  2120. *CALL COMXMSC
  2121.  
  2122.  
  2123. BASED
  2124. ARRAY CLEAR [0:0] S(1);
  2125. BEGIN
  2126. ITEM CLN U(00,36,24); # CLEAR *DRD* ASSIGNMENT #
  2127. END
  2128.  
  2129.  
  2130. SWITCH UNLENTR:PROCST # UNLOAD CARTRIDGE ENTRIES #
  2131. UNLINIT:INITIAL, # INITIAL ENTRY POINT #
  2132. UNLC1:CONT1; # CONTINUE AFTER DISMOUNT REQUEST
  2133.   #
  2134. CONTROL EJECT;
  2135. P<LLRQ> = LLRENT;
  2136. GOTO UNLENTR[LLR$PRCST[0]];
  2137.  
  2138. #
  2139. * "INITIAL" PROCESS STATE.
  2140. *
  2141. * ASSIGN THE CARTRIDGE TO THE EXIT TRAY IF THE ORIGINAL
  2142. * ASSIGNMENT WAS TH ENTRY TRAY.
  2143. #
  2144.  
  2145. UNLINIT:
  2146.  
  2147. IF LLR$Y[0] EQ SM$ENT$TY ##
  2148. AND LLR$Z[0] EQ SM$TY$Z
  2149. THEN
  2150. BEGIN
  2151. LLR$Y[0] = SM$EXIT$TY;
  2152. LLR$Z[0] = SM$TY$Z;
  2153. END
  2154.  
  2155.  
  2156. #
  2157. * DISMOUNT THE CARTRIDGE.
  2158. #
  2159.  
  2160. LLR$RC[0] = REQCODE"SDISMOUNT";
  2161. LLR$PRCST[0] = PROCST"CONT1";
  2162. LLR$DRDL[0] = FALSE;
  2163. LLR$UNLD[0] = TRUE; # UNLOAD STARTED #
  2164. LLR$RS[0] = PROCST"INITIAL";
  2165. ADD$LNK(LLRENT,LCHN"DRQUEUE",0);
  2166. RETURN;
  2167.  
  2168. #
  2169. * "CONT1" PROCESS STATE.
  2170. *
  2171. * UPDATE THE APPROPRIATE DATA FIELDS OF THE REQUEST AND PASS
  2172. * THE REQUEST ON TO THE NEXT PROCESS.
  2173. #
  2174.  
  2175. UNLC1:
  2176.  
  2177. IF LLR$RQI[0] EQ REQNAME"RQIINT"
  2178. THEN
  2179. BEGIN # INTERNAL REQUEST #
  2180. P<HLRQ> = LLR$UCPRA[0];
  2181. HLR$LRQADR[0] = 0; # DELINK *LLRA* FROM *HLRA* #
  2182. HLR$RESP[0] = RESPTYP4"OK4";
  2183. ADD$LNK(LLR$UCPRA[0],LCHN"HL$READY",0);
  2184. END # INTERNAL REQUEST #
  2185.  
  2186. ELSE
  2187. BEGIN # EXTERNAL REQUEST #
  2188. P<CLEAR> = LLR$DRDRA[0]; # CLEAR *DRD* RESERVE #
  2189. CLN = 0;
  2190. IF NOT LLR$UCPABT[0]
  2191. THEN # RETURN RESPONSE TO UCP #
  2192. BEGIN
  2193. LTCENTRY = LLR$LTCT[0];
  2194. LTC$LLRQA[LTCENTRY] = 0;
  2195. LTC$CART[LTCENTRY] = FALSE;
  2196. LTC$RQR[LTCENTRY] = RESPTYP4"OK4";
  2197. UCP$RES;
  2198. END
  2199.  
  2200. END # EXTERNAL REQUEST #
  2201.  
  2202.  
  2203. #
  2204. * MARK THE REQUEST COMPLETE AND RETURN TO *LLRQ* MONITOR.
  2205. #
  2206.  
  2207. LLR$UNLD[0] = FALSE; # UNLOAD COMPLETE #
  2208. LLR$PRCST[0] = PROCST"COMPLETE";
  2209. RETURN;
  2210.  
  2211. END # UNL$CAR #
  2212.  
  2213. TERM
  2214. PROC SETFET(LLRADR);
  2215. # TITLE SETFET - SETS LARGE BUFFER POINTERS #
  2216.  
  2217. BEGIN # SETFET #
  2218.  
  2219. #
  2220. ** SETFET - SETS LARGE BUFFER POINTERS.
  2221. *
  2222. * *SETFET* SETS FET POINTERS FOR CIO AND *1SS*.
  2223. *
  2224. * PROC SETFET
  2225. *
  2226. * ENTRY (LLRADR) - ADDRESS OF THE *LLRQ* ENTRY THAT
  2227. * CONTAINS THE ADDRESS OF THE DISK
  2228. * AND *M860* FET AND BUFFER ADDRESSES.
  2229. * (LARGE BUFFER MUST ALREADY EXIST.)
  2230. *
  2231. * EXIT FETS ARE COMPLETE FOR BOTH CIO AND *1SS*
  2232. * PROCESSING. STRIPE HIGH AND LOW SET INTO THE
  2233. * *LLRQ*.
  2234. *
  2235. * NOTES THIS MODULE IS CALLED ONLY BY THE COP$XX ROUTINES.
  2236. #
  2237.  
  2238. ITEM LLRADR; # *LLRQ* ADDRESS #
  2239.  
  2240. #
  2241. **** PROC SETFET - XREF LIST BEGIN.
  2242. #
  2243.  
  2244. XREF
  2245. BEGIN
  2246. PROC ZFILL; # ZERO FILL BUFFER #
  2247. PROC ZSETFET; # INITIALIZE A FET #
  2248. END
  2249.  
  2250. #
  2251. **** PROC SETFET - XFET LIST END.
  2252. #
  2253.  
  2254. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  2255.  
  2256. *CALL COMBFAS
  2257. *CALL COMBCPR
  2258. *CALL COMBFET
  2259. *CALL COMBLRQ
  2260. *CALL COMXBST
  2261. *CALL COMXCCB
  2262. *CALL COMXHLR
  2263.  
  2264. #
  2265. * SET *LLRQ* STIPE LOW AND HIGH POINTERS.
  2266. #
  2267.  
  2268. P<LLRQ> = LLRADR;
  2269. P<HLRQ> = LLR$UCPRA[0];
  2270. P<CCB> = LLR$CCB[0];
  2271. IF LLR$PRCNME[0] NQ REQTYP4"CP$RAW$AU"
  2272. THEN
  2273. BEGIN
  2274. LLR$ST$LW[0] = INSPAU*HLR$VOLAU[0]+(INFTST-INSPAU);
  2275. LLR$ST$HI[0] = INSPAU*HLR$VOLLN[0]+LLR$ST$LW[0]-1;
  2276. END
  2277.  
  2278. #
  2279. * INITIALIZE CIO AND *1SS* FETS.
  2280. #
  2281.  
  2282. CCBDKFET[0] = LLR$DSKFET[0];
  2283. CCBM86FET[0] = LLR$MSFET[0];
  2284. CCBLLRQ[0] = LLRADR;
  2285. CCBCLFG[0] = 0;
  2286. CCBRWCT[0] = 0; # CLEAR COUNTER #
  2287. ZSETFET(LLR$DSKFET[0],HLR$FLNM[0],LLR$DA[0],DATABL,(RFETL+RFHBL));
  2288. P<FETFHB> = LLR$MSFET[0];
  2289. P<FETSET> = LLR$DSKFET[0];
  2290. FET$EP[0] = TRUE;
  2291. FET$R[0] = TRUE;
  2292. FET$UP[0] = TRUE;
  2293. FHB$FRST[0] = FET$FRST[0];
  2294. FHB$IN[0] = FET$IN[0];
  2295. FHB$OUT[0] = FET$OUT[0];
  2296. FHB$LIM[0] = FET$LIM[0];
  2297.  
  2298. END
  2299.  
  2300. TERM
  2301. PROC WT$LAB((LLRENT));
  2302. # TITLE WT$LAB - WRITE CARTRIDGE LABEL. #
  2303.  
  2304. BEGIN # WT$LAB #
  2305.  
  2306. #
  2307. ** WT$LAB - WRITE CARTRIDGE LABEL.
  2308. *
  2309. * *WT$LAB* WRITES THE CARTRIDGE LABEL.
  2310. *
  2311. * PROC WT$LAB((LLRENT))
  2312. *
  2313. * ENTRY (LLRENT) - ADDRESS OF *LLRQ* ENTRY FOR THE REQUEST
  2314. * CONTAINING THE SMA-ID, THE VOLUME NUMBER,
  2315. * AND THE YZ COORDINATES.
  2316. *
  2317. * EXIT THE PROCESS STATE FIELD IN THE *LLRQ* ENTRY HAS BEEN
  2318. * ADVANCED TO INDICATE WHERE PROCESSING OF THIS REQUEST
  2319. * LEFT OFF, AND THUS WHAT TO DO NEXT TO ADVANCE THE
  2320. * REQUEST.
  2321. *
  2322. * WHEN THE PROCESS IS COMPLETED AN ERROR RESPONSE CODE
  2323. * IS RETURNED VIA LTC$RQR[LTCENTRY] FOR EXTERNAL
  2324. * REQUESTORS OR HLR$RESP[0] FOR INTERNAL REQUESTORS.
  2325. * IS RETURNED VIA *LTC$RQR[LTCENTRY]* FOR EXTERNAL
  2326. * REQUESTORS OR *HLR$RESP[0]* FOR INTERNAL REQUESTORS.
  2327. * RESPONSE CODE (VALUES ARE DEFINED IN *COMBCPR*).
  2328. * = RESPTYP4"OK4".
  2329. * = RESPTYP4"UN$WRT$ERR".
  2330. * = RESPTYP4"EX$WRT$ERR".
  2331. * = RESPTYP4"MSFHDW$ERR".
  2332. *
  2333. * MESSAGES * EXEC ABNORMAL, WT$LAB.*
  2334. *
  2335. * NOTES THIS MODULE IS A PSEUDO REENTRANT ROUTINE.
  2336. *
  2337. * COMMON BUFFER *LABBUF* WILL BE USED TO TRANSFER
  2338. * THE LABEL FROM THE *UCP* TO THE *SSDRIVER*.
  2339. #
  2340.  
  2341. ITEM LLRENT U; # ADDRESS OF *LLRQ* ENTRY #
  2342.  
  2343. #
  2344. **** PROC WT$LAB - XREF LIST BEGIN.
  2345. #
  2346.  
  2347. XREF
  2348. BEGIN
  2349. PROC ABORT; # INTERFACE TO *ABORT* MACRO #
  2350. PROC ADD$LNK; # ADD ENTRY TO END OF CHAIN #
  2351. PROC DELAY; # TIMED DELAY #
  2352. PROC KILL$UC; # ABORT A UCP #
  2353. PROC MESSAGE; # CALLS *MESSAGE* MACRO #
  2354. PROC SFCALL; # INTERFACE TO *SFCALL* MACRO #
  2355. PROC UCP$RES; # NOTIFY UCP OF REQUEST COMPLETE #
  2356. END
  2357.  
  2358. #
  2359. **** PROC WT$LAB - XREF LIST END.
  2360. #
  2361.  
  2362. DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
  2363.  
  2364. *CALL COMBFAS
  2365. *CALL COMBCHN
  2366. *CALL COMBCPR
  2367. *CALL COMBFET
  2368. *CALL COMBLBL
  2369. *CALL COMBLRQ
  2370. *CALL COMBMAT
  2371. *CALL COMBRCD
  2372. *CALL COMBUCR
  2373. *CALL COMXCTF
  2374. *CALL COMXHLR
  2375. *CALL COMXIPR
  2376. *CALL COMXLTC
  2377. *CALL COMXMSC
  2378.  
  2379.  
  2380. ITEM REQTYP B=FALSE; # *LLRQ* ID FOR *GET$SB* #
  2381.  
  2382. BASED
  2383. ARRAY CLEAR [0:0] S(1);
  2384. BEGIN
  2385. ITEM CLN U(00,36,24); # CLEAR *DRD* ASSIGNMENT #
  2386. END
  2387.  
  2388. SWITCH WTENTR:PROCST # WRITE LABEL ENTRIES #
  2389. WTINIT:INITIAL, # INITIAL ENTRY POINT #
  2390. WTC1:CONT1, # AFTER A SWAPIN DELAY #
  2391. WTC2:CONT2; # AFTER WRITE LABEL #
  2392. CONTROL EJECT;
  2393. P<LLRQ> = LLRENT;
  2394. LLR$DR[0] = 0;
  2395. LTCENTRY = LLR$LTCT[0];
  2396. GOTO WTENTR[LLR$PRCST[0]];
  2397.  
  2398. #
  2399. * "INITIAL" PROCESS STATE.
  2400. #
  2401.  
  2402. WTINIT:
  2403.  
  2404. #
  2405. * CHECK LABEL BUFFER FOR BUSY. IF BUSY, RETURN *LLRQ*
  2406. * TO THE DELAY CHAIN.
  2407. #
  2408.  
  2409.  
  2410. IF LABELBUSY
  2411. THEN
  2412. BEGIN # EXIT TO DELAY CHAIN #
  2413. DELAY(UCP$INTV,LLRENT,LLRQIND);
  2414. RETURN;
  2415. END # RETURNED TO DELAY CHAIN #
  2416.  
  2417. LABELBUSY = TRUE; # RESERVE LABEL BUFFER #
  2418. #
  2419. * READ THE LABEL FROM THE UCP. IF THE UCP IS SWAPPED OUT, DELAY
  2420. * THE REQUEST AND TRY AGAIN LATER.
  2421. #
  2422.  
  2423. SFLOOP:
  2424. LTC$SFUCPA[LTCENTRY] = LLR$ADDR2[0];
  2425. LTC$SFSCPA[LTCENTRY] = MAT$FWA[MAT$ENTRY"LABBUF"];
  2426. LTC$SFFP[LTCENTRY] = LABLEN;
  2427. LTC$SFFC[LTCENTRY] = SFREAD;
  2428. SFCALL(LOC(LTC$WORD0[LTCENTRY]),RCL);
  2429. IF LTC$SFRC[LTCENTRY] EQ SFRCUCPGON
  2430. THEN
  2431. BEGIN
  2432. GOTO COMPLUCP;
  2433. END
  2434.  
  2435. IF LTC$SFRC[LTCENTRY] EQ SFRCBDUCPA
  2436. THEN
  2437. BEGIN
  2438. KILL$UC(KILLCODE"INVADDR");
  2439. GOTO COMPLUCP;
  2440. END
  2441.  
  2442. IF LTC$SFRC[LTCENTRY] EQ SFRCSWPOUT
  2443. THEN
  2444. BEGIN
  2445. LTC$SFUCPA[LTCENTRY] = 0;
  2446. LTC$SFSCPA[LTCENTRY] = 0;
  2447. LTC$SFFC[LTCENTRY] = SFSWPI;
  2448. SFCALL(LOC(LTC$WORD0[LTCENTRY]),RCL);
  2449.  
  2450. #
  2451. * "CONT1" PROCESS STATE.
  2452. #
  2453.  
  2454. WTC1:
  2455. LTCENTRY = LLR$LTCT[0];
  2456. IF LTC$SFFCC[LTCENTRY]
  2457. THEN
  2458. BEGIN
  2459. GOTO SFLOOP;
  2460. END
  2461.  
  2462. LLR$PRCST[0] = PROCST"CONT1";
  2463. DELAY(UCP$INTV,LLRENT,LLRQIND);
  2464. RETURN;
  2465. END
  2466.  
  2467. IF LTC$SFRC[LTCENTRY] NQ 0
  2468. THEN
  2469. BEGIN
  2470. FE$RTN[0] = "WT$LAB.";
  2471. MESSAGE(FEMSG[0],UDFL1);
  2472. ABORT;
  2473. END
  2474.  
  2475.  
  2476. LLR$PRCST[0] = PROCST"CONT2";
  2477. LLR$RC[0] = REQCODE"SWRT$LABEL";
  2478. LLR$RS[0] = PROCST"INITIAL";
  2479. ADD$LNK(LLRENT,LCHN"DRQUEUE",0);
  2480. RETURN;
  2481.  
  2482. #
  2483. * RETURN THE RESPONSE CODE TO THE *UCP*.
  2484. #
  2485.  
  2486. COMPLUCP:
  2487. LABELBUSY = FALSE;
  2488. LLR$DR[0] = 0;
  2489. LLR$UCPABT[0] = FALSE;
  2490. LLR$Y[0] = SM$EXIT$TY;
  2491. LLR$Z[0] = SM$TY$Z;
  2492. LLR$PRCNME[0] = REQTYP4"UNLD$CART";
  2493. LLR$PRCST[0] = PROCST"INITIAL";
  2494. ADD$LNK(LLRENT,LCHN"LL$READY",0);
  2495. RETURN;
  2496.  
  2497. #
  2498. * "CONT2" PROCESS STATE.
  2499. #
  2500.  
  2501. WTC2:
  2502.  
  2503. #
  2504. * MARK THE REQUEST COMPLETE AND RETURN TO *LLRQ* MONITOR.
  2505. #
  2506.  
  2507. IF NOT LLR$UCPABT[0]
  2508. THEN
  2509. BEGIN # SEND REQUEST BACK TO UCP #
  2510. LTC$CART[LTCENTRY] = FALSE;
  2511. LTC$LLRQA[LTCENTRY] = 0;
  2512. LTC$RQR[LTCENTRY] = LLR$DR[0];
  2513. UCP$RES;
  2514. END # COMPLETED RETURN REQUEST #
  2515.  
  2516. P<CLEAR> = LLR$DRDRA[0]; # CLEAR *DRD* RESERVE #
  2517. CLN = 0;
  2518. LLR$PRCST[0] = PROCST"COMPLETE";
  2519. RETURN;
  2520. END # WT$LAB #
  2521.  
  2522. TERM
1) , 2) , 3) , 4) , 6)
LLRADR
5)
CCBADR
7) , 8)
LLRENT
cdc/nos2.source/opl871/sxllr.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator