Table of Contents

0RT

Table Of Contents

  • [00009] 0RT - RETURN TAPE RESOURCE.
  • [00011] RETURN TAPE RESOURCE.
  • [00073] MAIN PROGRAM.
  • [00075] RTR - MAIN ROUTINE.
  • [00159] HNG - HANG PP.
  • [00170] RTU - RELEASE TAPE UNIT.
  • [00227] SUBROUTINES.
  • [00229] RRF - READ RESOURCE FILE ENTRY.
  • [00295] CLE - CLEAR/UPDATE FILE ENTRY.
  • [00340] PAU - PAUSE AND CHECK FOR OPERATOR OVERRIDE.

Source Code

0RT.txt
  1. IDENT 0RT,RTRX
  2. PERIPH J
  3. BASE MIXED
  4. SST
  5. REL$ SET 0
  6. QUAL$ EQU 1 DEFINE UNQUALIFIED COMMON DECKS
  7. *COMMENT 0RT - RETURN TAPE RESOURCE.
  8. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  9. TITLE 0RT - RETURN TAPE RESOURCE.
  10. SPACE 4,10
  11. *** 0RT - RETURN TAPE RESOURCE.
  12. *
  13. * J. L. LARSON. 81/12/14.
  14. SPACE 4,10
  15. *** *0RT* IS A LOCATION FREE ROUTINE USED TO CLEAR
  16. * THE ASSOCIATED VSN (RSXVID) FILE ENTRY AND UPDATE THE
  17. * JOB DEMAND (RSXDID) FILE ENTRY FOR RETURN OF A TAPE RESOURCE.
  18. *
  19. * *0RT* IS CALLED BY *0DF* (RETURN/UNLOAD TAPE).
  20. SPACE 4,10
  21. *** ENTRY CONDITIONS.
  22. *
  23. * (FA) = RELATIVE FNT ADDRESS IN NFL
  24. * ((LA)-1) = Y
  25. * WHERE LA = LOAD ADDRESS
  26. * Y = RESOURCE UPDATE CONTROL
  27. * BIT 0 = 0, IF UPDATING ASSIGNED AND DEMAND
  28. * 1, IF NOT UPDATING DEMAND COUNT
  29. * (FS - FS+4) = FST INFORMATION
  30. *
  31. * USES DIRECT CELLS 0 - 17.
  32. * *BFMS* MS SECTOR BUFFER.
  33. SPACE 4,10
  34. *** EXIT CONDITIONS.
  35. *
  36. * (A) .LT. 0 IF RESOURCE DEMAND FILE DEVICE INACCESSIBLE.
  37. * (T5) = EST ORDINAL OF DEVICE, IF INACCESSIBLE.
  38. * (FSTL OF FNT) UPDATED IN CM.
  39. SPACE 4,10
  40. ** COMMON DECKS.
  41.  
  42.  
  43. *CALL COMPMAC
  44. *CALL COMSCPS
  45. QUAL COMSMTX
  46. *CALL COMSMTX
  47. QUAL *
  48. *CALL COMSPIM
  49. *CALL COMSMSP
  50. *CALL COMPREL
  51. QUAL COMSRSX
  52. *CALL COMSRSX
  53. QUAL *
  54. *CALL COMSSSD
  55. *CALL COMSZOL
  56. SPACE 4,10
  57. **** DIRECT LOCATION ASSIGNMENTS.
  58.  
  59.  
  60. FS EQU 20 - 24 FST INFORMATION (5 LOCATIONS)
  61. RI EQU FS+2 RANDOM INDEX (2 LOCATIONS)
  62. FA EQU 57 RELATIVE FNT ADDRESS IN NFL
  63. SPACE 4,10
  64. * ASSEMBLY CONSTANTS.
  65.  
  66.  
  67. DFRA EQU BFMS+2+/COMSRSX/VDFI*5+3 DEMAND FILE RANDOM ADDRESS
  68. TACT EQU BFMS+2+/COMSRSX/RVAL*5+3 TOTAL ASSIGNED COUNT
  69. TDCT EQU BFMS+2+/COMSRSX/RVAL*5+4 TOTAL DEMAND COUNT
  70. TRIX EQU BFMS+2+/COMSRSX/VDFI*5+2 TAPE RESOURCE INDEX
  71.  
  72. ****
  73. TITLE MAIN PROGRAM.
  74. RTR SPACE 4,10
  75. ** RTR - MAIN ROUTINE.
  76.  
  77.  
  78. ORG 5
  79. RTR SUBR ENTRY/EXIT
  80. RJM IFP INITIALIZE GLOBAL FNT PROCESSOR
  81. LDD FS+4
  82. SHN 21-2
  83. MJN RTR1 IF PREVIOUS DEMAND FILE ERROR
  84. LDN RVFO SET RESOURCE VSN FILE ORDINAL
  85. RJM RRF READ VSN FILE ENTRY
  86.  
  87. * CLEAR VSN ENTRY.
  88.  
  89. LDM. DFRA SET DEMAND FILE RANDOM ADDRESS
  90. STD RI
  91. LDM. DFRA+1
  92. STD RI+1
  93. LDM. TRIX GET TAPE RESOURCE INDEX AND BYTE POINTER
  94. SBD HN CONVERT BYTE POINTER TO ACCESS LEVEL
  95. SHN 3
  96. LMN 4
  97. RAD FS+4
  98. LDN 0
  99. RJM CLE CLEAR VSN ENTRY
  100. LDD FS+1
  101. ZJN RTRX IF NO UDT ADDRESS
  102. RTR1 LDN RDFO RESOURCE DEMAND FILE ORDINAL
  103. RJM RRF READ DEMAND FILE ENTRY
  104. * UJN URC UPDATE RESOURCE COUNTS
  105. URC SPACE 4,10
  106. * URC - UPDATE RESOURCE ASSIGNED AND DEMAND COUNTS.
  107. *
  108. * ENTRY (FS+4) = RESOURCE BYTE POINTER.
  109. *
  110. * EXIT TO *RTU* TO RELEASE TAPE UNIT.
  111. *
  112. * ERROR TO *HNG* IF RESOURCE COUNTS INVALID.
  113. *
  114. * USES T2.
  115.  
  116.  
  117. URC BSS 0 ENTRY
  118. LDD FS+4
  119. SHN -3 CALCULATE RESOURCE BYTE NUMBER
  120. LPN 77
  121. STD T2
  122. SHN 2
  123. ADC BFMS+2+5
  124. RAD T2
  125. LDD FS+4
  126. ADD TH CONVERT ACCESS LEVEL TO BYTE POINTER
  127. SHN -11
  128. SBN 5
  129. MJN URC1 IF NOT IN SECOND WORD OF ENTRY
  130. ADN 1 ADJUST TO SECOND WORD
  131. URC1 RAD T2
  132.  
  133. * DECREMENT RESOURCE ASSIGNED COUNT AND TOTAL ASSIGNED COUNT.
  134.  
  135. LDC -100 DECREMENT RESOURCE ASSIGNED COUNT
  136. RAI T2
  137. MJN HNG IF RESOURCE ASSIGNED COUNT OUT OF RANGE
  138. LDM. TDCT CHECK TOTAL DEMAND COUNT = 1
  139. SBN 1
  140. ZJN URC2 IF ONLY ONE CONCURRENT RESOURCE SCHEDULED
  141. LDM -1
  142. NJN URC3 IF UNLOAD (DECREMENT ASSIGNED COUNT)
  143.  
  144. * IF ALL DEMANDS SATISFIED, DECREMENT RESOURCE DEMAND COUNT
  145. * AND TOTAL DEMAND COUNT.
  146.  
  147. URC2 LDM. TACT CHECK ALL DEMANDS SATISFIED
  148. SBM. TDCT
  149. MJN URC3 IF NOT ALL DEMANDS SATISFIED
  150. SOI T2 DECREMENT RESOURCE DEMAND COUNT
  151. SHN 21-5
  152. MJN HNG IF RESOURCE DEMAND COUNT OUT OF RANGE
  153. SOM. TDCT DECREMENT TOTAL DEMAND COUNT
  154. MJN HNG IF TOTAL DEMAND COUNT NOT IN RANGE
  155. URC3 SOM. TACT
  156. PJN RTU IF TOTAL ASSIGNED COUNT NOT OUT OF RANGE
  157. * UJN HNG HANG PP
  158. HNG SPACE 4,10
  159. ** HNG - HANG PP.
  160. *
  161. * EXIT TO *RRF4* IF PP HANG CLEARED.
  162. *
  163. * MACROS MONITOR.
  164.  
  165.  
  166. HNG BSS 0 ENTRY
  167. MONITOR HNGM HANG PP
  168. LJM RRF4 RELEASE CHANNEL AND EXIT
  169. RTU SPACE 4,10
  170. ** RTU - RELEASE TAPE UNIT.
  171. *
  172. * ENTRY (FS - FS+4) = FST INFORMATION.
  173. *
  174. * EXIT TO *RTRX*.
  175. *
  176. * USES CM - CM+4.
  177. *
  178. * CALLS CLE, PAU.
  179. *
  180. * MACROS MONITOR.
  181.  
  182.  
  183. RTU BSS 0 ENTRY
  184. LDN 1
  185. RJM CLE UPDATE DEMAND FILE ENTRY
  186.  
  187. * IF CALLED BY MAGNET, A *CLOSE/UNLOAD* OR *CLOSE/RETURN*
  188. * REQUEST IS IN PROGRESS. IN THIS CASE, *1MT* WILL INITIATE
  189. * THE UNIT RETURN PROCESSING.
  190.  
  191. LDD IA SET CALLING CONTROL POINT ADDRESS
  192. CRD CM
  193. LDD CM+1
  194. LPN 37
  195. SHN 7
  196. ADK JCIW GET SUBSYSTEM ID
  197. CRD CM
  198. LDD CM+2
  199. LMK MTSI
  200. ZJN RTU2 IF CALLED BY MAGNET
  201. LDN ZERL
  202. CRD CM
  203. LDN /COMSMTX/RTF SET RETURN REQUEST
  204. STD CM
  205. LDD MA
  206. CWD CM
  207. RTU1 RJM PAU PAUSE
  208. LDD FS+1 SET *UFRQ* ADDRESS
  209. ADK /COMSMTX/UFRQ
  210. STD CM+4
  211. LDN 5 SET WRITE AND INCREMENT TAPE ACTIVITY
  212. STD CM+1
  213. LDD HN SET NUMBER OF WORDS TO WRITE
  214. STD CM+3
  215. LCN 7777-MTSI
  216. STD CM+2
  217. MONITOR TDAM MAKE TAPE RETURN REQUEST
  218. LDD CM+1
  219. ZJN RTU2 IF COMPLETE
  220. SBN 1
  221. ZJN RTU1 IF MAGNET MOVING
  222. LDD FS SET EST ORDINAL
  223. STD CM+1
  224. MONITOR DEQM DROP EQUIPMENT
  225. * LDN 0 SET RETURN COMPLETE
  226. RTU2 LJM RTRX RETURN
  227. TITLE SUBROUTINES.
  228. RRF SPACE 4,15
  229. ** RRF - READ RESOURCE FILE ENTRY.
  230. *
  231. * ENTRY (A) = FNT ORDINAL OF RESOURCE FILE.
  232. * (RI - RI+1) = RANDOM INDEX OF RESOURCE FILE ENTRY.
  233. *
  234. * EXIT (T5 - T7) = RESOURCE FILE MS PARAMETERS.
  235. * (BFMS) = RESOURCE FILE ENTRY (MS SECTOR).
  236. *
  237. * ERROR TO *RTRX* IF FILE EMPTY, RANDOM INDEX ERROR,
  238. * OR SECTOR READ ERROR.
  239. *
  240. * USES T1, T3, CM - CM+4, T5 - T5+4.
  241. *
  242. * CALLS CLE, CRA, PAU, RDS, SFI.
  243. *
  244. * MACROS SETMS, SFA.
  245.  
  246.  
  247. RRF SUBR ENTRY/EXIT
  248. STD T3
  249. SFA FNT GET RESOURCE FILE FST ENTRY
  250. ADN FSTG
  251. CRD T5
  252. LDD T6
  253. ZJN RRF1 IF FILE UNUSED
  254. SETMS IO,RW
  255. LDD CM+4 FETCH FWA OF TRT
  256. SHN 3
  257. ADN TRLL
  258. CRD CM
  259. LDD CM+3
  260. LPN 77
  261. SHN 14
  262. LMD CM+4
  263. SBD TH 4000/4
  264. STM CRAA+1
  265. SHN -14
  266. LMC ADCI
  267. STM CRAA
  268. LDD RI
  269. ADD RI+1
  270. RRF1 ZJN RRF5 IF NO RANDOM INDEX
  271. RRF2 RJM PAU PAUSE
  272. * LDN SFIN
  273. ERRNZ SFIN CODE DEPENDS ON VALUE
  274. * STD T1
  275. SFA FNT,T3 INTERLOCK RESOURCE FILE
  276. RJM SFI
  277. NJN RRF2 IF INTERLOCK UNAVAILABLE
  278. RJM CRA
  279. MJN RRF4 IF RANDOM ADDRESS ERROR
  280. LDC BFMS
  281. RJM. RDS READ SECTOR
  282. MJN RRF3 IF READ ERROR
  283. LJM RRFX RETURN
  284.  
  285. RRF3 SHN 21-12
  286. MJN RRF4 IF NON-RECOVERABLE ERROR
  287. SOM RRFA
  288. RRF4 LCN 0 RELEASE FILE WITH NO UPDATE
  289. RJM CLE
  290. * LDN 0 SET EXIT CONDITION
  291. RRFA ADN 0
  292. * LCN 77 (RECOVERABLE MS ERROR ENCOUNTERED)
  293. RRF5 LJM RTRX RETURN
  294. CLE SPACE 4,25
  295. ** CLE - CLEAR/UPDATE FILE ENTRY.
  296. *
  297. * ENTRY (A) = 0, IF CLEAR FILE ENTRY.
  298. * (A) .GT. 0, IF UPDATE FILE ENTRY.
  299. * (A) .LT. 0, IF RELEASE CHANNEL WITH NO UPDATE.
  300. * (T3) = FNT ORDINAL OF RESOURCE FILE.
  301. * (FA) = RELATIVE FNT ADDRESS IN NFL.
  302. * (T5 - T7) = RESOURCE FILE MS PARAMETERS.
  303. * (FS - FS+4) = FST INFORMATION.
  304. * (BFMS) = RESOURCE FILE ENTRY (MS SECTOR).
  305. *
  306. * EXIT RESOURCE FILE SECTOR REWRITTEN FROM BFMS BUFFER
  307. * FOR ENTRY CONDITION (A) .GE. 0.
  308. *
  309. * ERROR TO *RRF3* IF MASS STORAGE ERROR.
  310. *
  311. * USES T1, CM - CM+4.
  312. *
  313. * CALLS SFI, WDS.
  314. *
  315. * MACROS ENDMS, SFA.
  316.  
  317.  
  318. CLE SUBR EXTRY/EXIT
  319. NJN CLE2 IF UPDATE ONLY
  320. LDC 500
  321. STD T1
  322. CLE1 LDN 0 CLEAR SECTOR BUFFER
  323. STM. BFMS+1,T1
  324. SOD T1
  325. NJN CLE1 IF MORE TO CLEAR
  326. CLE2 MJN CLE3 IF NO SECTOR TO WRITE
  327. LDC BFMS+WLSF WRITE SECTOR
  328. RJM. WDS
  329. MJP RRF3 IF WRITE ERROR
  330. NFA FA,R
  331. ADN FSTL UPDATE FST INFORMATION
  332. CWD FS
  333. CLE3 ENDMS END MASS STORAGE OPERATION
  334. LDN CFIN CLEAR FILE INTERLOCK OPTION
  335. STD T1
  336. SFA FNT,T3 ABSOLUTE ADDRESS OF RESOURCE FILE FNT
  337. RJM SFI CLEAR RESOURCE FILE INTERLOCK
  338. UJP CLEX RETURN
  339. PAU SPACE 4,10
  340. ** PAU - PAUSE AND CHECK FOR OPERATOR OVERRIDE.
  341. *
  342. * EXIT (A) = (T1) = 0.
  343. *
  344. * ERROR TO *RTRX* IF OPERATOR OVERRIDE ERROR FLAG.
  345. *
  346. * USES T1.
  347. *
  348. * MACROS DELAY, PAUSE.
  349.  
  350.  
  351. PAU SUBR ENTRY/EXIT
  352. LDN 20 DELAY TWO MILLISECONDS
  353. STD T1
  354. PAU1 SOD T1
  355. ZJN PAUX IF END OF DELAY
  356. DELAY
  357. PAUSE
  358. LDD CM+1
  359. LMN ORET
  360. NJN PAU1 IF NOT OPERATOR OVERRIDE
  361. LJM RTRX EXIT
  362. SPACE 4,10
  363. ** COMMON DECKS.
  364.  
  365.  
  366. IRA$ SET 1 DEFINE INITIALIZATION
  367. REL$ SET 1
  368. *CALL COMPCRA
  369. FNT$ EQU 1 ASSEMBLE SYSTEM FNT PROCESSOR
  370. IFP$ EQU 1 ASSEMBLE REMOTE INITIALIZATION CODE
  371. *CALL COMPGFP
  372. SFI$ EQU 1 SELECT IMMEDIATE RETURN FROM *SFI*
  373. *CALL COMPSFI
  374.  
  375.  
  376. IFP HERE CODE TO INITIALIZE SYSTEM FNT PROCESSOR
  377. SPACE 4,10
  378. RSTR
  379. SPACE 4,10
  380. OVERFLOW 5,ZRTL
  381.  
  382. END