User Tools

Site Tools


cdc:nos2.source:opl871:1ms

Table of Contents

1MS

Table Of Contents

  • [00008] 1MS - MASS STORAGE INPUT/OUTPUT.
  • [00010] MASS STORAGE INPUT/OUTPUT.
  • [00259] DIRECT LOCATION ASSIGNMENTS.
  • [00296] MACRO DEFINITIONS.
  • [00300] CFET - COMPUTE FET ADDRESS.
  • [00316] ERROR - PROCESS ERROR.
  • [00335] MSG - DEFINE ERROR MESSAGE.
  • [00364] OVERLAY - DEFINE OVERLAY.
  • [00395] MAIN PROGRAM.
  • [00422] TMS - TRANSFER MASS STORAGE DATA.
  • [00444] TERMINATION.
  • [00447] MSP - COMPLETE MASS STORAGE PROCESSING.
  • [00484] COC - CHECK OPERATION COMPLETE.
  • [00506] CLS - CLOSE MASS STORAGE COMPLETION.
  • [00524] UFS - UPDATE FET STATUS FOR READ OR POSITION FUNCTION.
  • [00585] RRF - RESET RANDOM FET POINTERS.
  • [00618] CFN - COMPLETE FUNCTION.
  • [00719] TACC - TABLE OF ACCOUNTING CHARGES.
  • [00735] CRC - CHECK FOR RESTART OF *CPUCIO*.
  • [00786] ERS - ENTER RECALL STACK.
  • [00879] ERR - PROCESS ERROR.
  • [00898] CHG - CONDITIONALLY HANG PP.
  • [00915] RESIDENT PROCESSORS.
  • [00917] CDA - CHECK DEVICE ACCESSIBILITY.
  • [00977] DRF - DROP FILE.
  • [01014] REW - REWIND MASS STORAGE.
  • [01035] RESIDENT SUBROUTINES.
  • [01042] CAF - COMPUTE ABSOLUTE FET ADDRESS.
  • [01058] CBD - CHECK FOR BUFFERED DEVICE.
  • [01086] FWB - FLUSH WRITE DATA FOR BUFFERED DEVICE.
  • [01153] SCF - SET CONTROL BUFFER INDEX INTO FNT.
  • [01194] CIT - CLEAR TRACK INTERLOCK.
  • [01215] DCC - DROP CHANNEL WHEN OUTPUT REGISTER CLEAR.
  • [01236] VAL - VALIDATE FILE ACCESS LEVEL.
  • [01305] INITIALIZATION.
  • [01307] CFE - CREATE FNT ENTRY.
  • [01406] PRS - PRESET.
  • [01716] STI - SET TRACK INTERLOCK.
  • [01781] SRP - SPECIAL REQUEST PROCESSOR.
  • [01787] EVF - EVICT MASS STORAGE FILE.
  • [01916] TFTY - TABLE OF FILE TYPE PROCESSORS.
  • [01951] LSO - LOAD SPECIAL READ OVERLAY.
  • [01963] RMS - READ MASS STORAGE MAIN ROUTINE.
  • [02058] EOF - TERMINATE ON EOF.
  • [02084] CPR - COMPLETE READ.
  • [02119] BUFFER READ.
  • [02121] BRD - BUFFER READ LOOP.
  • [02360] SBA - SET BUFFER ADDRESSES.
  • [02426] CONTROL WORD READ.
  • [02428] CRD - CONTROL WORD READ LOOP.
  • [02679] SCA - SET CONTROL WORD READ ADDRESSES.
  • [02741] READ MASS STORAGE PRESET.
  • [02743] PRS - READ MASS STORAGE PRESET.
  • [02895] SMR - SPECIAL MASS STORAGE READS MAIN ROUTINE.
  • [02914] READ SKIP PROCESSOR.
  • [02916] RSK - READ SKIP (*READSKP*) PROCESSOR (FUNCTION 020).
  • [03043] CRT - CHECK RECALL TIME.
  • [03075] READ LIST PROCESSOR.
  • [03077] RPL - READ PRUS WITH LIST (*RPHRLS*) (FUNCTION 230).
  • [03087] RLS - READ RECORDS WITH LIST (*READLS*) (FUNCTION 210).
  • [03173] SLS - SET LIST STATUS.
  • [03276] ALS - ADVANCE LIST.
  • [03356] CLI - CONVERT LIST INDICES.
  • [03556] WSY - WRITE SYSTEM SECTOR.
  • [03580] WMS - WRITE MASS STORAGE MAIN ROUTINE.
  • [03638] WTB - WRITE BUFFER.
  • [04015] SBA - SET BUFFER ADDRESSES.
  • [04076] SRW - STATUS LAST SECTOR REWRITE.
  • [04118] WEI - WRITE EOI SECTOR.
  • [04243] RWF - REWRITE FILE ON DIFFERENT TRACK.
  • [04355] TRTK - TABLE OF RESERVED TRACKS.
  • [04364] WDSB - WRITE ERROR PROCESSING BUFFER.
  • [04376] WRITE MASS STORAGE PRESET.
  • [04378] PRS - WRITE MASS STORAGE PRESET.
  • [04651] WRITE PRESET SUBROUTINES.
  • [04653] CFL - CHECK FILE SIZE LIMIT.
  • [04678] CFS - CHECK FILE SIZE.
  • [04788] CMA - CHECK FILE MODIFICATION ALLOWED.
  • [04808] GNT - GET NEXT TRACK POINTER.
  • [04856] RTC - REQUEST TRACK CHAIN.
  • [04938] RMS - RESERVE MASS STORAGE SPACE.
  • [05120] SMA - SET MASS STORAGE ALLOCATION (*MSAL*) PARAMETER.
  • [05154] TSFN - TABLE OF SPECIAL FILE NAMES.
  • [05188] PMS - POSITION MASS STORAGE MAIN ROUTINE.
  • [05194] MSR - PROCESS MASS STORAGE ERROR FROM *COMPRNS*.
  • [05205] SRC - SET RECALL CONDITIONS.
  • [05227] SFP - SET FILE POSITION.
  • [05280] SKIP/OPEN FUNCTION PROCESSORS.
  • [05282] BKS - BACKSPACE SECTOR.
  • [05312] SFS - SET FILE STATUS.
  • [05340] SKB - SKIP RECORD/FILE BACKWARD.
  • [05379] SKF - SKIP RECORD/FILE FORWARD.
  • [05432] SKP - SKIP PROCESSOR.
  • [05506] OPE - OPEN FILE.
  • [05548] SKIP/OPEN SUBROUTINES.
  • [05550] BKR - BACKSPACE RECORD.
  • [05683] BOT - BACK ONE TRACK.
  • [05709] CET - CHECK ERROR TERMINATION.
  • [05725] CRT - CHECK RECALL TIME.
  • [05757] DSC - DECREMENT SKIP COUNT.
  • [05784] LRI - LOAD RANDOM INDEX.
  • [06047] RANDOM ACCESS PROCESSORS.
  • [06049] RRD - PROCESS RANDOM READ.
  • [06093] RWT - PROCESS RANDOM WRITE.
  • [06170] POSITION MASS STORAGE PRESET.
  • [06172] PRS - POSITION MASS STORAGE PRESET ROUTINE.
  • [06234] SMS - SET MASS STORAGE DRIVER.
  • [06291] CLO - CLOSE FILE.
  • [06344] DRI - DUMP RANDOM INDEX.
  • [06431] OVW - OVERWRITE FILE.
  • [06561] GNT - GET NEXT TRACK POINTER.
  • [06609] IBP - INITIALIZE BUFFER WITH PATTERN SELECTION.
  • [06649] WDSB - WRITE ERROR PROCESSING BUFFER.
  • [06698] IMR - ISSUE MESSAGE AND RETURN TO MAIN PROGRAM.
  • [06736] ERP - MAIN ROUTINE.
  • [06851] RES - RETURN ERROR STATUS.
  • [06976] ABJ - ABORT JOB.
  • [07038] TMSG - TABLE OF MESSAGE ADDRESSES.
  • [07048] TEPO - TABLE OF ERROR PROCESSING OPTIONS.
  • [07088] BOS - BACKUP ONE SECTOR.
  • [07108] CHP - CONDITIONALLY HANG PP.
  • [07118] ERROR PROCESSOR SUBROUTINES.
  • [07120] MDE - MAP DISK ERROR.
  • [07154] PTL - PROCESS TRACK LIMIT.
  • [07249] SDS - SET DETAILED STATUS FIELD IN FET.
  • [07272] SES - SET ERROR STATUS.
  • [07324] WEI - WRITE EOI SECTOR.
  • [07447] IDM - ISSUE DAYFILE MESSAGE.
  • [07528] 1MS - MASS STORAGE INPUT/OUTPUT.

Source Code

1MS.txt
  1. IDENT 1MS,TMSO
  2. PERIPH
  3. BASE MIXED
  4. SST BFMS,FNSS,EQSS,FTSS,NSSS,FASS,DTSS,EISS,GQSS
  5. QUAL$ EQU 1 DEFINE UNQUALIFIED COMMON DECKS
  6. *COMMENT 1MS - MASS STORAGE INPUT/OUTPUT.
  7. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  8. TITLE 1MS - MASS STORAGE INPUT/OUTPUT.
  9. SPACE 4,10
  10. *** 1MS - MASS STORAGE INPUT/OUTPUT.
  11. *
  12. * G. R. MANSFIELD. 72/03/16.
  13. * J. C. BOHNHOFF. 72/11/01.
  14. * J. J. EIKUM. 79/06/18.
  15. * J. L. LARSON. 80/08/01.
  16. SPACE 4,10
  17. *** *1MS* PROCESSES INPUT/OUTPUT REQUESTS TO MASS STORAGE
  18. * FILES FOR CPU PROGRAMS. THE *CIO* SYSTEM REQUEST ISSUED BY
  19. * THE USER CPU PROGRAM IS PRE-PROCESSED BY THE *CPUCIO*
  20. * SECTION OF *CPUMTR*. *1MS* PROCESSES *RETURN*, *UNLOAD*,
  21. * AND *EVICT* FUNCTIONS FOR ALL EQUIPMENT TYPES (CALLS
  22. * *0DF* TO DROP FILE). *1MS* ALSO ISSUES ERROR MESSAGES FOR
  23. * ERRORS DETECTED BY *CPUCIO* ON ANY EQUIPMENT TYPE.
  24. * *1MS* COMPLETES NON-READ/WRITE FUNCTIONS FOR *TT* EQUIPMENT.
  25. * ALL OTHER FUNCTIONS PROCESSED BY *1MS* ARE ON MASS
  26. * STORAGE OR NULL EQUIPMENT.
  27. SPACE 4,10
  28. *** CALL.
  29. *
  30. *
  31. *T IR 18/ *1MS*, 1/A, 5/ CP, 18/ SKIP, 18/ FET
  32. * A SET IF AUTO RECALL REQUESTED.
  33. * CP CONTROL POINT NUMBER.
  34. * SKIP COUNT FOR SKIP OPERATIONS, DATA PATTERN SELECTIONS
  35. * FOR OVERWRITE OPERATION.
  36. * FET ADDRESS OF FET.
  37. *
  38. *T MB 1/S, 5/RF, 6/RC, 5/0, 1/F, 6/EC, 12/ORD, 4/LV, 8/XC, 12/IC
  39. * S SET IF *1MS* RESTARTED FROM RECALL STACK.
  40. * RF RESTART FLAGS = 1/TIF, 1/OPF, 1/SDT, 1/BDF, 1/DTF.
  41. * TIF = TRACK INTERLOCK FLAG.
  42. * OPF = ORIGINAL POSITION FLAG FOR SKIP BACKWARD/OPEN.
  43. * SDT = SKIP DATA TRANSFER FLAG FOR *READSKP*.
  44. * BDF = BUFFERED DEVICE FUNCTION FLAG.
  45. * DTF = DATA TRANSFERRED FLAG.
  46. * RC REASON CODE FOR RECALL STACK ENTRY.
  47. * F IF SET, BUILD FNT ENTRY AND RESTART *CPUCIO*.
  48. * EC ERROR CODE, IF NONZERO.
  49. * ORD RELATIVE ADDRESS OF FNT ENTRY IN NEGATIVE FL,
  50. * IF NONZERO.
  51. * LV LEVEL NUMBER, IF NO ERROR.
  52. * XC EXTERNAL *CIO* FUNCTION CODE, IF NO ERROR.
  53. * IC INTERNAL *CIO* FUNCTION CODE (AS DEFINED IN
  54. * *COMSCIO*), IF NO ERROR.
  55. *
  56. *T MB+1 12/ 0, 24/ IN, 24/ OUT
  57. *T MB+2 1/R, 5/0, 6/ FETL, 24/ FIRST, 24/ LIMIT
  58. * R SET IF RANDOM FILE.
  59. * FETL FET LENGTH - 5.
  60. * FET POINTERS ARE TRANSFERRED ONLY IF *1MS* IS
  61. * NOT RESTARTED FROM THE RECALL STACK.
  62. SPACE 4,10
  63. *** SYSTEM SECTOR PROCESSING.
  64. *
  65. * *1MS* WILL READ AND WRITE THE SYSTEM SECTOR TO/FROM THE
  66. * CIRCULAR BUFFER BASED ON THE SYSTEM SECTOR OPERATION FLAG
  67. * IN THE FST (BYTE 4, BIT 13B). TO READ THE SYSTEM SECTOR, THE
  68. * FORMAT OF THE FST SHOULD BE
  69. *
  70. *T FST 12/ EQ,12/ FIRST TRACK,12/ FIRST TRACK,12/ 0,12/4005
  71. *
  72. * TO WRITE THE SYSTEM SECTOR, THE FORMAT OF THE FST SHOULD BE
  73. *
  74. *T 6/ ,6/ EQ,12/ FIRST TRACK,12/ 0,12/ 0,12/ 4005
  75. * THE EQUIPMENT AND FIRST TRACK ARE OPTIONAL AND MAY BE 0 IN
  76. * WHICH CASE *1MS* WILL ASSIGN A MASS STORAGE DEVICE.
  77. *
  78. * SYSTEM SECTOR OPERATIONS ARE ONLY SUPPORTED FOR CONTROL WORD
  79. * READS AND WRITES AND *INCORRECT I/O REQUEST* WILL BE ISSUED
  80. * IF A NON-CONTROL WORD READ OR WRITE IS ISSUED AND THE SYSTEM
  81. * SECTOR OPERATION BIT IS SET IN THE FST. THE SYSTEM SECTOR
  82. * OPERATION BIT IS CLEARED BY *1MS* AFTER THE CONTROL WORD
  83. * READ OR WRITE.
  84. SPACE 4,10
  85. *** DAYFILE MESSAGES.
  86. *
  87. *
  88. * *ASSIGNED FOR DIAGNOSTICS, FILE FFF AT NNN.*
  89. * A *MALET* USER ATTEMPTED A *CIO* OPERATION OTHER
  90. * THAN RETURN/UNLOAD ON A PREASSIGNED TAPE WITH
  91. * FILE NAME FFF AND FET ADDRESS NNN.
  92. *
  93. * *BUFFER ARGUMENT ERROR ON FFF AT NNN.*
  94. * A BUFFER POINTER DOES NOT CONFORM TO THESE CONSTRAINTS
  95. * FIRST .LE. IN
  96. * FIRST .LE. OUT
  97. * OUT .LT. LIMIT
  98. * IN .LT. LIMIT
  99. * LIMIT .LE. FL
  100. *
  101. * *BUFFER CONTROL WORD ERROR ON FFF AT NNN.*
  102. * BLOCK LENGTH AS SPECIFIED DURING A *WRITECW* OPERATION
  103. * IS GREATER THAN ALLOWABLE PRU SIZE FOR DEVICE.
  104. *
  105. * *DEVICE ERROR ON FILE FFF AT NNN.*
  106. * AN UNRECOVERED ERROR OCCURRED ON THE MASS STORAGE
  107. * DEVICE CONTAINING THE FILE.
  108. *
  109. * *ERROR FLAG TERMINATION, FILE FFF AT NNN.*
  110. * A SPECIAL ERROR FLAG WAS SET DURING PROCESSING OF THE
  111. * OPERATION AND THE OPERATION WAS NOT COMPLETED.
  112. *
  113. * *FET ADDRESS OUT OF RANGE AT NNN.*
  114. * FET ADDRESS .LE. 1 OR FET EXTENDS PAST FL.
  115. *
  116. * *FET PARAMETER ERROR ON FFF AT NNN.*
  117. * ONE OF THE PARAMETERS IN THE FET IS INCORRECT (IE. THE
  118. * LIST ADDRESS IS .GT. THE JOBS FL) OR THE FET IS NOT
  119. * LONG ENOUGH FOR THE PARAMETER.
  120. *
  121. * *FILE ACCESS LEVEL CONFLICT, FFF AT NNN.*
  122. * THE ACCESS LEVEL SPECIFIED FOR FILE FFF
  123. * IS NOT WITHIN THE JOB VALIDATIONS.
  124. *
  125. * *FILE TOO LONG, FILE FFF AT NNN.* = DIRECT ACCESS PERMANENT
  126. * FILE FFF HAS EXCEEDED THE DIRECT ACCESS FILE SIZE
  127. * LIMIT.
  128. *
  129. * *INCORRECT EQUIPMENT ON FILE FFF AT NNN.*
  130. * THE EQUIPMENT IN THE FST ENTRY FOR THE FILE IS NOT
  131. * SUPPORTED FOR *CIO* FUNCTIONS.
  132. *
  133. * *INCORRECT FILE NAME FFF AT NNN.*
  134. * THE FILE NAME DOES NOT CONFORM TO ESTABLISHED RULES.
  135. *
  136. * *INCORRECT I/O REQUEST ON FILE FFF AT NNN.*
  137. * THE FUNCTION CODE IS NOT RECOGNIZED OR THE FUNCTION
  138. * IS NOT ALLOWED ON THE FILE IN ITS CURRENT STATE.
  139. *
  140. * *INCORRECT MODIFICATION OF FFF AT NNN.*
  141. * EITHER THE FUNCTION WOULD RESULT IN SHORTENING A
  142. * MODIFY-ONLY FILE OR THE FILE HAS MODIFY LOCK-OUT.
  143. *
  144. * *INDEX ADDRESS OUT OF RANGE FOR FFF AT NNN.*
  145. * RANDOM ADDRESS RETURN ADDRESS IS .GT. FL.
  146. *
  147. * *INDEX TOO LARGE ON OPEN, FILE FFF AT NNN.*
  148. * FOR OPEN FUNCTION, THE RANDOM INDEX LENGTH EXCEEDED
  149. * THE INDEX BUFFER SIZE.
  150. *
  151. * *I/O ON EXECUTE-ONLY FILE FFF AT NNN.*
  152. * FUNCTION IS NOT ALLOWED BY JOB ON EXECUTE-ONLY FILE.
  153. *
  154. * *I/O SEQUENCE ERROR ON FILE FFF AT NNN.*
  155. * MULTIPLE CONCURRENT FUNCTIONS WERE ATTEMPTED ON A
  156. * SINGLE FILE.
  157. *
  158. * *JOB ACCESS LEVEL CONFLICT, FFF AT NNN.*
  159. * THE ACCESS LEVEL OF THE JOB IS NOT VALID FOR
  160. * THE DEVICE ON WHICH FILE FFF RESIDES.
  161. *
  162. * *M.T. NOT AVAILABLE ON FILE FFF AT NNN.*
  163. * THE MAGNETIC TAPE EXECUTIVE IS NOT EXECUTING.
  164. *
  165. * *PRU LIMIT, FILE FFF AT NNN.*
  166. * WRITING ON FILE FFF WOULD EXCEED THE JOBS PRU LIMIT.
  167. *
  168. * *RANDOM ADDRESS NOT ON FILE FFF AT NNN.*
  169. * THE RANDOM ADDRESS EXCEEDS THE NUMBER OF ADDRESSES ON
  170. * THE FILE.
  171. *
  172. * *REQUEST UNDEFINED ON DEVICE, FFF AT NNN.*
  173. * THE FUNCTION CANNOT BE PERFORMED ON THE DEVICE UPON
  174. * WHICH THE FILE RESIDES.
  175. *
  176. * *UNNECESSARY CIO FCT. 000 ON FFF AT NNN.*
  177. * THE SPECIFIED *CIO* READ OR WRITE FUNCTION WAS
  178. * UNNECESSARY, SINCE THE USER I/O BUFFER WAS ALREADY
  179. * FULL (FOR READ) OR EMPTY (FOR WRITE) AND NO DATA
  180. * COULD BE TRANSFERRED FOR THIS *CIO* CALL.
  181. *
  182. * *WRITE ON READ-ONLY FILE FFF AT NNN.*
  183. * A WRITE WAS ATTEMPTED ON A FILE WITH WRITE LOCK-OUT.
  184. *
  185. * *WRITEDOWN PROHIBITED ON FILE FFF AT NNN.*
  186. * THE ACCESS LEVEL OF THE JOB IS HIGHER THAN THE
  187. * CURRENT ACCESS LEVEL OF FILE FFF, AND THE FILE
  188. * IS A TAPE FILE OR A DIRECT ACCCESS PERMANENT FILE.
  189. *
  190. * IN THE ABOVE MESSAGES, FFF REPRESENTS THE FILE NAME AS GIVEN
  191. * IN THE FET AND NNN REPRESENTS THE FET ADDRESS.
  192. SPACE 4,10
  193. *** OPERATOR MESSAGES.
  194. *
  195. *
  196. * *EQXXX, TRACK LIMIT.* = *1MS* IS WAITING FOR MASS STORAGE
  197. * SPACE TO BECOME AVAILABLE ON EST ORDINAL XXX.
  198. *
  199. * * TRACK LIMIT.* = *1MS* IS WAITING FOR MASS STORAGE SPACE TO
  200. * BECOME AVAILABLE ON A TEMPORARY FILE DEVICE.
  201. *
  202. * * TRACK LIMIT, LVLX.* = *1MS* IS WAITING FOR TEMPORARY
  203. * FILE MASS STORAGE SPACE ON ANY MASS STORAGE DEVICE
  204. * WITH ACCESS LEVEL LVLX.
  205. SPACE 4,10
  206. *** HANG CONDITIONS.
  207. *
  208. * *1MS* WILL HANG ISSUING THE *MXFM* MONITOR FUNCTION
  209. * IN THE FOLLOWING CASES -
  210. *
  211. * 1. *WMS* TRIES TO WRITE A DATA SECTOR ON THE LAST SECTOR
  212. * OF A TRACK WITH NO NEXT TRACK RESERVED.
  213. * 2. *WMS* TRIES TO WRITE AN EOF SECTOR ON THE LAST SECTOR
  214. * OF A TRACK WITH NO NEXT TRACK RESERVED.
  215. * 3. *PMS* CALLED TO PROCESS FUNCTION OTHER THAN
  216. * SKIP, OPEN, OR RANDOM READ/WRITE.
  217. * 4. HANG ERROR CODE WAS PASSED TO *1MS* FROM *CPUCIO*
  218. * (DEFINED IN *COMSCIO*).
  219. * 5. *0DQ* WAS UNABLE TO LOCATE GLOBAL ENTRY ASSOCIATED
  220. * WITH QUEUED FILE FOR *EVICT* PROCESSING.
  221. * 6. ERROR CODE PASSED IN MESSAGE BUFFER PARAMETER WORD IS
  222. * INCORRECT.
  223. SPACE 4,10
  224. ** ROUTINES USED.
  225. *
  226. *
  227. * 0BF - BEGIN FILE.
  228. * 0DF - DROP FILE.
  229. SPACE 4,10
  230. ** SYSTEM SECTOR BUFFER ASSIGNMENTS.
  231.  
  232.  
  233. BFMS EQU 6776-2*5 ALLOW FOR CONTROL WORDS
  234. SPACE 4,10
  235. ** COMMON DECKS.
  236.  
  237.  
  238. *CALL COMPMAC
  239. LIST X
  240. *CALL COMSCIO
  241. LIST *
  242. *CALL COMSCPS
  243. *CALL COMSEVT
  244. *CALL COMSMLS
  245. QUAL COMSHIO
  246. *CALL COMSHIO
  247. QUAL *
  248. *CALL COMSMSP
  249. QUAL PFM
  250. *CALL COMSPFM
  251. QUAL *
  252. *CALL COMSPIM
  253. *CALL COMSSCD
  254. *CALL COMSSRU
  255. *CALL COMSSSD
  256. *CALL COMSSSE
  257. *CALL COMSWEI
  258. *CALL COMSZOL
  259. TITLE DIRECT LOCATION ASSIGNMENTS.
  260. SPACE 4,10
  261. ** DIRECT LOCATION ASSIGNMENTS.
  262.  
  263.  
  264. T8 EQU 16 TEMPORARY (DESTROYED BY OVL LOAD)
  265. T9 EQU 17 TEMPORARY (DESTROYED BY OVL LOAD)
  266. EN EQU 17 ERROR NUMBER
  267.  
  268. * THE FOLLOWING DIRECT CELLS (MB - MB2) ARE READ IN BY *PPR*
  269. * FROM *MB* THROUGH *MB*+2 IMMEDIATELY AFTER PP ASSIGNMENT
  270. * SO THAT THE INFORMATION IS NOT DESTROYED BY LOADING THE PP.
  271.  
  272. MB EQU 20 - 24 MESSAGE BUFFER PARAMETERS
  273. ERRNZ MB-MP ADDRESSES MUST MATCH
  274. MB1 EQU 25 - 31 MB + 1 PARAMETERS
  275. ERRNZ MB1-MP-5 ADDRESS MUST BE CONSECUTIVE
  276. MB2 EQU 32 - 36 MB + 2 PARAMETERS
  277. ERRNZ MB2-MP-10D ADDRESS MUST BE CONSECUTIVE
  278. FS EQU 20 - 24 FST ENTRY (5 LOCATIONS)
  279. PC EQU 25 PHYSICAL RECORD COUNT
  280. RC EQU 26 *DRCM* REQUEST CODE
  281. FO EQU 27 FET OPTIONS
  282. DP EQU 30 - 34 DATA POINTER (5 LOCATIONS)
  283. * 35 USED BY OVERLAYS
  284. * 36 USED BY OVERLAYS
  285. * 37 USED BY OVERLAYS
  286. BS EQU 40 - 44 BUFFER STATUS (5 LOCATIONS)
  287. FN EQU BS FILE NAME (5 LOCATIONS)
  288. FC EQU 45 FUNCTION CODE
  289. * 46 USED BY OVERLAYS
  290. * 47 USED BY OVERLAYS
  291. FA EQU 57 FNT ENTRY RELATIVE ADDRESS IN NFL
  292. FT EQU 60 - 61 FIRST ADDRESS OF BUFFER (2 LOCATIONS)
  293. LM EQU 62 - 63 LIMIT ADDRESS OF BUFFER (2 LOCATIONS)
  294. IN EQU 64 - 65 NEXT INPUT ADDRESS (2 LOCATIONS)
  295. OT EQU 66 - 67 NEXT OUTPUT ADDRESS (2 LOCATIONS)
  296. TITLE MACRO DEFINITIONS.
  297. SPACE 4,10
  298. ** MACRO DEFINITIONS.
  299. CFET SPACE 4,10
  300. ** CFET - COMPUTE FET ADDRESS.
  301. * CFET N
  302. *
  303. * ENTRY *N* = FET WORD NUMBER.
  304. *
  305. * COMPUTES ABSOLUTE FET ADDRESS USING (IR+3 - IR+4).
  306. *
  307. * CALLS CAF.
  308.  
  309.  
  310. CFET MACRO W
  311. RJM CAF
  312. IFC NE,$W$$,1
  313. ADN W
  314. ENDM
  315. ERROR SPACE 4,10
  316. ** ERROR - PROCESS ERROR.
  317. *
  318. * ERROR EC
  319. *
  320. * *EC* = ERROR CODE.
  321.  
  322.  
  323. ERROR MACRO EC
  324. .1 IFC EQ,$EC$UCF$
  325. LDN SSTL
  326. CRD CM
  327. LDD CM+3
  328. LPN 20
  329. NJP CFN IF LOGGING DISABLED
  330. .1 ENDIF
  331. LDN /CIOERR/EC
  332. LJM ERR
  333. ENDM
  334. MSG SPACE 4,10
  335. ** MSG - DEFINE ERROR MESSAGE.
  336. *
  337. *ERR MSG (TEXT),EF,CODE
  338. *
  339. * ENTRY *ERR* = ERROR CODE.
  340. * *TEXT* = ERROR MESSAGE.
  341. * *EF* = ERROR FLAG.
  342. * *CODE* = OPTION CODE.
  343.  
  344.  
  345. MACRO MSG,ERR,TEXT,EF,CODE
  346. LOCAL A
  347. ORG TEPO+/CIOERR/ERR
  348. .A IFC NE,$EF_CODE_TEXT$$
  349. LOC /CIOERR/ERR
  350. VFD 6/EF,6/CODE
  351. LOC *O
  352. ORG TMSG+/CIOERR/ERR
  353. .B IFC NE,$TEXT$$
  354. CON =Z*_TEXT_*
  355. .B ELSE
  356. CON 0
  357. .B ENDIF
  358. A MICRO 1,,$TEXT$
  359. A MICCNT A
  360. ERRNG 31D-A
  361. .A ENDIF
  362. ENDM
  363. OVERLAY SPACE 4,10
  364. ** OVERLAY - DEFINE OVERLAY.
  365. *
  366. *
  367. *NAME OVERLAY (TITLE),ORG
  368. *
  369. * ENTRY *NAME* = OVERLAY NAME.
  370. * *TITLE* = OVERLAY TITLE.
  371. * *ORG* = ORIGIN ADDRESS.
  372.  
  373.  
  374. NOREF .N
  375. .N SET 0 OVERLAY NUMBER
  376. PURGMAC OVERLAY
  377.  
  378. MACRO OVERLAY,NAME,TEXT,ORIG
  379. QUAL
  380. .1 SET .N/1R4
  381. .1 MICRO .1+1,1 M
  382. .N MICRO .N-.1*1R4+1,1, ABCDEFGHIJKLMNOPQRSTUVWXYZ01234
  383. .N MICRO 1,, ".1"".N"
  384. NAME EQU 2R".N"
  385. .N SET .N+1
  386. TTL 1MS/4".N" - TEXT
  387. TITLE
  388. USE
  389. QUAL NAME
  390. IDENT 4".N",ORIG TEXT
  391. ORG ORIG
  392. *COMMENT 1MS - TEXT
  393. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  394. ENDM
  395. TITLE MAIN PROGRAM.
  396. ORG PPFW
  397.  
  398. TMSO LJM PRS PRESET PROGRAM
  399.  
  400. * GLOBAL DATA.
  401.  
  402. FACF EQU *-2 FILE ACCESS FLAGS
  403. FETL EQU *-1 FET LENGTH
  404. PMFF CON 1 PERMANENT FILE FLAG
  405. MSFF CON 0 MASS STORAGE FILE FLAG
  406. FSAL CON 0 FILE SECURITY ACCESS LEVEL
  407. JSAL CON 0 JOB SECURITY ACCESS LEVEL
  408. OSSM CON 0 OPERATING SYSTEM SECURITY MODE
  409.  
  410. * THE FOLLOWING 5 CONSECUTIVE LOCATIONS SAVE *1MS*
  411. * MESSAGE BUFFER PARAMETERS.
  412.  
  413. RCRF CON 0 REASON CODE AND RESTART FLAGS
  414. ERCF CON 0 ERROR CODE AND FUNCTION FLAGS
  415. FNTA CON 0 FNT ENTRY RELATIVE ADDRESS
  416. LVXC CON 0 LEVEL NUMBER AND EXTERNAL FUNCTION CODE
  417. ICFC CON 0 INTERNAL *CIO* FUNCTION CODE
  418.  
  419. ERRNZ /CIO/RDF CODE DEPENDS ON INTERNAL READ FUNCTION
  420. ERRNZ /CIO/WTF-1 CODE DEPENDS ON INTERNAL WRITE FUNCTION
  421. TMS SPACE 4,10
  422. ** TMS - TRANSFER MASS STORAGE DATA.
  423. *
  424. * EXIT TO *MSP*.
  425. *
  426. * CALLS EXR.
  427.  
  428.  
  429. TMS BSS 0 ENTRY
  430. LDC 0
  431. * LDC 1 (RANDOM READ/WRITE)
  432. TMSA EQU *-1
  433. ZJN TMS1 IF NOT RANDOM READ/WRITE
  434. LDC 1L4+PMS LOAD POSITION OVERLAY
  435. RJM EXR
  436. TMS1 LDC 1L4+PMS LOAD POSITION OVERLAY
  437. * LDC 1L4+RMS (READ)
  438. * LDC 1L4+WMS (WRITE)
  439. * LDC 1L4+CMS (CLOSE)
  440. * LDC 1L4+OMS (OVERWRITE)
  441. TMSB EQU *-1
  442. RJM EXR EXECUTE FUNCTION PROCESSOR
  443. * UJN MSP COMPLETE MASS STORAGE PROCESSING
  444. TITLE TERMINATION.
  445. ** TERMINATION PROCESSORS.
  446. MSP SPACE 4,15
  447. ** MSP - COMPLETE MASS STORAGE PROCESSING.
  448. *
  449. * ENTRY (FC) = INTERNAL *CIO* FUNCTION CODE.
  450. * (FO) = FET OPTIONS.
  451. * (PC) = SECTOR COUNT FOR RANDOM INDEX UPDATE.
  452. * (BS - BS+4) = (FET+0).
  453. * (FS - FS+4) = FST ENTRY.
  454. *
  455. * EXIT RANDOM ADDRESS IN FET+6 UPDATED.
  456. * TO *COC*.
  457. *
  458. * USES CM - CM+4.
  459. *
  460. * MACROS CFET.
  461.  
  462.  
  463. MSP BSS 0 ENTRY
  464. LDD FC CHECK FUNCTION
  465. SHN -7
  466. LPN 7
  467. NJN COC IF NOT READ/WRITE
  468. LDD FO CHECK PROCESSING BITS
  469. SHN 21-13
  470. PJN COC IF NOT RANDOM FET
  471. CFET 6 READ RANDOM ACCESS CONTROL
  472. CRD CM
  473. LDD PC ADVANCE SECTOR COUNT
  474. SHN 6
  475. RAD CM+2
  476. SHN -14
  477. RAD CM+1
  478. SHN -14
  479. RAD CM
  480. CFET 6
  481. CWD CM STORE RANDOM ACCESS CONTROL
  482. * UJN COC CHECK OPERATION COMPLETE
  483. COC SPACE 4,10
  484. ** COC - CHECK OPERATION COMPLETE.
  485. *
  486. * EXIT TO *CFN* IF TO ENTER RECALL STACK OR
  487. * RESTART *CPUCIO*.
  488. * TO *UFS* IF FUNCTION COMPLETE.
  489.  
  490.  
  491. COC BSS 0 ENTRY
  492. LDC 0 CHECK FOR ENTRY TO RECALL STACK
  493. * LDC 1 (ENTER RECALL STACK)
  494. * LDC 4000 (RESTART *CPUCIO*)
  495. COCA EQU *-1
  496. ZJN UFS IF FUNCTION COMPLETE
  497. SHN 21-13
  498. MJN COC1 IF *CPUCIO* RESTART
  499. SOM CFNA LEAVE FILE SET BUSY
  500. COC1 LDN 0 PREVENT SETTING FET COMPLETE
  501. STM CFNC
  502. STM CFNE PREVENT FUNCTION CHARGE
  503. STM CFNE+1
  504. LJM CFN COMPLETE FUNCTION
  505. CLS SPACE 4,10
  506. ** CLS - CLOSE MASS STORAGE COMPLETION.
  507. *
  508. * EXIT TO *CFN* IF *CLOSE/NO REWIND* FUNCTION.
  509. * TO *DRF* IF *CLOSE/RETURN* OR *CLOSE/UNLOAD*.
  510. * TO *REW* IF *CLOSE/REWIND* FUNCTION.
  511.  
  512.  
  513. CLS BSS 0 ENTRY
  514. LDM CFNB CLEAR FILE OPENED AND WRITTEN BITS
  515. LPN 71
  516. STM CFNB
  517. CLSA LDN 0 SET RETURN FLAG FOR *DRF*
  518. * LDN 1 (SET UNLOAD FLAG FOR *DRF*)
  519. LJM REW REWIND FILE
  520. * LJM DRF (CLOSE/RETURN OR UNLOAD)
  521. * LJM CFN (CLOSE/NO REWIND)
  522. CLSB EQU *-1
  523. UFS SPACE 4,15
  524. ** UFS - UPDATE FET STATUS FOR READ OR POSITION FUNCTION.
  525. *
  526. * ENTRY (FC) = INTERNAL *CIO* FUNCTION CODE.
  527. * (BS - BS+4) = (FET+0).
  528. * (FS - FS+4) = FST ENTRY.
  529. *
  530. * EXIT (BS - BS+4) = (FET+0) UPDATED WITH TERMINATION
  531. * STATUS.
  532. * TO *CFN* FOR FUNCTION OTHER THAN *CLOSE*.
  533. * TO *CLS* FOR *CLOSE* FUNCTION.
  534. *
  535. * USES T1.
  536.  
  537.  
  538. UFS BSS 0 ENTRY
  539. LDD FC CHECK FUNCTION
  540. SHN -6
  541. LPN 17
  542. ZJN UFS1 IF READ FUNCTION
  543. LMN /CIO/CLO
  544. ZJN CLS IF CLOSE FUNCTION
  545. LMN /CIO/SKP&/CIO/CLO
  546. NJN UFS3 IF NOT SKIP FUNCTION
  547. LDC 6742
  548. STM UFSB
  549. UFS1 LDD FS+4 CHECK TERMINATION CONDITION
  550. LPN 14
  551. UFSA SHN -2
  552. * LDN 0 (TERMINATION CONDITION NOT REACHED)
  553. ZJN UFS3 IF NOT EOR/EOF/EOI
  554. STD T1
  555. LDD FC
  556. SHN 21-13
  557. MJN UFS2 IF SKIP BACKWARD FUNCTION
  558. LDD BS+4
  559. LPC 6002
  560. * LPC 6742 (SKIP FORWARD)
  561. UFSB EQU *-1
  562. LMM UFSC-1,T1 SET EOR/EOF/EOI INDICATOR
  563. STD BS+4
  564. UFS2 LDD BS+3
  565. SCN 74
  566. LMM UFSD-1,T1 SET LEVEL NUMBER
  567. STD BS+3
  568. UFS3 UJN CFN COMPLETE FUNCTION
  569.  
  570.  
  571. UFSC BSS 0 READ/POSITION FUNCTION RETURNS
  572. LOC 1
  573. CON 20 EOR
  574. CON 30 EOF
  575. CON 1030 EOI
  576. LOC *O
  577.  
  578. UFSD BSS 0 LEVEL NUMBER RETURNS
  579. LOC 1
  580. CON 0 EOR
  581. CON 74B EOF
  582. CON 74B EOI
  583. LOC *O
  584. RRF SPACE 4,15
  585. ** RRF - RESET RANDOM FET POINTERS.
  586. *
  587. * ENTRY (FO) = FET OPTIONS.
  588. * (FS - FS+4) = FST ENTRY.
  589. *
  590. * EXIT (FS+4) = FST STATUS.
  591. * TO *CFN*.
  592. *
  593. * USES DP - DP+4.
  594. *
  595. * MACROS CFET.
  596.  
  597.  
  598. RRF BSS 0 ENTRY
  599. LDD FS CHECK DEVICE TYPE
  600. LMN TEEQ
  601. ZJN RRF1 IF *TE*
  602. LDN 4 SET EOR FST STATUS
  603. RRF1 STD FS+4
  604. LDD FO CHECK FOR RANDOM FILE
  605. SHN 21-13
  606. PJN CFN IF NOT RANDOM FILE
  607. CFET 6 READ RANDOM INDEX WORD
  608. CRD DP
  609. LDN 0 SET *CRI* TO 1
  610. STD DP
  611. STD DP+1
  612. LDD HN
  613. STD DP+2
  614. CFET 6 REWRITE FET+6
  615. CWD DP
  616. * UJN CFN COMPLETE FUNCTION
  617. CFN SPACE 4,20
  618. ** CFN - COMPLETE FUNCTION.
  619. *
  620. * ENTRY (FA) = FNT ORDINAL.
  621. * (FC) = INTERNAL *CIO* FUNCTION CODE.
  622. * (PC) = PRU COUNT.
  623. * (BS - BS+4) = (FET+0).
  624. * (FS - FS+4) = FST ENTRY.
  625. *
  626. * EXIT TO *PPR* IF FUNCTION COMPLETE.
  627. * TO *CRC* IF TO ENTER RECALL STACK OR RESTART
  628. * *CPUCIO*.
  629. *
  630. * USES T1, CM+1, CM+2.
  631. *
  632. * CALLS CIT.
  633. *
  634. * MACROS CFET, MONITOR, NFA.
  635.  
  636.  
  637. CFN BSS 0 ENTRY
  638. RJM CIT CLEAR TRACK INTERLOCK
  639. LDD FA CHECK FNT ADDRESS
  640. ZJN CFN1 IF NO FNT ENTRY
  641. AOD FS+4 SET FILE NOT BUSY
  642. CFNA LPN 77
  643. * LPN 76 (ENTER RECALL STACK, LEAVE FILE BUSY)
  644. SHN 14
  645. LMC ** RESET UPPER STATUS
  646. CFNB EQU *-1 (UPPER 6 BITS OF PREVIOUS FST STATUS)
  647. SHN 6
  648. STD FS+4
  649. NFA FA,R
  650. ADN FSTL
  651. CWD FS
  652. CFN1 AOD BS+4 SET FET COMPLETE
  653. * PSN (ENTER RECALL STACK/RESTART *CPUCIO*)
  654. CFNC EQU *-1
  655. CFET STORE FET STATUS
  656. CFND CWD BS
  657. * PSN (ERROR PROCESSING)
  658.  
  659. * UPDATE ACCOUNTING CHARGES AND MASS STORAGE PRU COUNT.
  660. * DROP PPU.
  661.  
  662. LDM CFNJ CHECK FOR MASS STORAGE PRU COUNT UPDATE
  663. ADM CFNJ+1
  664. ZJN CFN2 IF NO FILE SIZE CHANGE
  665. LDN 1
  666.  
  667. * ENTRY FROM *PRS* IF ERROR CODE INCORRECT.
  668.  
  669. CFN2 ADN 1 SET *UADM* PARAMETER COUNT
  670. STD CM+1
  671. LDD FC GET FUNCTION CODE
  672. SHN -6
  673. LPN 17
  674. STD T1
  675. LDD PC CHARGE FOR PRUS TRANSFERRED
  676. SHN IMPT
  677. CFNE ADM TACC,T1 CHARGE FOR FUNCTION
  678. * PSN (ENTER RECALL STACK/RESTART *CPUCIO*)
  679. * PSN (ENTER RECALL STACK/RESTART *CPUCIO*)
  680. RAM CFNH+1
  681. SHN -14
  682. RAM CFNH
  683. ADM CFNH+1
  684. NJN CFN3 IF ACCOUNTING CHARGE
  685. SOD CM+1
  686. ZJN CFN4 IF NO FILE SIZE UPDATE
  687. LDN CFNI-CFNG
  688. RAM CFNF
  689. CFN3 LDD MA STORE *UADM* PARAMETER WORDS
  690. CWM CFNG,CM+1
  691. * CWM CFNI,CM+1 (FILE SIZE UPDATE ONLY)
  692. CFNF EQU *-1
  693. CFN4 LDM COCA CHECK FOR RECALL
  694. NJN CRC IF FUNCTION NOT COMPLETE
  695. LDD IR+1 CHECK AUTO RECALL
  696. SHN 1-5
  697. LPN 2
  698. LMN 2 RECALL CPU FOR NON-AUTO RECALL REQUEST
  699. STD CM+2 SET TO DROP PPU AND RECALL CPU
  700. MONITOR UADM
  701. LJM PPR EXIT TO PP RESIDENT
  702.  
  703.  
  704. * MESSAGE BUFFER STRUCTURE FOR UADM FUNCTION.
  705. * (THE FOLLOWING 2 CM WORDS MUST BE CONTIGUOUS.)
  706.  
  707. CFNG CON AISS INCREMENT I/O ACCUMULATOR
  708. CON IOAW I/O ACCUMULATOR WORD
  709. CON 40D*100+20D POSITION AND WIDTH OF FIELD
  710. CFNH CON 0 PRU COUNT
  711. CON 0
  712.  
  713. CFNI CON CDCS DECREMENT CONTROL POINT AREA FIELD
  714. CON ACLW MASS STORAGE PRU LIMIT
  715. CON 0D*100+18D POSITION AND WIDTH OF LIMIT FIELD
  716. CFNJ CON 0 18 BIT SECTOR COUNT (RIGHT-JUSTIFIED)
  717. CON 0
  718. TACC SPACE 4,10
  719. ** TACC - TABLE OF ACCOUNTING CHARGES.
  720. *
  721. * INDEXED BY INTERNAL *CIO* FUNCTION CODE.
  722.  
  723.  
  724. TACC INDEX
  725. INDEX /CIO/RDF,IMRD READ
  726. INDEX /CIO/WTF,IMWT WRITE
  727. INDEX /CIO/SKP,IMSK SKIP
  728. INDEX /CIO/OPE,IMOP OPEN
  729. INDEX /CIO/CLO,IMCL CLOSE
  730. INDEX /CIO/RET,IMRU RETURN/UNLOAD
  731. INDEX /CIO/EVI,IMRU EVICT
  732. INDEX /CIO/OVW,IMWT OVERWRITE
  733. INDEX /CIO/MFC
  734. CRC SPACE 4,10
  735. ** CRC - CHECK FOR RESTART OF *CPUCIO*.
  736. *
  737. * ENTRY (CM+1) = *UADM* PARAMETER WORD COUNT.
  738. *
  739. * EXIT TO *ERS* IF TO ENTER RECALL STACK.
  740. * TO *PPR* IF *CPUCIO* RESTARTED.
  741. *
  742. * USES CM+1 - CM+2, IR - IR+1.
  743. *
  744. * MACROS MONITOR.
  745.  
  746.  
  747. CRC BSS 0 ENTRY
  748. LDD CM+1 CHECK IF *UADM* NECESSARY
  749. ZJN CRC1 IF *UADM* NOT NECESSARY
  750. LDN 1 SET NO DROP OF PP
  751. STD CM+2
  752. MONITOR UADM UPDATE ACCOUNTING
  753. CRC1 LDM COCA
  754. SHN -13
  755. NJN CRC2 IF NOT TO ENTER RECALL STACK
  756. LJM ERS ENTER RECALL STACK
  757.  
  758. CRC2 LDC 2RCI RESET *CIO* CALL
  759. STD IR
  760. LDD IR+1
  761. LPN 77
  762. ADC 1RO*100
  763. STD IR+1
  764. LDN ZERL
  765. CRD CM
  766. LDD MA
  767. CWD IR
  768. ADN 1 CLEAR MB+1
  769. CWD CM
  770. CRCA LDN 2 SET DROP PP FLAG
  771. * LDN 0 (NO DROP FOR TERMINAL EQUIPMENT)
  772. STD CM+1
  773. MONITOR RPPM RESTART CIO
  774. CRCB UJN CRC3 EXIT TO PP RESIDENT
  775. * PSN (DROP PPU REQUIRED)
  776. LDD IA CLEAR AUTO RECALL FLAG
  777. CRD IR
  778. LDD IR+1
  779. SCN 40
  780. STD IR+1
  781. LDD IA
  782. CWD IR
  783. MONITOR DPPM DROP PP
  784. CRC3 LJM PPR EXIT TO PP RESIDENT
  785. ERS SPACE 4,10
  786. ** ERS - ENTER RECALL STACK.
  787. *
  788. * ENTRY (PC) = PRU COUNT.
  789. * (FS - FS+4) = FST ENTRY.
  790. *
  791. * EXIT TO *PPR*.
  792. * TO *1RJ* IF RECALL DUE TO MASS STORAGE ERROR.
  793. *
  794. * USES BS - BS+4, CM - CM+4, DP - DP+4.
  795. *
  796. * CALLS CBD.
  797. *
  798. * MACROS EXECUTE, MONITOR.
  799.  
  800.  
  801. ERS BSS 0 ENTRY
  802. LDD PC
  803. ZJN ERS1 IF NO PRUS TRANSFERRED
  804. LDM RCRF SET DATA TRANSFERRED FLAG
  805. LPC 3600
  806. ADD HN
  807. UJN ERS2 SET RECALL STACK REASON
  808.  
  809. ERS1 LDM RCRF
  810. LPC 3700
  811. ERS2 LMN PTLR SET PRU TRANSFER LIMIT RECALL REASON CODE
  812. * LMN TRLR (TRACK LIMIT REASON CODE)
  813. * LMN TIRR (TRACK INTERLOCK REJECT REASON CODE)
  814. * LMN NFIR (NFL INCREASE PENDING REASON CODE)
  815. * LMN LBBR (WAIT FOR BUFFER FLUSH REASON CODE)
  816. * LMN WFOR (WAIT FOR INACCESSABLE DEVICE REASON CODE)
  817. ERSA EQU *-1
  818. STM RCRF
  819. LPN 77
  820. LMN PTLR
  821. NJN ERS3 IF NOT PRU TRANSFER LIMIT
  822. RJM CBD CHECK FOR BUFFERED DEVICE
  823. RAM ERSC INCREASE ACTIVITY FOR BUFFERED DEVICE
  824. LDD CM+4
  825. SHN 3
  826. ADN PFGL GET NUMBER OF UNITS ON EQUIPMENT
  827. CRD BS
  828. ADN DALL-PFGL GET DEVICE ACTIVITY
  829. CRD DP
  830. LDD DP EXTRACT ACTIVITY ONLY FROM DALL
  831. LPN 77
  832. STD DP
  833. LDD BS+4
  834. LPN 7
  835. ADN 1
  836. ERSC SHN 1
  837. * SHN 3 (BUFFERED DEVICE)
  838. SBD DP
  839. PJN ERS3 IF NOT EXCESSIVE DEVICE ACTIVITY
  840. LDK ACRT SET DEVICE ACTIVITY RECALL TIME PERIOD
  841. UJN ERS4 ENTER RECALL STACK
  842.  
  843. ERS3 LDC IORT SET I/O RECALL TIME PERIOD
  844. * LDC TLRT (TRACK LIMIT RECALL TIME PERIOD)
  845. * LDC TIRT (TRACK INTERLOCK REJECT RECALL TIME)
  846. ERSB EQU *-1
  847. ERS4 STD CM+4 SET RECALL TIME
  848. SHN -14
  849. STD CM+3
  850. LDN 0
  851. STD CM+2
  852. LDD IA STORE *1MS* CALL
  853. CWD IR
  854. ADN 2
  855. CWD IR
  856. ADN 1 STORE *1MS* RECALL PARAMETERS
  857. CWM RCRF,ON
  858. LDM RCRF CHECK IF WAITING FOR SUSPECT EQUIPMENT
  859. LPN 77
  860. LMN WFOR
  861. ZJN ERS5 IF WAITING FOR SUSPECT DEVICE - CALL 1RJ*
  862. LDN PTMF SET TIMED RECALL CRITERION
  863. STD CM+1
  864. MONITOR RECM
  865. LJM PPR EXIT TO PP RESIDENT
  866.  
  867. * CALL *1RJ* TO RECALL THE PP AND ROLL THE JOB.
  868.  
  869. ERS5 LDC 0 SET EST ORDINAL IN *1RJ* CALL
  870. ERSD EQU *-1
  871. NJN ERS6 IF ERROR RETURNED FROM *0DF*
  872. LDD FS
  873. ERS6 STD IR+4
  874. LDD MA READ RECALL PARAMETERS FOR *1RJ*
  875. ADN 1
  876. CRD MB
  877. EXECUTE 1RJ
  878. ERR SPACE 4,10
  879. ** ERR - PROCESS ERROR.
  880. *
  881. * ENTRY (A) = ERROR NUMBER.
  882. *
  883. * EXIT (ERRA) = ERROR NUMBER.
  884. * TO *CFN* IF NO LOGGING NEEDED FOR UNNECESSARY
  885. * *CIO* FUNCTION.
  886. *
  887. * CALLS EXR.
  888.  
  889.  
  890. ERR BSS 0 ENTRY
  891. STM ERRA SET ERROR NUMBER
  892. LDC 1L4+ERP
  893. RJM EXR
  894.  
  895.  
  896. ERRA CON 0 ERROR NUMBER
  897. CHG SPACE 4,10
  898. ** CHG - CONDITIONALLY HANG PP.
  899. *
  900. * ENTRY (A) = ERROR FLAG TO BE SET OR ZERO.
  901. *
  902. * EXIT (A) = 0.
  903. *
  904. * USES CM - CM+4.
  905. *
  906. * MACROS MONITOR.
  907.  
  908.  
  909. CHG SUBR ENTRY/EXIT
  910. STD CM+2 STORE ERROR FLAG IN REQUEST
  911. LDM CHG GET ADDRESS WHERE ERROR DETECTED
  912. STD CM+1
  913. MONITOR CHGM CONDITIONALLY HANG PP
  914. UJN CHGX RETURN
  915. TITLE RESIDENT PROCESSORS.
  916. CDA SPACE 4,15
  917. ** CDA - CHECK DEVICE ACCESSIBILITY.
  918. *
  919. * THIS ROUTINE CHECKS THE RETURN STATUS FROM THE DRIVER, THE
  920. * REAL TIME FLAG IN THE FET, AND THE SUBSYSTEM INDICATION
  921. * TO DETERMINE IF THE JOB SHOULD BE ROLLED OUT.
  922. *
  923. * ENTRY (RDCT), (MSD) = STATUS FROM THE DRIVER.
  924. *
  925. * EXIT TO *MSR*, IF REAL TIME FLAG SET, UNRECOVERABLE ERROR,
  926. * SUBSYSTEM, OR CONTROL POINT ERROR FLAG
  927. * SET.
  928. * TO *COC*, IF JOB SHOULD BE ROLLED.
  929. *
  930. * NOTE IN SOME CASES, THE ERROR PROCESSOR JUMPS TO THE
  931. * *CDA* RETURN ADDRESS.
  932.  
  933.  
  934. CDA CON 0
  935. LDM RDCT
  936. SHN 21-12
  937. MJN CDA1 IF UNRECOVERABLE ERROR
  938. LDD FO
  939. SHN 21-7
  940. MJN CDA1 IF REAL TIME FLAG SET
  941. LDM MSD
  942. SHN 21-13
  943. PJN CDA5 IF SUBSYSTEM
  944. LDD CP CHECK ERROR FLAG
  945. ADN STSW
  946. CRD CM
  947. LDD CM+1
  948. CDA1 NJN CDA5 IF ERROR FLAG SET
  949. CDAA LDD FC
  950. * UJN CDA4 (ERROR SETTING TRACK INTERLOCK)
  951. SHN -6 CHECK FOR WRITE OPERATION
  952. LPN 17
  953. LMN /CIO/WTF
  954. ZJN CDA2 IF WRITE FUNCTION
  955. LMN /CIO/CLO&/CIO/WTF
  956. NJN CDA3 IF NOT CLOSE FUNCTION
  957. CDA2 RJM /WMS/WEI ATTEMPT TO WRITE EOI ON FILE
  958. CDA3 LDM ERSD
  959. ZJN CDA4 IF NOT ERROR RETURN FROM *0DF*
  960. LDN 0
  961. STD FA
  962. CDA4 LDN WFOR-PTLR ADJUST REASON CODE
  963. RAM ERSA
  964. LDN 1 SET TO RECALL PP
  965. STM COCA
  966. LJM COC COMPLETE AND RECALL PP
  967. * LJM /SMR/SLS (*READLS*/*RPHRLS*)
  968. CDAB EQU *-1
  969.  
  970. CDA5 LDM RDCT SAVE DRIVER RETURN CODE
  971. STD T4
  972. LDD MA SAVE DIRECT CELLS
  973. CWD T3
  974. CRM DCSA,ON
  975. ERROR DRE *DEVICE ERROR ON FILE*
  976. DRF SPACE 4,15
  977. ** DRF - DROP FILE.
  978. *
  979. * ENTRY (A) = 0 IF RETURN FUNCTION.
  980. * = 1 IF UNLOAD FUNCTION.
  981. * (FA) = RELATIVE FNT ADDRESS IN NFL.
  982. *
  983. * EXIT (FA) = 0.
  984. * TO *CDA*, IF ERROR FROM *0DF*.
  985. * TO *REW1*.
  986. *
  987. * CALLS CIT.
  988. *
  989. * MACROS EXECUTE.
  990.  
  991.  
  992. DRF BSS 0 ENTRY
  993. STM OVL-1 SAVE RETURN/UNLOAD FLAG FOR *0DF*
  994. LDD FA
  995. ZJN DRF2 IF NO FNT ENTRY
  996.  
  997. * CHANGE TO RETURN FUNCTION IN CASE RECALL IS NECESSARY DUE TO
  998. * AN ERROR FROM *0DF*. THIS ALSO PREVENTS ERROR PROCESSING FROM
  999. * ATTEMPTING TO WRITE AN EOI ON THE FILE AFTER A *0DF* ERROR
  1000. * ON A CLOSE/RETURN FUNCTION.
  1001.  
  1002. LDD FC
  1003. LPC 6077
  1004. LMC /CIO/RET*100
  1005. STD FC
  1006. STM ICFC
  1007. RJM CIT CLEAR TRACK INTERLOCK
  1008. EXECUTE 0DF,OVL DROP FILE
  1009. DRF2 PJN REW1 IF NO ERROR
  1010. LDD T5
  1011. STM ERSD
  1012. RJM CDA CHECK DEVICE
  1013. REW SPACE 4,10
  1014. ** REW - REWIND MASS STORAGE.
  1015. *
  1016. * ENTRY (FS - FS+4) = FST ENTRY.
  1017. *
  1018. * EXIT (FS - FS+4) = UPDATED FST ENTRY.
  1019. * TO *RRF*.
  1020.  
  1021.  
  1022. REW BSS 0 ENTRY
  1023. LDM CFNB CLEAR SYSTEM SECTOR OPERATION FLAG
  1024. SCN 40
  1025. STM CFNB
  1026. LDM MSFF GET MASS STORAGE FILE FLAG
  1027. NJN REW1 IF NOT MASS STORAGE FILE
  1028. LDD FS+2 CHECK CURRENT TRACK
  1029. ZJN REW1 IF FILE NOT USED
  1030. LDD FS+1 SET FIRST TRACK
  1031. STD FS+2
  1032. LDN FSMS SET FIRST SECTOR
  1033. STD FS+3
  1034. REW1 LJM RRF RESET POINTERS
  1035. TITLE RESIDENT SUBROUTINES.
  1036. SPACE 4,10
  1037. ** COMMON DECKS.
  1038.  
  1039.  
  1040. *CALL COMPCTI
  1041. CAF SPACE 4,10
  1042. ** CAF - COMPUTE ABSOLUTE FET ADDRESS.
  1043. *
  1044. * ENTRY (IR+3 - IR+4) = RELATIVE FET ADDRESS.
  1045. *
  1046. * EXIT (A) = ABSOLUTE FET ADDRESS.
  1047.  
  1048.  
  1049. CAF SUBR ENTRY/EXIT
  1050. LDD IR+3 CALCULATE ABSOLUTE FET ADDRESS
  1051. LPN 37
  1052. SHN 6
  1053. ADD RA
  1054. SHN 6
  1055. ADD IR+4
  1056. UJN CAFX RETURN
  1057. CBD SPACE 4,10
  1058. ** CBD - CHECK FOR BUFFERED DEVICE.
  1059. *
  1060. * ENTRY (FS) = EQUIPMENT.
  1061. *
  1062. * EXIT (A) = 0 IF NOT BUFFERED DEVICE.
  1063. * (A) = 2 IF BUFFERED DEVICE.
  1064. * (CM - CM+4) = EST ENTRY IF EQUIPMENT ASSIGNED.
  1065. *
  1066. * USES CM - CM+4.
  1067. *
  1068. * MACROS SFA.
  1069.  
  1070.  
  1071. CBD1 LDN 0 INDICATE NOT BUFFERED DEVICE
  1072.  
  1073. CBD SUBR ENTRY/EXIT
  1074. LDD FS
  1075. ZJN CBDX IF NO EQUIPMENT
  1076. SFA EST READ EST ENTRY
  1077. ADK EQDE
  1078. CRD CM
  1079. LDD CM
  1080. SHN 21-13
  1081. PJN CBD1 IF NOT MASS STORAGE
  1082. SHN 1-5-21+13 CHECK BUFFERED DEVICE FLAG
  1083. LPN 2
  1084. UJN CBDX RETURN
  1085. FWB SPACE 4,15
  1086. ** FWB - FLUSH WRITE DATA FOR BUFFERED DEVICE.
  1087. *
  1088. * ENTRY (FA) = RELATIVE ADDRESS OF FNT ENTRY IN NFL.
  1089. * (FS - FS+4) = FST ENTRY.
  1090. *
  1091. * EXIT (A) = 0 IF NO FLUSH REQUIRED.
  1092. * (A) = 1 IF FLUSH IN PROGRESS.
  1093. *
  1094. * USES CM - T9, T0 - T4.
  1095. *
  1096. * CALLS CBD.
  1097. *
  1098. * MACROS MONITOR, NFA.
  1099.  
  1100.  
  1101. FWB SUBR ENTRY/EXIT
  1102. RJM CBD CHECK FOR BUFFERED DEVICE
  1103. ZJN FWBX IF NOT BUFFERED DEVICE
  1104. NFA FA,R GET CONTROL BUFFER INDEX FROM FNT ENTRY
  1105. ADN FUTL
  1106. CRD T9-4
  1107. LDK BIOL GET BUFFERED I/O TABLES FWA
  1108. CRD CM
  1109. LDD CM+1
  1110. SHN 14
  1111. ADD CM+2
  1112. ADK /COMSHIO/CBTP GET CONTROL BUFFERS FWA
  1113. CRD CM
  1114. LDD T9
  1115. ZJN FWBX IF NO CONTROL BUFFER INDEX
  1116. SHN /COMSHIO/CBTLS
  1117. ADD CM+4
  1118. SHN 6
  1119. ADD CM+3
  1120. SHN 14
  1121. ADN /COMSHIO/LSLK
  1122. CRD T0
  1123. SBN -/COMSHIO/IOLK+/COMSHIO/LSLK
  1124. CRD CM
  1125. SBN -/COMSHIO/FSTC+/COMSHIO/IOLK
  1126. CRD CM+1
  1127. LDD T0
  1128. NJN FWB1 IF BUFFER BEING ACCESSED
  1129. LDD CM+1 COMPARE FST INFORMATION
  1130. LMD FS
  1131. LPC 777
  1132. NJN FWB1 IF BUFFER NOT FOR SAME EQUIPMENT
  1133. LDD CM+2
  1134. ZJN FWB3 IF NO FIRST TRACK
  1135. LMD FS+1
  1136. ZJN FWB3 IF SAME TRACK
  1137. FWB1 LDN 0 INDICATE NO FLUSH REQUIRED
  1138. FWB2 LJM FWBX RETURN
  1139.  
  1140. FWB3 LDD CM
  1141. SHN 21-11
  1142. PJN FWB1 IF NOT WRITE DATA
  1143. SHN 21-13-21+11+22
  1144. MJN FWB4 IF I/O INTERLOCK SET
  1145. LDD FA SET FNT RELATIVE ADDRESS
  1146. STD CM+4
  1147. LDC FLBS*100 REQUEST BUFFER FLUSH
  1148. STD CM+1
  1149. MONITOR PIOM
  1150. FWB4 LDN 1 INDICATE FLUSH IN PROGRESS
  1151. UJN FWB2 RETURN
  1152. SCF SPACE 4,10
  1153. ** SCF - SET CONTROL BUFFER INDEX INTO FNT.
  1154. * CONTROL BUFFER INDEX IS TAKEN FROM THE PP LINK TABLE
  1155. * FOR BUFFERED DEVICES.
  1156. *
  1157. * USES CM - CM+5.
  1158. *
  1159. * CALLS CBD.
  1160. *
  1161. * MACROS NFA.
  1162.  
  1163.  
  1164. SCF SUBR ENTRY/EXIT
  1165. RJM CBD CHECK FOR BUFFERED DEVICE
  1166. ZJN SCFX IF NOT BUFFERED DEVICE
  1167. LDK PPCP GET PP COMMUNICATION BUFFER FWA
  1168. CRD CM+1
  1169. LDK BIOL GET PP LINK TABLE ADDRESS
  1170. CRD CM
  1171. LDD CM+1
  1172. SHN 14
  1173. ADD CM+2
  1174. ADN /COMSHIO/PLTP
  1175. CRD CM
  1176. LDD IA CALCULATE PP NUMBER
  1177. SBD CM+1+4
  1178. SHN -3
  1179. ADD CM+4
  1180. SHN 6
  1181. ADD CM+3
  1182. SHN 14
  1183. CRD CM+1 READ CONTROL BUFFER INDEX
  1184. NFA FA,R UPDATE LINK IN FNT ENTRY
  1185. ADN FUTL
  1186. CRD CM
  1187. LDD CM+1+4
  1188. STD CM+4
  1189. NFA FA,R
  1190. ADN FUTL
  1191. CWD CM
  1192. LJM SCFX RETURN
  1193. CIT SPACE 4,10
  1194. ** CIT - CLEAR TRACK INTERLOCK.
  1195. *
  1196. * ENTRY (FS - FS+4) = FST ENTRY.
  1197. *
  1198. * USES T5.
  1199. *
  1200. * CALLS CTI.
  1201.  
  1202.  
  1203. CIT SUBR ENTRY/EXIT
  1204. LDM RCRF CHECK TRACK INTERLOCK FLAG
  1205. SHN 21-12
  1206. PJN CITX IF TRACK INTERLOCK NOT SET
  1207. LDC -2000 CLEAR TRACK INTERLOCK FLAG
  1208. RAM RCRF
  1209. LDD FS SET EST ORDINAL
  1210. STD T5
  1211. LDD FS+1 SET FIRST TRACK
  1212. RJM CTI CLEAR TRACK INTERLOCK
  1213. UJN CITX RETURN
  1214. DCC SPACE 4,10
  1215. ** DCC - DROP CHANNEL WHEN OUTPUT REGISTER CLEAR.
  1216. *
  1217. * EXIT (A) = 0.
  1218. *
  1219. * USES CM - CM+4.
  1220. *
  1221. * MACROS ENDMS.
  1222.  
  1223.  
  1224. DCC2 ENDMS END MASS STORAGE OPERATION
  1225.  
  1226. DCC SUBR ENTRY/EXIT
  1227. DCC1 LDD OA WAIT OUTPUT REGISTER CLEAR
  1228. CRD CM
  1229. LDD CM
  1230. ZJN DCC2 IF OUTPUT REGISTER CLEAR
  1231. LDN 77
  1232. SBN 1
  1233. NJN *-1 DELAY
  1234. UJN DCC1 REREAD OUTPUT REGISTER
  1235. VAL SPACE 4,10
  1236. ** VAL - VALIDATE FILE ACCESS LEVEL.
  1237. *
  1238. * ENTRY (A) = 0 IF VALIDATE FILE READ.
  1239. * (A) = 1 IF VALIDATE FILE WRITE.
  1240. *
  1241. * ERROR TO *ERR* IF VALIDATION ERROR DETECTED.
  1242. *
  1243. * USES T1, CM - CM+7.
  1244. *
  1245. * MACROS ERROR, MONITOR.
  1246.  
  1247.  
  1248. VAL SUBR ENTRY/EXIT
  1249. STD T1
  1250. LDM OSSM CHECK O/S SECURITY MODE
  1251. ZJN VALX IF UNSECURED SYSTEM
  1252. LDD CP CHECK FOR SUBSYSTEM
  1253. ADK JCIW
  1254. CRD CM+3
  1255. ADK SEPW-JCIW CHECK FOR SSJ=
  1256. CRD CM
  1257. LDD CM
  1258. SHN 21-2
  1259. MJN VALX IF SSJ=
  1260. LDD CM+3+2
  1261. SBK LSSI+1
  1262. PJN VALX IF SUBSYSTEM
  1263. LDM JSAL COMPARE JOB AND FILE ACCESS LEVELS
  1264. SBM FSAL
  1265. VAL1 ZJN VALX IF FILE IS AT JOB ACCESS LEVEL
  1266. PJN VAL3 IF JOB LEVEL .GT. FILE LEVEL
  1267. LDD T1
  1268. NJN VALX IF WRITE TO FILE
  1269. LDM FSAL RAISE JOB LEVEL TO FILE LEVEL FOR READ
  1270. STD CM+4
  1271. LDN VJAS
  1272. VAL2 STD CM+1
  1273. MONITOR VSAM
  1274. LDD CM+1
  1275. ZJN VAL1 IF ACCESS LEVEL CHANGED
  1276. ERROR LNJ *JOB ACCESS LEVEL CONFLICT.*
  1277.  
  1278. VAL3 LDD T1
  1279. ZJN VAL1 IF READ FILE
  1280. LDD CP CHECK WRITE DOWN VALIDATION
  1281. ADK JSCW
  1282. CRD CM
  1283. LDD CM
  1284. LPN 40
  1285. LMN 40
  1286. ZJN VAL1 IF USER ALLOWED TO WRITE TO LOWER LEVEL
  1287. LDM PMFF
  1288. ZJN VAL4 IF PERMANENT FILE
  1289. LDD FA GET FNT ADDRESS
  1290. STD CM+3
  1291. LDM JSAL RAISE FILE TO JOB ACCESS LEVEL FOR WRITE
  1292. STD CM+4
  1293. LDN VSFS
  1294. UJN VAL2 ISSUE *VSAM* MONITOR FUNCTION
  1295.  
  1296. VAL4 ERROR WDP *WRITEDOWN PROHIBITED ON FILE.*
  1297. SPACE 4,10
  1298. DCSA BSSZ 5 T3, RDCT, T5, T6, T7 SAVE AREA
  1299. SPACE 4,10
  1300. MSDO EQU *+5 MASS STORAGE DRIVER ORIGIN
  1301. SPACE 4,10
  1302. OVL EQU *+5 ZERO LEVEL OVERLAY LOAD ADDRESS
  1303.  
  1304. ERRNG BFMS-OVL-ZDFL CHECK LENGTH OF *0DF*
  1305. TITLE INITIALIZATION.
  1306. CFE SPACE 4,15
  1307. ** CFE - CREATE FNT ENTRY.
  1308. *
  1309. * ENTRY (FN - FN+3) = FILE NAME.
  1310. *
  1311. * EXIT TO *ERS1* IF NFL INCREASE REJECTED.
  1312. * TO *CRC2* IF FNT ENTRY CREATED.
  1313. *
  1314. * ERROR TO *ERR* IF ERROR DETECTED.
  1315. *
  1316. * USES FA, FS, FS+4, CM - CM+4.
  1317. *
  1318. * CALLS VFN, *0BF*.
  1319. *
  1320. * MACROS CFET, ERROR, EXECUTE, NFA, MONITOR.
  1321.  
  1322.  
  1323. CFE BSS 0 ENTRY
  1324. LDD FN+3 CLEAR LEVEL NUMBER
  1325. SCN 77
  1326. STD FN+3
  1327. RJM VFN VALIDATE FILE NAME
  1328. NJN CFE1 IF NO FILE NAME ERROR
  1329. ERROR FLN *INCORRECT FILE NAME*
  1330.  
  1331. CFE1 LDN 6 RETURN ON NFL INCREASE/LOCAL FILE LIMIT
  1332. STM CFO-1
  1333. LDM JSAL SET DEFAULT FILE ACCESS LEVEL
  1334. STM FSAL
  1335. LDD FO
  1336. SHN 21-3
  1337. PJN CFE1.1 IF NO ACCESS LEVEL PROCESSING
  1338. CFET 4 GET FILE ACCESS LEVEL
  1339. CRD CM
  1340. LDD CM+1
  1341. LPN 7
  1342. STD CM+1
  1343. STM FSAL
  1344. ADN 10
  1345. SHN 6
  1346. RAM CFO-1
  1347. LDM OSSM CHECK O/S SECURITY MODE
  1348. ZJN CFE1.1 IF UNSECURED SYSTEM
  1349. LDD MA VALIDATE FILE ACCESS LEVEL FOR JOB
  1350. CWD CM
  1351. LDN 1
  1352. STD CM+4
  1353. LDN VAJS
  1354. STD CM+1
  1355. MONITOR VSAM
  1356. LDD CM+1
  1357. NJN CFE1.2 IF FILE ACCESS LEVEL NOT VALID
  1358. CFE1.1 LDC 2000 PREVENT MS TRACK ASSIGNMENT
  1359. STD FS
  1360. EXECUTE 0BF,CFO
  1361. UJN CFE2 CHECK RETURN STATUS
  1362.  
  1363. * ADVANCE EXIT IF FNT ENTRY FOUND.
  1364.  
  1365. LDN 0
  1366. STD FA
  1367. ERROR FSQ *I/O SEQUENCE ERROR*
  1368.  
  1369. CFE1.2 ERROR LNF *FILE ACCESS LEVEL CONFLICT.*
  1370.  
  1371. CFE2 ZJN CFE4 IF FNT ENTRY CREATED
  1372. LMN 4
  1373. NJN CFE3 IF NOT LOCAL FILE LIMIT
  1374. ERROR LFL *LOCAL FILE LIMIT*
  1375.  
  1376. CFE3 LCN PTLR-NFIR SET NFL INCREASE PENDING REASON CODE
  1377. RAM ERSA
  1378. LJM ERS1 ENTER RECALL STACK
  1379.  
  1380. * SET FNT POINTER IN FET. SET FST NOT BUSY.
  1381. * ENTER RECALL STACK TO REISSUE *CIO* CALL TO *CPUCIO*.
  1382.  
  1383. CFE4 CFET 4 SET FNT POINTER IN FET
  1384. CRD CM
  1385. LDD FA
  1386. STD CM
  1387. CFET 4
  1388. CWD CM
  1389. AOD FS+4 SET FST NOT BUSY
  1390. NFA FA,R
  1391. ADN FSTL
  1392. CWD FS
  1393. LDD FS CHECK FOR TERMINAL EQUIPMENT
  1394. LPC 777
  1395. ZJN CFE5 IF NO EQUIPMENT ASSIGNED
  1396. LCN 2 SET FOR NO DROP OF PP ON *RPPM*
  1397. RAM CRCA
  1398. LDN 0 SET TO ISSUE *DPPM*
  1399. STM CRCB
  1400. CFE5 LJM CRC2 RESTART *CPUCIO*
  1401.  
  1402.  
  1403. CFO EQU *+1 *0BF* LOAD ADDRESS FOR *CFE*
  1404. ERRNG BFMS-CFO-ZBFL CHECK *0BF* LENGTH
  1405. PRS SPACE 4,45
  1406. ** PRS - PRESET.
  1407. *
  1408. * ENTRY (IR - IR+4) = *1MS* CALL.
  1409. * (MB - MB+4) = MESSAGE BUFFER PARAMETERS.
  1410. * (MB1 - MB1+4) = MESSAGE BUFFER + 1 PARAMETERS.
  1411. * (MB2 - MB2+4) = MESSAGE BUFFER + 2 PARAMETERS.
  1412. *
  1413. * EXIT (FA) = RELATIVE ADDRESS OF FNT ENTRY.
  1414. * = 0 IF NO FNT ENTRY.
  1415. * (FC) = INTERNAL *CIO* FUNCTION CODE.
  1416. * (FO) = SPECIAL FET OPTIONS.
  1417. * (RC) = *DRCM* MONITOR FUNCTION CODE.
  1418. * (BS - BS+4) = FILE NAME AND EXTERNAL REQUEST.
  1419. * (DP - DP+4) = (FET+6) IF RANDOM FILE.
  1420. * (FS - FS+4) = FST ENTRY.
  1421. * (FT - FT+1) = FIRST.
  1422. * (IN - IN+1) = IN.
  1423. * (LM - LM+1) = LIMIT.
  1424. * (OT - OT+1) = OUT.
  1425. * (PC) = 0.
  1426. * (CFNB) = UPPER STATUS BITS OF FST ENTRY.
  1427. * (ERCF) = ERROR CODE AND FUNCTION FLAGS.
  1428. * (FACF) = FILE ACCESS FLAGS.
  1429. * (FETL) = FET LENGTH - 5.
  1430. * (FNTA) = RELATIVE ADDRESS OF FNT ENTRY, IF NONZERO.
  1431. * (ICFC) = INTERNAL *CIO* FUNCTION CODE.
  1432. * (LVXC) = LEVEL NUMBER.
  1433. * (MSFF) = MASS STORAGE FILE, IF ZERO.
  1434. * (PMFF) = DIRECT ACCESS PERMANENT FILE, IF NONZERO.
  1435. * (RCRF) = RECALL REASON CODE AND RESTART FLAGS.
  1436. * TO *CFE* IF FNT ENTRY TO BE CREATED.
  1437. * TO *CFN* IF WRITE OF NON-MASS STORAGE FILE.
  1438. * TO *CFN2* IF ERROR CODE NOT CORRECT.
  1439. * TO *DRF* TO DROP FILE.
  1440. * TO *ERS1* IF TO WAIT FOR WRITE BUFFER FLUSH.
  1441. * TO *TMS* IF SKIP, OPEN, CLOSE, READ, OR WRITE
  1442. * FUNCTION PROCESSOR TO BE LOADED.
  1443. * TO *UFS* IF READ OF NULL FILE.
  1444. *
  1445. * ERROR TO *ERR* IF PRESET ERROR DETECTED.
  1446. *
  1447. * USES EN, CM - CM+4, T1 - T5.
  1448. *
  1449. * CALLS CHG, /SRP/EVF, EXR, FWB, STI.
  1450. *
  1451. * MACROS CFET, ERROR, MONITOR, NFA, SFA.
  1452.  
  1453.  
  1454. PRS BSS 0 ENTRY
  1455. LDD MA RESET FET PARAMETERS IN MESSAGE BUFFER
  1456. CWD MB SAVE MESSAGE BUFFER PARAMETERS
  1457. CRM RCRF,ON
  1458. ADN 1
  1459. CWD MB1
  1460. ADN 1
  1461. CWD MB2
  1462. LDD MB+3 GET EXTERNAL *CIO* FUNCTION CODE
  1463. SHN 1 REPOSITION EXTERNAL *CIO* CODE
  1464. STD FO
  1465. LDD MB+4 GET INTERNAL *CIO* FUNCTION CODE
  1466. STD FC
  1467. LDN ZERL
  1468. CRD FS
  1469. LDM FNTA GET FNT RELATIVE ADDRESS
  1470. STD FA
  1471. ZJN PRS1 IF NO FNT ENTRY
  1472. NFA FA,R READ FNT ENTRY
  1473. CRD DP
  1474. ADN FSTL READ FST ENTRY
  1475. CRD FS
  1476. ADN FUTL-FSTL READ FUT ENTRY
  1477. CRD CM
  1478. LDD CM+2 SAVE FILE SECURITY ACCESS LEVEL
  1479. LPN 7
  1480. STM FSAL
  1481. LDD FS+4 SAVE UPPER STATUS BITS
  1482. SHN -6
  1483. STM CFNB
  1484. LDD DP+4 SAVE FILE TYPE FLAG
  1485. SHN -6
  1486. LMN PMFT
  1487. STM PMFF
  1488. LDD DP+3 SAVE FILE ACCESS FLAGS
  1489. LPN 77
  1490. STM FACF
  1491. PRS1 LDN DRCM SET DRIVER RECALL MONITOR FUNCTION
  1492. STD RC
  1493. LDD CP GET JOB SECURITY ACCESS LEVEL
  1494. ADK JSCW
  1495. CRD CM
  1496. LDD CM+1
  1497. SHN -11
  1498. STM JSAL
  1499. LDK SSML GET O/S SECURITY MODE
  1500. CRD CM
  1501. LDD CM
  1502. LPN 77
  1503. STM OSSM
  1504. LDN 0
  1505. STD PC CLEAR PRU COUNT
  1506. STD CM+1 CLEAR *VFPM* ERROR FLAG
  1507. LDM ERCF GET ERROR CODE
  1508. LPN 77
  1509. STD EN SAVE ERROR CODE
  1510. SBN /CIOERR/ARG
  1511. ZJN PRS3 IF INCORRECT FET ADDRESS
  1512. SBN /CIOERR/MEC-/CIOERR/ARG
  1513. MJN PRS2 IF ERROR CODE VALID
  1514. LDK PPET SET PPU ABORT ERROR FLAG
  1515. RJM CHG CONDITIONALLY HANG PP
  1516. LJM CFN2 COMPLETE FUNCTION
  1517.  
  1518. * REVALIDATE FET PARAMETERS IF RESTARTED FROM RECALL STACK.
  1519.  
  1520. PRS2 LDM RCRF GET RECALL STACK FLAG
  1521. SHN 21-13
  1522. PJN PRS4 IF FET PARAMETERS PASSED IN CALL
  1523. LDD FC GET VALIDATION FLAGS
  1524. LPN 3
  1525. STD CM+1
  1526. LDD IR+3 SET FET ADDRESS
  1527. LPN 77
  1528. STD CM+3
  1529. LDD IR+4
  1530. STD CM+4
  1531. MONITOR VFPM
  1532. LDD CM+1
  1533. LMN 1
  1534. NJN PRS4 IF NOT INCORRECT FET ADDRESS
  1535. PRS3 ERROR ARG *FET ADDRESS OUT OF RANGE*
  1536.  
  1537. PRS4 CFET GET FILE NAME AND EXTERNAL FUNCTION CODE
  1538. CRD BS
  1539. ADN 1
  1540. CRD T1 GET SPECIAL OPTIONS
  1541. LDD FC
  1542. NJN PRS5 IF INTERNAL CODE SET
  1543. LDD BS+3 CLEAR ERROR FIELD
  1544. SCN 3
  1545. STD BS+3
  1546. LDD BS+4
  1547. STD FO
  1548. UJN PRS6 SET EXTERNAL CODE
  1549.  
  1550. PRS5 LDD BS+3 CLEAR LEVEL NUMBER FROM FET
  1551. SCN 77
  1552. STD BS+3
  1553. LDM LVXC RESET LEVEL NUMBER IN FET
  1554. SHN -6
  1555. LPN 74
  1556. RAD BS+3
  1557. PRS6 LDD FO GET EXTERNAL *CIO* CODE
  1558. LPC 776 CLEAR COMPLETE BIT AND ERROR FIELD
  1559. STD BS+4
  1560.  
  1561. * GET BUFFER POINTERS.
  1562.  
  1563. LDD MA
  1564. ADN 2
  1565. CRD IN-1 *IN* AND *OUT*
  1566. ADN 1
  1567. CRD FT-1 RANDOM FLAG, FET LENGTH, *FIRST*, *LIMIT*
  1568. LDD FT-1 GET FET LENGTH - 5
  1569. LPN 77
  1570. STM FETL
  1571. LDD FT-1 GET RANDOM FLAG
  1572. LPC 4000
  1573. STD FO
  1574. ZJN PRS7 IF NOT RANDOM FILE
  1575. LDD FC CHECK FUNCTION CODE
  1576. SHN -7
  1577. LPN 7
  1578. NJN PRS7 IF NOT READ/WRITE
  1579. LDM RCRF CHECK DATA TRANSFERRED FLAG
  1580. LPC 100
  1581. NJN PRS7 IF PRIOR DATA TRANSFER
  1582. CFET 6 READ RANDOM REQUEST WORD
  1583. CRD DP
  1584. LDD DP+3 CHECK RANDOM REQUEST ADDRESS
  1585. ADD DP+4
  1586. ZJN PRS7 IF RANDOM REQUEST ADDRESS NOT SET
  1587. AOM TMSA SET RANDOM FUNCTION FLAG
  1588. PRS7 LDD T1+1 SET FET OPTIONS
  1589. LPC 3777
  1590. RAD FO
  1591. LDM FNTA RESET FNT RELATIVE ADDRESS
  1592. STD FA
  1593. LDD EN CHECK FOR ERROR
  1594. ZJN PRS8 IF NO ERROR
  1595. LJM ERR PROCESS ERROR
  1596.  
  1597. PRS8 LDD CM+1 CHECK *VFPM* REPLY
  1598. ZJN PRS9 IF NO ERROR
  1599. ERROR BUF *BUFFER ARGUMENT ERROR*
  1600.  
  1601. PRS9 LDD FA
  1602. NJN PRS10 IF FNT ENTRY PRESENT
  1603. LDM ERCF CHECK IF TO CREATE FNT ENTRY
  1604. SHN 21-6
  1605. PJN PRS10 IF NOT TO CREATE FNT ENTRY
  1606. LJM CFE CREATE FNT ENTRY
  1607.  
  1608. PRS10 LDD FS CHECK FOR MASS STORAGE
  1609. ZJN PRS11 IF NO EQUIPMENT ASSIGNED
  1610. SFA EST READ EST ENTRY
  1611. ADK EQDE
  1612. CRD CM
  1613. LDD CM
  1614. SHN -13
  1615. LMN 1
  1616. PRS11 STD T1 SAVE MASS STORAGE FLAG
  1617. STM MSFF
  1618. LDD FC
  1619. SHN -6
  1620. LPN 17
  1621. LMN /CIO/RET
  1622. ZJN PRS12 IF RETURN/UNLOAD FUNCTION
  1623. LMN /CIO/EVI&/CIO/RET
  1624. NJN PRS13 IF NOT EVICT FUNCTION
  1625. LDD T1
  1626. NJN PRS12 IF NOT MASS STORAGE FILE
  1627. LDD FA
  1628. ZJN PRS12 IF NO FNT ENTRY
  1629. LDC 1L4+SRP LOAD SPECIAL PROCESSOR OVERLAY
  1630. RJM EXR
  1631. RJM /SRP/EVF EVICT MASS STORAGE FILE
  1632. PRS12 LDD FC GET UNLOAD FLAG FOR *DRF*
  1633. SHN -12
  1634. LPN 1
  1635. LJM DRF DROP FILE
  1636.  
  1637.  
  1638. SRPO EQU *+5 SPECIAL REQUEST PROCESSOR ORIGIN
  1639.  
  1640.  
  1641. PRS13 LDD T1 GET MASS STORAGE FLAG
  1642. ADM PMFF CHECK FILE TYPE
  1643. NJN PRS14 IF NOT DIRECT ACCESS PERMANENT FILE
  1644. LDM TMSA
  1645. NJN PRS13.1 IF RANDOM READ/WRITE
  1646. LDD FC
  1647. SHN -6
  1648. LPN 17
  1649. LMN /CIO/WTF
  1650. ZJN PRS13.2 IF WRITE
  1651. PRS13.1 RJM FWB FLUSH WRITE BUFFER
  1652. ZJN PRS13.2 IF NO FLUSH IN PROGRESS
  1653. LDN LBBR-PTLR SET BUFFER BUSY REJECT
  1654. RAM ERSA
  1655. LJM ERS1 ENTER RECALL STACK
  1656.  
  1657. PRS13.2 LDM FACF CHECK FILE ACCESS MODE
  1658. LPN 20
  1659. ZJN PRS14 IF NOT M, A, RM, OR RA MODE
  1660. RJM STI SET TRACK INTERLOCK
  1661.  
  1662. * DETERMINE FUNCTION PROCESSOR.
  1663.  
  1664. PRS14 LDD FC
  1665. SHN -6
  1666. LPN 17
  1667. NJN PRS17 IF NOT READ
  1668. LDD FS+2 CHECK FOR NULL READ
  1669. ZJN PRS15 IF NO CURRENT TRACK
  1670. LCN WMS-RMS LOAD READ OVERLAY
  1671. UJN PRS18 SET READ OVERLAY NAME
  1672.  
  1673. * PROCESS READ OF NULL FILE.
  1674.  
  1675. PRS15 LDN /CIO/EOI SET EOI FST STATUS
  1676. STD FS+4
  1677. LDD FO
  1678. SHN 21-13
  1679. PJN PRS16 IF NOT RANDOM FILE
  1680. LDN ZERL SET RANDOM INDEX = 1
  1681. CRD CM
  1682. LDD HN
  1683. STD CM+2
  1684. CFET 6
  1685. CWD CM
  1686. PRS16 LJM UFS UPDATE FET STATUS
  1687.  
  1688. * PROCESS WRITE OF FILE ASSIGNED TO NULL EQUIPMENT.
  1689.  
  1690. PRS17 LMN /CIO/WTF
  1691. NJN PRS19 IF NOT WRITE
  1692. LDM MSFF
  1693. ZJN PRS18 IF MASS STORAGE FILE
  1694. LDN 0 SET OUT = IN
  1695. STD IN-1
  1696. STD IN-2
  1697. STD IN-3
  1698. CFET 3
  1699. CWD IN-3
  1700. LJM CFN COMPLETE FUNCTION
  1701.  
  1702. PRS18 ADC WMS SET WRITE OVERLAY NAME
  1703. UJN PRS20 EXECUTE FUNCTION PROCESSOR
  1704.  
  1705. PRS19 LMN /CIO/CLO&/CIO/WTF
  1706. NJN PRS22 IF NOT CLOSE
  1707. LDC CMS SET CLOSE OVERLAY NAME
  1708. PRS20 STM TMSB
  1709. PRS21 LJM TMS LOAD AND EXECUTE FUNCTION PROCESSOR
  1710.  
  1711. PRS22 LMN /CIO/OVW&/CIO/CLO
  1712. NJN PRS21 IF NOT OVERWRITE
  1713. LDC OMS SET OVERWRITE OVERLAY NAME
  1714. UJN PRS20 EXECUTE FUNCTION PROCESSOR
  1715. STI SPACE 4,15
  1716. ** STI - SET TRACK INTERLOCK.
  1717. *
  1718. * ENTRY (FS - FS+4) = FST ENTRY.
  1719. *
  1720. * EXIT (A) = 0.
  1721. *
  1722. * ERROR TO *ERS1* IF INTERLOCK REJECT.
  1723. * TO *ERR* IF ERROR FLAG SET.
  1724. *
  1725. * USES CM - CM+4.
  1726. *
  1727. * MACROS ERROR, MONITOR.
  1728.  
  1729.  
  1730. STI2 LDC 2000 SET TRACK INTERLOCK FLAG
  1731. RAM RCRF
  1732.  
  1733. STI SUBR ENTRY/EXIT
  1734. LDM RCRF CHECK TRACK INTERLOCK FLAG
  1735. SHN 21-12
  1736. MJN STIX IF TRACK INTERLOCK ALREADY SET
  1737. LDD FS SET EQUIPMENT
  1738. ADD TH IMMEDIATE RETURN IF INACCESSIBLE DEVICE
  1739. STD CM+1
  1740. LDD FS+1 SET FIRST TRACK
  1741. STD CM+2
  1742. LDN STIS
  1743. STD CM+3
  1744. MONITOR STBM SET TRACK INTERLOCK
  1745. LDD CM+1
  1746. SHN 21-11
  1747. PJN STI0 IF FUNCTION PROCESSED
  1748. ISTORE CDAA,(UJN CDA4) SKIP EOI WRITE
  1749. LDD FS SET EST ORDINAL
  1750. STM ERSD
  1751. RJM CDA CHECK DEVICE ACCESSIBILITY
  1752.  
  1753. STI0 ZJP STI2 IF INTERLOCK SET
  1754. LDD CP
  1755. ADN STSW
  1756. CRD CM
  1757. LDD CM+1
  1758. SBN SPET
  1759. MJN STI1 IF ERROR FLAG NOT ABOVE THRESHOLD
  1760. ERROR EFT *ERROR FLAG TERMINATION*
  1761.  
  1762. STI1 LDN TIRR-PTLR SET TRACK INTERLOCK REJECT REASON CODE
  1763. RAM ERSA
  1764. LDN TIRT SET TRACK INTERLOCK REJECT RECALL TIME
  1765. STM ERSB
  1766. LJM ERS1 ENTER RECALL STACK
  1767. SPACE 4,10
  1768. ** COMMON DECKS.
  1769.  
  1770.  
  1771. *CALL COMPVFN
  1772. SPACE 4,10
  1773. OVERFLOW PPFW
  1774. SRP OVERLAY (SPECIAL REQUEST PROCESSOR.),SRPO
  1775. SPACE 4,10
  1776. ** DIRECT LOCATION ASSIGNMENTS.
  1777.  
  1778.  
  1779. QA EQU 26 DEQUEUE GLOBAL FNT ENTRY INDICATOR
  1780. SRP SPACE 4,10
  1781. ** SRP - SPECIAL REQUEST PROCESSOR.
  1782.  
  1783.  
  1784. SRP SUBR ENTRY/EXIT
  1785. UJN SRPX RETURN
  1786. EVF SPACE 4,15
  1787. ** EVF - EVICT MASS STORAGE FILE.
  1788. *
  1789. * ENTRY (FA) = RELATIVE ADDRESS OF FNT ENTRY IN NFL.
  1790. * (DP - DP+4) = LOCAL FNT ENTRY.
  1791. * (FS - FS+4) = LOCAL FST ENTRY.
  1792. *
  1793. * EXIT (FS - FS+4) = UPDATED FST ENTRY.
  1794. * TO *RRF* IF FILE SUCCESSFULLY EVICTED.
  1795. * TO *RRF* IF ERROR CLEARING GLOBAL QUEUE ENTRY.
  1796. * TO *CDA*, IF ERROR FROM *0DQ*.
  1797. *
  1798. * USES T1, T5, T6, T7, CM+1 - CM+3.
  1799. *
  1800. * CALLS CHG, MSR, WEI, *0DQ*.
  1801. *
  1802. * MACROS ENDMS, EXECUTE, MONITOR, NFA, SETMS.
  1803.  
  1804.  
  1805. EVF SUBR ENTRY/EXIT
  1806. LDD DP+3 CHECK WRITE LOCKOUT
  1807. LPN 1
  1808. NJN EVFX IF WRITE LOCKOUT SET
  1809. LDD FS+2 CHECK CURRENT TRACK
  1810. ZJN EVF1 IF FILE NOT USED
  1811. LDD DP+4 GET FILE TYPE
  1812. SHN -6
  1813. STD T1
  1814. LDM TFTY,T1 SET PROCESSOR ADDRESS
  1815. ZJN EVFX IF NO PROCESSING FOR FILE TYPE
  1816. STD T1
  1817. LJM 0,T1 JUMP TO PROCESSOR
  1818.  
  1819. EVF1 LJM RRF RESET POINTERS
  1820.  
  1821. * EVICT QUEUED FILE.
  1822.  
  1823. EVF2 LDN 0 FORCE QFT SEARCH
  1824. STD QA
  1825. LDN 1 SELECT NO RELEASE OF DISK SPACE
  1826. STM DQLA-1
  1827. EXECUTE 0DQ,DQLA RETURN QFT ENTRY
  1828. MJP EVF5.0 IF DEVICE IS INACCESSIBLE
  1829. LDD QA
  1830. NJN EVF3 IF GLOBAL ENTRY FOUND AND CLEARED
  1831. * LDN 0 SET NO ERROR FLAG
  1832. RJM CHG CONDITIONALLY HANG PP
  1833. LJM RRF RESET RANDOM FET POINTERS
  1834.  
  1835. EVF3 LDD DP+4 CHANGE FILE TYPE IN LOCAL FNT
  1836. LPN 77
  1837. LMC LOFT*100
  1838. STD DP+4
  1839. NFA FA,R REWRITE LOCAL FNT ENTRY
  1840. CWD DP
  1841.  
  1842. * EVICT LOCAL FILE.
  1843.  
  1844. EVF4 LDN 0 CLEAR SECTOR
  1845. STD T7
  1846. STD FS+3 CLEAR CURRENT SECTOR
  1847. STD FS+2 CLEAR CURRENT TRACK
  1848. EVF5 LDD FS SET EQUIPMENT
  1849. ADD TH IMMEDIATE RETURN IF INACCESSIBLE DEVICE
  1850. ADC 0 SET DEVICE CHECKPOINT
  1851. * ADC 4000 (DIRECT ACCESS PERMANENT FILE)
  1852. EVFA EQU *-1
  1853. STD CM+1
  1854. LDD FS+1 SET FIRST TRACK
  1855. LPC 3777
  1856. STD CM+2
  1857. LDD T7 SET SECTOR
  1858. STD CM+3
  1859. MONITOR DTKM DROP TRACKS
  1860. LDD CM+1 CHECK STATUS
  1861. SHN 21-11
  1862. PJN EVF5.1 IF FUNCTION PROCESSED
  1863. NFA FA,R RESTORE (FS - FS+4)
  1864. ADN 1
  1865. CRD FS
  1866. EVF5.0 LDD FS SET EST ORDINAL
  1867. STM ERSD
  1868. RJM CDA CHECK DEVICE ACCESSIBILITY
  1869.  
  1870. * INCREMENT PRU LIMIT FIELD IN CONTROL POINT AREA.
  1871. * ACTUAL COUNT OF SECTORS RETURNED VIA DTKM IS IN CM+3 - CM+4
  1872.  
  1873. EVF5.1 LDD CM+3 MOVE SECTOR COUNT TO RESIDENT CIO BUFFER
  1874. STM CFNJ
  1875. LDD CM+4
  1876. STM CFNJ+1
  1877. LDN CICS CHANGE TO INCREMENT FUNCTION
  1878. STM CFNI
  1879. LJM RRF RESET POINTERS
  1880.  
  1881.  
  1882. DQLA EQU *+1 *0DQ* LOAD ADDRESS
  1883.  
  1884. ERRNG 10000-DQLA-ZDQL CHECK *0DQ* LENGTH
  1885.  
  1886.  
  1887. * EVICT PERMANENT FILE OR PRIMARY FILE.
  1888.  
  1889. EVF6 LDC 4000 SET DEVICE CHECKPOINT FLAG
  1890. STM EVFA
  1891. EVF7 LDD FS+1 SET FIRST TRACK
  1892. STD T6
  1893. STD FS+2
  1894. LDD DP+3 CHECK WRITE RESTRICTIONS
  1895. LPN 30
  1896. ZJN EVF8 IF NOT MODIFY OR APPEND MODE
  1897. LJM EVFX RETURN
  1898.  
  1899. EVF8 LDD FS SET EST ORDINAL
  1900. STD T5
  1901. LDN FSMS SET FIRST SECTOR
  1902. STD FS+3
  1903. STD T7
  1904. SETMS IO
  1905. RJM WEI WRITE EOI SECTOR
  1906. PJN EVF9 IF NO ERROR
  1907. RJM CDA CHECK DEVICE
  1908.  
  1909. EVF9 ENDMS END MASS STORAGE OPERATION
  1910. LDM CFNB SET FILE MODIFIED
  1911. LPN 74
  1912. LMN 03
  1913. STM CFNB
  1914. LJM EVF5 DROP TRACKS
  1915. TFTY SPACE 4,10
  1916. ** TFTY - TABLE OF FILE TYPE PROCESSORS.
  1917. * ENTRY 1 WORD.
  1918. * INDEXED BY FILE TYPE.
  1919. *
  1920. *T, 12/ ADDR
  1921. * ADDR ADDRESS OF FILE PROCESSOR
  1922.  
  1923.  
  1924. TFTY INDEX
  1925.  
  1926. INDEX PTFT,EVF7 PRIMARY
  1927. INDEX PMFT,EVF6 PERMANENT
  1928. INDEX LOFT,EVF4 LOCAL
  1929. INDEX QFFT,EVF2 QUEUED
  1930.  
  1931. INDEX MXFT
  1932. SPACE 4,10
  1933. ** COMMON DECKS.
  1934.  
  1935.  
  1936. *CALL COMPWEI
  1937. SPACE 4,10
  1938. OVERFLOW SRPO
  1939. RMS OVERLAY (READ MASS STORAGE.),MSDO
  1940. RMS SPACE 4,10
  1941. ** DIRECT LOCATION ASSIGNMENTS.
  1942.  
  1943.  
  1944. OP EQU 16 - 17 *OUT* POINTER FOR RECALL CALCULATION
  1945. TC EQU 35 TRACK COUNT
  1946. BP EQU 37 BUFFER SPACE IN PRUS
  1947. RMS SPACE 4,10
  1948. ORG *+2
  1949. LJM PRS PRESET FOR READ
  1950. LSO SPACE 4,10
  1951. ** LSO - LOAD SPECIAL READ OVERLAY.
  1952. *
  1953. * EXIT TO *RMS*.
  1954. *
  1955. * CALLS EXR.
  1956.  
  1957.  
  1958. LSO BSS 0 ENTRY
  1959. LDC 1L4+SMR LOAD SPECIAL READ OVERLAY
  1960. RJM EXR
  1961. * UJN RMS PROCESS READ
  1962. RMS SPACE 4,15
  1963. ** RMS - READ MASS STORAGE MAIN ROUTINE.
  1964. *
  1965. * EXIT (T1) = 0 FOR CONTROL WORD INITIAL SECTOR LENGTH.
  1966. * (T3) = 0 FOR CONTROL WORD HEADER USE.
  1967. * (T5) = EQUIPMENT.
  1968. * (T6) = CURRENT TRACK.
  1969. * (T7) = CURRENT SECTOR.
  1970. * TO *BRD* FOR NON-CONTROL WORD READ.
  1971. * TO *CRD* FOR CONTROL WORD READ.
  1972. *
  1973. * USES CM - CM+4.
  1974. *
  1975. * CALLS SBA, SCA.
  1976. *
  1977. * MACROS PAUSE, SETMS.
  1978.  
  1979.  
  1980. RMS BSS 0 ENTRY
  1981.  
  1982. * INITIALIZE FOR MASS STORAGE DEVICE.
  1983.  
  1984. LDD FS SET EST ORDINAL
  1985. STD T5
  1986. LDD FS+2 SET TRACK
  1987. STD T6
  1988. LDD FS+3 SET SECTOR
  1989. STD T7
  1990.  
  1991. * INITIALIZE READ PARAMETERS.
  1992.  
  1993. LDN 0 SET IN POINTER WORD
  1994. STD DP
  1995. STD DP+1
  1996. STD DP+2
  1997. STD TC INITIALIZE TRACK COUNT
  1998. LDD IN
  1999. STD DP+3
  2000. LDD IN+1
  2001. STD DP+4
  2002.  
  2003. * BEGIN READ.
  2004.  
  2005. SETMS IO
  2006. LDD CM
  2007. SHN 21-12
  2008. PJN RMS1 IF NOT SYSTEM DEVICE
  2009. LDN FNTP READ FNT POINTER
  2010. CRD CM
  2011. LDD CM READ SYSTEM FST ENTRY
  2012. SHN 14
  2013. ADD CM+1
  2014. ERRNZ SYFO CHECK SYSTEM FILE POSITION IN FNT
  2015. ADN FSTG
  2016. CRD CM
  2017. LDD CM+1 CHECK MATCHING FIRST TRACK
  2018. LMD FS+1
  2019. NJN RMS1 IF NOT SYSTEM FILE
  2020.  
  2021. * *CIO* IS USED TO ACCESS THE SYSTEM FILE FOR THE LOADER, CCL,
  2022. * ETC. THE READSYS OPTION CAUSES THE DRIVER TO SELECT THE
  2023. * SYSTEM DEVICE WITH THE LEAST ACTIVITY. IT ALSO CAUSES THE
  2024. * DRIVER ERROR PROCESSOR TO AUTOMATICALLY TRY A DIFFERENT
  2025. * SYSTEM DEVICE WHEN AN ERROR IS ENCOUNTERED.
  2026.  
  2027. SETMS READSYS SYSTEM SELECTION OF SYSTEM DEVICE
  2028. RMS1 LDC RWPC SET DEFAULT PRU COUNT
  2029. ADD T7 ADJUST BY CURRENT SECTOR
  2030. RMS2 STD T1
  2031. AOD TC INCREMENT TRACK COUNT
  2032. LDD T1
  2033. SBM SLM
  2034. PJN RMS2 IF MORE TRACKS TO PROCESS
  2035. LDD OT SAVE *OUT*
  2036. STD OP
  2037. LDD OT+1
  2038. STD OP+1
  2039. PAUSE NE
  2040. LDD FC CHECK FOR CONTROL WORD OPERATION
  2041. SHN 21-5
  2042. MJN RMS3 IF *READCW*
  2043. RJM SBA SET ADDRESSES
  2044. LJM BRD ENTER BUFFER READ LOOP
  2045. * LJM RSK9 (*READSKP* SKIP PROCESSING)
  2046. RMSA EQU *-1
  2047.  
  2048. RMS3 RJM SCA SET ADDRESSES
  2049. LDN 0 PRESET CONTROL WORD
  2050. STD T3
  2051. STD T1
  2052. STM BFMS+2-5
  2053. STM BFMS+2-3
  2054. LDD HN
  2055. STM BFMS+2-4
  2056. LJM CRD ENTER CONTROL WORD READ LOOP
  2057. EOF SPACE 4,10
  2058. ** EOF - TERMINATE ON EOF.
  2059. *
  2060. * ENTRY (T2) = LINKAGE BYTE.
  2061. * (FS - FS+4) = FST ENTRY.
  2062. *
  2063. * EXIT (FS+4) = EOF STATUS.
  2064. * TO *CPR* TO COMPLETE FUNCTION.
  2065. * TO */SMR/ALS* TO ADVANCE LIST PROCESSING.
  2066.  
  2067.  
  2068. EOF BSS 0 ENTRY
  2069. LDD T2 ADVANCE TO NEXT SECTOR
  2070. STD T7
  2071. SHN 6
  2072. PJN EOF1 IF NOT TRACK POINTER
  2073. SHN -6
  2074. STD T6
  2075. LDN 0
  2076. STD T7
  2077. EOF1 LDN /CIO/EOF SET EOF FST STATUS
  2078. STD FS+4
  2079. LJM CPR COMPLETE READ PROCESSING
  2080. * LJM /SMR/ALS (*READLS*/*RPHRLS*)
  2081. * LJM CPR (CLEANUP AFTER MS ERROR)
  2082. EOFA EQU *-1
  2083. CPR SPACE 4,15
  2084. ** CPR - COMPLETE READ.
  2085. *
  2086. * ENTRY (DP - DP+4) = IN POINTER.
  2087. *
  2088. * EXIT (FS - FS+4) = UPDATED FST ENTRY.
  2089. * TO *MSP* TO COMPLETE PROCESSING.
  2090. * TO */SMR/SLS* TO SET READ LIST STATUS.
  2091. *
  2092. * USES CM-2 - CM+4.
  2093. *
  2094. * CALLS DCC.
  2095.  
  2096.  
  2097. CPR BSS 0 ENTRY
  2098. RJM DCC DROP CHANNEL WHEN OUTPUT REGISTER CLEAR
  2099. LDD T6 UPDATE TRACK
  2100. STD FS+2
  2101. LDD T7 UPDATE SECTOR
  2102. STD FS+3
  2103. CPRA LDC 0 GET POINTER TO BAD DATA BLOCK
  2104. ZJN CPR1 IF NO PARITY ERROR
  2105. STD CM+4 WRITE BAD DATA POINTER AT *IN*
  2106. SHN -14
  2107. STD CM+3
  2108. LDN ZERL
  2109. CRD CM-2
  2110. LDD DP+3
  2111. SHN 6
  2112. ADD RA
  2113. SHN 6
  2114. ADD DP+4
  2115. CWD CM
  2116. CPR1 LJM MSP PROCESS MASS STORAGE EXIT
  2117. * LJM /SMR/SLS (*READLS*/*RPHRLS*)
  2118. CPRB EQU *-1
  2119. TITLE BUFFER READ.
  2120. BRD SPACE 4,25
  2121. ** BRD - BUFFER READ LOOP.
  2122. *
  2123. * ENTRY (BP) = BUFFER SPACE IN PRUS.
  2124. * (PC) = 0.
  2125. * (RC) = *DRCM* MONITOR FUNCTION CODE.
  2126. * (T6) = TRACK.
  2127. * (T7) = SECTOR.
  2128. * (DP - DP+4) = *IN* POINTER.
  2129. * (FS - FS+4) = FST ENTRY.
  2130. * ADDRESS REFERENCES SET.
  2131. * AT *BRD11* IF PROCESSING TRANSFER OF PARTIAL
  2132. * SECTOR FOR *READSKP*.
  2133. *
  2134. * EXIT (FS+4) = READ STATUS.
  2135. * (PC) = COUNT OF PRUS TRANSFERRED.
  2136. * (T6) = UPDATED CURRENT TRACK.
  2137. * (T7) = UPDATED CURRENT SECTOR.
  2138. * (DP - DP+4) = ADVANCED *IN* POINTER.
  2139. * TO *CPR* TO COMPLETE PROCESSING.
  2140. * TO *CDA*, IF MASS STORAGE ERROR.
  2141. *
  2142. * USES BP, OT+1, T1, T2, CM - CM+4, OP-3 - OP+1.
  2143. *
  2144. * CALLS CRT, MSR, RDS, SBA.
  2145.  
  2146.  
  2147. * LOOP TO PROCESS NEXT SECTOR.
  2148.  
  2149. BRD BSS 0 ENTRY
  2150. BRDA LDC ** (OUT + RA)
  2151. CRD OP-3 READ OUT
  2152. LDD OP LENGTH = OUT - IN - 1
  2153. SBD DP+3
  2154. SHN 14
  2155. ADD OP+1
  2156. SBD DP+4
  2157. SBN 1
  2158. PJN BRD1 IF IN+1 .LT. OUT
  2159. BRDB ADC ** (LIMIT - FIRST)
  2160. BRD1 SHN -6
  2161. STD BP
  2162. BRDC NJN BRD5 IF BUFFER NOT FULL
  2163. * PSN (TIME TO ENTER RECALL STACK)
  2164. LDC LDNI CLEAR SETTING OF FET TERMINATION STATUS
  2165. STM UFSA
  2166. BRD2 LDC 7777 CHECK FOR EOF
  2167. BRDD EQU *-1
  2168. LMD PC
  2169. ZJN BRD3 IF LAST SECTOR READ WAS AN EOF
  2170. LDM BFMS+1 CHECK FOR EOR
  2171. LMD HN
  2172. ZJN BRD4 IF LAST SECTOR READ WAS FULL SECTOR
  2173. LDN /CIO/EOR&/CIO/EOF SET EOR STATUS
  2174. BRD3 LMN /CIO/EOF
  2175. BRD4 STD FS+4
  2176. LJM CPR COMPLETE READ
  2177. * LJM RSK2 (*READSKP*)
  2178. * LJM CPR (CLEANUP AFTER MS ERROR)
  2179. BRDE EQU *-1
  2180.  
  2181. * READ NEXT SECTOR.
  2182.  
  2183. BRD5 AOD PC INCREMENT PRU COUNT
  2184. LDC BFMS READ SECTOR
  2185. RJM RDS
  2186. PJN BRD6 IF NO ERROR
  2187. LDD T6 SET CURRENT TRACK
  2188. STD FS+2
  2189. LDD T7 SET CURRENT SECTOR
  2190. STD FS+3
  2191. RJM CDA CHECK DEVICE
  2192.  
  2193. BRD6 LDM BFMS CHECK FIRST CONTROL BYTE
  2194. NJN BRD8 IF NOT EOF/EOI
  2195. LDM BFMS+1
  2196. NJN BRD7 IF NOT EOI
  2197. SOD PC
  2198. LDN /CIO/EOI SET EOI STATUS
  2199. STD FS+4
  2200. LJM CPR COMPLETE READ
  2201. * LJM /SMR/ALS (*READLS*/*RPHRLS*)
  2202. * LJM CPR (CLEANUP AFTER MS ERROR)
  2203. BRDF EQU *-1
  2204.  
  2205. * PROCESS EOF.
  2206.  
  2207. BRD7 STD T2
  2208. BRDG LJM EOF PROCESS EOF
  2209. * UJN *+2 (*READEI*)
  2210. LDN 0 SET WORD COUNT
  2211. STM BFMS+1
  2212. LDD PC SAVE SECTOR NUMBER
  2213. STM BRDD
  2214. LDD T2
  2215. BRD8 STD T7 SET NEXT SECTOR
  2216. SHN 6
  2217. PJN BRD9 IF NOT NEW TRACK
  2218. SHN -6 SET NEXT TRACK
  2219. STD T6
  2220. LDN 0 CLEAR SECTOR
  2221. STD T7
  2222. SOD TC DECREMENT TRACK COUNT
  2223. BRDY NJN BRD9 IF NOT TIME TO RECALL
  2224. * UJN BRD9 (*READLS*/*RPHRLS*/*RPHR*)
  2225. STM BRDC SET TO ENTER RECALL STACK
  2226. LDM BFMS+1
  2227. SHN -6
  2228. BRDZ ZJN BRD9 IF EOR/EOF
  2229. * PSN (*READNS*/*READEI*)
  2230. AOM COCA
  2231. BRD9 LDD RA CHECK RA CHANGED
  2232. LMC ** (RA)
  2233. BRDH EQU *-1
  2234. ZJN BRD10 IF RA NOT CHANGED
  2235. RJM SBA SET BUFFER ADDRESSES
  2236. BRD10 LDM BFMS+1 SET SECTOR WORD COUNT
  2237. STD T1
  2238. NJN BRD11 IF NOT EMPTY SECTOR
  2239. LJM BRD16 PROCESS EMPTY PRU
  2240.  
  2241. * ENTRY FROM *READSKP* PROCESSOR TO TRANSFER PARTIAL SECTOR.
  2242.  
  2243. BRD11 ADD DP+4 CHECK IN + WORD COUNT
  2244. SHN 6
  2245. ADD DP+3
  2246. SHN 14
  2247. BRDI ADC -** (-LIMIT)
  2248. MJN BRD12 IF NOT WRAP AROUND SECTOR
  2249. NJN BRD14 IF SECOND PART TO TRANSFER
  2250. SBD T1 STORE PRU
  2251. BRDJ ADC ** (LIMIT + RA)
  2252. CWM BFMS+2,T1
  2253. BRDK LDC ** (FIRST)
  2254. UJN BRD13 STORE *IN* POINTER
  2255.  
  2256. * PROCESS NORMAL SECTOR.
  2257.  
  2258. BRD12 SBD T1 STORE PRU
  2259. BRDL ADC ** (LIMIT + RA)
  2260. CWM BFMS+2,T1
  2261.  
  2262. * ADVANCE *IN* POINTER.
  2263.  
  2264. BRDM ADC -** (-RA)
  2265. BRD13 STD DP+4 ADVANCE *IN*
  2266. SHN -14
  2267. STD DP+3
  2268.  
  2269. * THE FOLLOWING LINE OF CODE IS MODIFIED VIA *RJM*.
  2270.  
  2271. LJM BRD15 UPDATE *IN* IF NOT BUFFERED OPERATION
  2272. * LJM BRD18 (CHECK OUT)
  2273. * LJM BRD19 (RECALL CPU)
  2274. BRDN EQU *-1
  2275. UJN BRD15 UPDATE *IN*
  2276.  
  2277. * PROCESS WRAP AROUND SECTOR.
  2278.  
  2279. BRD14 STD CM+1 SET SECOND PART WORD COUNT
  2280. LDD T1 SET FIRST PART WORD COUNT
  2281. SBD CM+1
  2282. STD CM
  2283. SHN 2 SET PPU ADDRESS OF SECOND PART
  2284. ADD CM
  2285. ADC BFMS+2
  2286. STM BRDQ
  2287. LDD DP+3 STORE FIRST PART
  2288. SHN 14
  2289. ADD DP+4
  2290. BRDO ADC ** (RA)
  2291. CWM BFMS+2,CM
  2292. BRDP LDC ** (FIRST + RA) STORE SECOND PART
  2293. CWM BFMS+2,CM+1
  2294. BRDQ EQU *-1 (PP ADDRESS OF SECOND PART)
  2295. BRDR ADC -** (-RA)
  2296. STD DP+4
  2297. SHN -14
  2298. STD DP+3
  2299.  
  2300. * UPDATE *IN*.
  2301.  
  2302. BRD15 LDC ** (IN+RA)
  2303. BRDS EQU *-2
  2304. CWD DP STORE IN
  2305.  
  2306. * CHECK TERMINATIONS.
  2307.  
  2308. BRD16 LDD T1 CHECK SECTOR WORD COUNT
  2309. * LJM BRD (*READNS*)
  2310. * LJM BRD (*READEI*)
  2311. * LJM BRD2 (AFTER MS ERROR)
  2312. BRDT EQU *-1
  2313. SHN -6
  2314. ZJN BRD17 IF SHORT SECTOR
  2315. LJM BRD CONTINUE DATA TRANSFER
  2316. BRDU EQU *-1
  2317. * LJM BRD2 (*RPHR*)
  2318. * LJM /SMR/RSK7 (*READSKP* PARTIAL SECTOR TRANSFER)
  2319. * LJM /SMR/ALS (*RPHRLS* ADVANCE LIST)
  2320.  
  2321. BRD17 LJM BRD2 TERMINATE TRANSFER
  2322. * LJM /SMR/RSK7 (*READSKP* PARTIAL SECTOR TRANSFER)
  2323. * LJM /SMR/ALS (*READLS*/*RPHRLS*)
  2324. BRDV EQU *-1
  2325.  
  2326. * WAIT FOR *OUT* TO CHANGE FOR BUFFERED OPERATION.
  2327. * ONLY 12 BITS OF *OUT* IS CHECKED DUE TO TIMING
  2328. * CONSIDERATIONS.
  2329.  
  2330.  
  2331. BRD18 RJM BRDN MODIFY INSTRUCTION
  2332. LDD BP
  2333. SHN -3
  2334. NJN BRD15 IF .GE. 8 SECTORS OF FREE SPACE
  2335. LDD OP+1
  2336. SBD OT+1
  2337. ZJN BRD15 IF *OUT* NOT CHANGED
  2338. RAD OT+1 SAVE NEW *OUT*
  2339.  
  2340. * RECALL CPU ON THE NEXT SECTOR IF JOB IS IN *X* STATUS.
  2341.  
  2342. RJM BRDN MODIFY INSTRUCTION
  2343.  
  2344. * THE FOLLOWING CHECK MINIMIZES OVERHEAD ON TRACK SWITCH
  2345. * AND PREVENTS A *DRCM* BEING ISSUED JUST PRIOR
  2346. * TO THE DRIVER NEEDING TO DO AN *LDAM*.
  2347.  
  2348. BRD19 LDD T7
  2349. ZJN BRD15 IF TRACK SWITCH
  2350. LDC **+CWQW CHECK CPU RECALL REQUIRED
  2351. BRDW EQU *-1
  2352. CRD CM
  2353. LDD CM+1
  2354. SHN 21-12
  2355. MJN BRD18 IF RECALL NOT REQUIRED
  2356. LDD OA RECALL CPU
  2357. CWD RC
  2358. UJN BRD18 RESET TO CHECK *OUT*
  2359. SBA SPACE 4,10
  2360. ** SBA - SET BUFFER ADDRESSES.
  2361. * PRESETS ADDRESSES IN *BRD*.
  2362. * ENTER IF (RA) CHANGES.
  2363. *
  2364. * ENTRY (FT - FT+1) = *FIRST* POINTER.
  2365. * (LM - LM+1) = *LIMIT* POINTER.
  2366. *
  2367. * MACROS CFET.
  2368.  
  2369.  
  2370. SBA SUBR ENTRY/EXIT
  2371.  
  2372. LDD RA CHECK RA CHANGED
  2373. LMM BRDH
  2374. ZJN SBAX IF BUFFER ADDRESSES CORRECT
  2375. LDD RA RA
  2376. STM BRDH
  2377. SHN 6
  2378. STM BRDO+1
  2379. LMC 7777
  2380. STM BRDM+1
  2381. STM BRDR+1
  2382. SHN -14
  2383. LMC ADCI
  2384. STM BRDO
  2385. LMN 77
  2386. STM BRDM
  2387. STM BRDR
  2388.  
  2389. LDD FT FIRST + RA
  2390. SHN 6
  2391. ADD RA
  2392. SHN 6
  2393. ADD FT+1
  2394. STM BRDP+1
  2395. SHN -14
  2396. LMC LDCI
  2397. STM BRDP
  2398.  
  2399. CFET 2 IN + RA
  2400. STM BRDS+1
  2401. STM BRDA+1
  2402. SHN -14
  2403. LMC LDCI
  2404. STM BRDS
  2405. STM BRDA
  2406. AOM BRDA+1 OUT + RA
  2407. SHN -14
  2408. RAM BRDA
  2409.  
  2410. LDD LM LIMIT + RA
  2411. SHN 6
  2412. ADD RA
  2413. SHN 6
  2414. ADD LM+1
  2415. STM BRDL+1
  2416. STM BRDJ+1
  2417. SHN -14
  2418. LMC ADCI
  2419. STM BRDL
  2420. STM BRDJ
  2421. LJM SBAX RETURN
  2422. SPACE 4,10
  2423. QUAL
  2424. SMRO EQU *+5 SPECIAL READ OVERLAY LOAD ADDRESS
  2425. QUAL *
  2426. TITLE CONTROL WORD READ.
  2427. CRD SPACE 4,20
  2428. ** CRD - CONTROL WORD READ LOOP.
  2429. *
  2430. * ENTRY (PC) = 0.
  2431. * (RC) = *DRCM* MONITOR FUNCTION CODE.
  2432. * (T5) = EQUIPMENT.
  2433. * (T6) = CURRENT TRACK.
  2434. * (T7) = CURRENT SECTOR.
  2435. * (DP - DP+4) = *IN* POINTER.
  2436. * (FS - FS+4) = FST ENTRY.
  2437. * ADDRESS REFERENCES SET.
  2438. *
  2439. * EXIT (PC) = PRU COUNT.
  2440. * (T6) = UPDATED CURRENT TRACK.
  2441. * (T7) = UPDATED CURRENT SECTOR.
  2442. * (FS+4) = READ STATUS.
  2443. * (DP - DP+4) = ADVANCED *IN* POINTER.
  2444. * TO *CDA*, IF MASS STORAGE ERROR.
  2445. *
  2446. * USES BP, T0, T1, T2, CM - CM+4, OT+1, OP-3 - OP+1.
  2447. *
  2448. * CALLS CRT, MSR, RDS, SCA.
  2449.  
  2450.  
  2451. CRD BSS 0 ENTRY
  2452.  
  2453. * *OUT* NOT READ HERE EACH PASS DUE TO TIMING CONSIDERATIONS.
  2454.  
  2455. LDD OP LENGTH = OUT - IN - 1
  2456. SBD DP+3
  2457. SHN 14
  2458. ADD OP+1
  2459. SBD DP+4
  2460. SBN 1
  2461. PJN CRD1 IF IN+1 .LT. OUT
  2462. CRDA ADC ** (LIMIT - FIRST)
  2463. CRD1 ADC -102
  2464. CRDB PJN CRD4 IF BUFFER NOT FULL
  2465. * PSN (TIME TO ENTER RECALL STACK)
  2466. * PSN (CLEANUP AFTER MS ERROR)
  2467. LDC LDNI CLEAR SETTING OF FET TERMINATION STATUS
  2468. STM UFSA
  2469. LDC 7777 CHECK FOR EOF
  2470. CRDC EQU *-1
  2471. LMD PC
  2472. ZJN CRD2 IF LAST SECTOR READ WAS AN EOF
  2473. LDM BFMS+2-1 CHECK FOR EOR
  2474. LMC 500
  2475. ZJN CRD3 IF LAST SECTOR READ WAS FULL SECTOR
  2476. LDN /CIO/EOR&/CIO/EOF
  2477. CRD2 LMN /CIO/EOF
  2478. CRD3 UJN CRD7 COMPLETE READ
  2479.  
  2480. * READ NEXT SECTOR.
  2481.  
  2482. CRD4 SHN -6 SAVE APPROXIMATE NUMBER OF SECTORS
  2483. STD BP
  2484. AOD PC INCREMENT PRU COUNT
  2485. LDC BFMS READ SECTOR
  2486. RJM RDS
  2487. PJN CRD5 IF NO ERROR
  2488. LDD T6 SET CURRENT TRACK
  2489. STD FS+2
  2490. LDD T7 SET CURRENT SECTOR
  2491. STD FS+3
  2492. RJM CDA CHECK DEVICE
  2493.  
  2494. CRD5 LDD RA CHECK RA CHANGED
  2495. LMC ** (RA)
  2496. CRDD EQU *-1
  2497. ZJN CRD6 IF RA NOT CHANGED
  2498. RJM SCA SET BUFFER ADDRESSES
  2499. CRD6 LDD MA SAVE CONTROL WORD TRAILER
  2500. CWD T3
  2501. LDM BFMS CHECK FIRST CONTROL BYTE
  2502. NJN CRD10 IF NOT EOF/EOI
  2503. LDM BFMS+1
  2504. NJN CRD8 IF NOT EOI
  2505. SOD PC
  2506. LDN /CIO/EOI SET EOI STATUS
  2507. CRD7 STD FS+4
  2508. LJM CPR COMPLETE READ
  2509.  
  2510. * PROCESS EOF.
  2511.  
  2512. CRD8 STD T2
  2513. LDD FC CHECK TERMINATION CONDITION
  2514. LPN 14
  2515. LMN /CIO/EOF
  2516. NJN CRD9 IF NOT TERMINATE ON EOF
  2517. LJM EOF TERMINATE READ
  2518.  
  2519. CRD9 LDN 17 SET LEVEL NUMBER
  2520. STD T3
  2521. LDD MA UPDATE CONTROL WORD TRAILER
  2522. CWD T3
  2523. LDC CRD19 CHANGE LOOP
  2524. STM CRDQ
  2525. LDN 0
  2526. STM BFMS+1
  2527. LDD T2
  2528.  
  2529. * UPDATE SECTOR AND TRACK.
  2530.  
  2531. CRD10 STD T7
  2532. SHN 6
  2533. PJN CRD11 IF NOT NEW TRACK
  2534. SHN -6
  2535. STD T6
  2536. LDN 0 RESET SECTOR
  2537. STD T7
  2538. SOD TC
  2539. NJN CRD11 IF NOT TIME TO ENTER RECALL STACK
  2540. STM CRDB SET TO ENTER RECALL STACK
  2541. AOM COCA
  2542.  
  2543. * WRITE SECTOR TO BUFFER.
  2544.  
  2545. CRD11 LDM BFMS+1 SET SECTOR WORD COUNT
  2546. STD T1
  2547. SHN 2 SET WORD COUNT
  2548. ADD T1
  2549. STM BFMS+2-1
  2550. ADC BFMS+2
  2551. STM CRDE
  2552. LDN 0
  2553. STM BFMS+2-2
  2554. LDD MA
  2555. CRM **,ON MOVE TRAILER CONTROL WORD
  2556. CRDE EQU *-1
  2557. LDN 2
  2558. RAD T1
  2559. ADD DP+4 CHECK IN + WORD COUNT
  2560. SHN 6
  2561. ADD DP+3
  2562. SHN 14
  2563. CRDF ADC -** (-LIMIT)
  2564. MJN CRD12 IF NOT WRAP AROUND SECTOR
  2565. NJN CRD14 IF A SECOND PART
  2566. SBD T1
  2567. CRDG ADC ** (LIMIT + RA)
  2568. CWM BFMS+2-5,T1
  2569. CRDH LDC ** (FIRST)
  2570. UJN CRD13 STORE *IN* POINTER
  2571.  
  2572. * PROCESS NORMAL SECTOR.
  2573.  
  2574. CRD12 SBD T1 STORE PRU
  2575. CRDI ADC ** (LIMIT + RA)
  2576. CWM BFMS+2-5,T1
  2577.  
  2578. * ADVANCE *IN* POINTER.
  2579.  
  2580. CRDJ ADC -** (-RA) UPDATE IN
  2581. CRD13 STD DP+4
  2582. SHN -14
  2583. STD DP+3
  2584.  
  2585. * THE FOLLOWING CHECK MINIMIZES OVERHEAD ON TRACK SWITCH
  2586. * AND PREVENTS A *DRCM* BEING ISSUED JUST PRIOR
  2587. * TO THE DRIVER NEEDING TO DO AN *LDAM*.
  2588.  
  2589. LDD T7
  2590. ZJN CRD15 IF TRACK SWITCH
  2591.  
  2592. * THE FOLLOWING LINE OF CODE IS MODIFIED VIA *RJM*.
  2593.  
  2594. LJM CRD15 UPDATE *IN* IF NOT BUFFERED OPERATION
  2595. * LJM CRD17 (RECALL CPU)
  2596. * LJM CRD18 (WAIT FOR OUT TO CHANGE)
  2597. CRDK EQU *-1
  2598. UJN CRD15 UPDATE IN
  2599.  
  2600. * PROCESS WRAP AROUND SECTOR.
  2601.  
  2602. CRD14 STD CM+1 SET SECOND PART WORD COUNT
  2603. LDD T1 SET FIRST PART WORD COUNT
  2604. SBD CM+1
  2605. STD CM
  2606. SHN 2 SET PPU ADDRESS OF SECOND PART
  2607. ADD CM
  2608. ADC BFMS+2-5
  2609. STM CRDN
  2610. LDD DP+3 WRITE FIRST PART
  2611. SHN 14
  2612. ADD DP+4
  2613. CRDL ADC ** (RA)
  2614. CWM BFMS+2-5,CM
  2615. CRDM LDC ** (FIRST + RA)
  2616. CWM **,CM+1 WRITE SECOND PART
  2617. CRDN EQU *-1 (PPU ADDRESS OF SECOND PART)
  2618. CRDO ADC -** (-RA)
  2619. STD DP+4 UPDATE *IN* POINTER
  2620. SHN -14
  2621. STD DP+3
  2622.  
  2623. * UPDATE *IN*.
  2624.  
  2625. CRD15 LDC ** UPDATE *IN* POINTER
  2626. CRDP EQU *-2 (IN + RA)
  2627. CWD DP
  2628. LJM CRD CONTINUE DATA TRANSFER
  2629. * LJM CRD19 (EOF READ)
  2630. * LJM CRD20 (SYSTEM SECTOR READ)
  2631. CRDQ EQU *-1
  2632.  
  2633. * RECALL CPU ON THE NEXT SECTOR IF JOB IS IN *X* STATUS.
  2634.  
  2635. CRD16 RJM CRDK MODIFY INSTRUCTION
  2636. CRD17 LDC **+CWQW CHECK CPU RECALL REQUIRED
  2637. CRDR EQU *-1
  2638. CRD CM
  2639. LDD CM+1
  2640. SHN 21-12
  2641. MJN CRD18 IF RECALL NOT REQUIRED
  2642. LDD OA RECALL CPU
  2643. CWD RC
  2644.  
  2645. * READ *OUT* AND CHECK IF *OUT* HAS CHANGED.
  2646.  
  2647. CRD18 RJM CRDK MODIFY INSTRUCTION
  2648. LDD BP
  2649. SHN -3
  2650. NJN CRD15 IF .GT. 8 SECTORS OF SPACE
  2651. LDC ** (OUT+RA)
  2652. CRDS EQU *-2
  2653. CRD OP-3
  2654. LDD OP+1
  2655. SBD OT+1
  2656. ZJN CRD15 IF *OUT* NOT CHANGED
  2657. RAD OT+1 SAVE NEW *OUT*
  2658. UJN CRD16 SET TO RECALL CPU
  2659.  
  2660. * EOF POST PROCESSING CODE.
  2661.  
  2662. CRD19 LDN 0 RESET LEVEL NUMBER
  2663. STD T3
  2664. LDD PC SAVE EOF SECTOR NUMBER
  2665. STM CRDC
  2666. UJN CRD21 RESTORE LOOP
  2667.  
  2668. * SYSTEM SECTOR POST PROCESSING CODE.
  2669.  
  2670. CRD20 LDN FSMS SET FIRST DATA SECTOR
  2671. STD T7
  2672. LDM CFNB
  2673. LPN 37
  2674. STM CFNB
  2675. CRD21 LDC CRD RESTORE LOOP
  2676. STM CRDQ
  2677. LJM CRD LOOP
  2678. SCA SPACE 4,10
  2679. ** SCA - SET CONTROL WORD READ ADDRESSES.
  2680. * PRESETS ADDRESSES IN *CRD*.
  2681. * ENTER IF (RA) CHANGES.
  2682. *
  2683. * ENTRY (FT - FT+1) = *FIRST* POINTER.
  2684. * (LM - LM+1) = *LIMIT* POINTER.
  2685. *
  2686. * MACROS CFET.
  2687.  
  2688.  
  2689. SCA SUBR ENTRY/EXIT
  2690. LDD RA RA AND -RA
  2691. STM CRDD
  2692. SHN 6
  2693. STM CRDL+1
  2694. LMC 7777
  2695. STM CRDJ+1
  2696. STM CRDO+1
  2697. SHN -14
  2698. LMC ADCI
  2699. STM CRDL
  2700. LMN 77
  2701. STM CRDJ
  2702. STM CRDO
  2703.  
  2704. LDD FT FIRST + RA
  2705. SHN 6
  2706. ADD RA
  2707. SHN 6
  2708. ADD FT+1
  2709. STM CRDM+1
  2710. SHN -14
  2711. LMC LDCI
  2712. STM CRDM
  2713.  
  2714. CFET 2 IN + RA
  2715. STM CRDP+1
  2716. STM CRDS+1
  2717. SHN -14
  2718. LMC LDCI
  2719. STM CRDP
  2720. STM CRDS
  2721. AOM CRDS+1 OUT + RA
  2722. SHN -14
  2723. RAM CRDS
  2724.  
  2725. LDD LM LIMIT + RA
  2726. SHN 6
  2727. ADD RA
  2728. SHN 6
  2729. ADD LM+1
  2730. STM CRDI+1
  2731. STM CRDG+1
  2732. SHN -14
  2733. LMC ADCI
  2734. STM CRDI
  2735. STM CRDG
  2736. LJM SCAX RETURN
  2737. SPACE 4,10
  2738. QUAL
  2739. ERMS EQU *+5 END OF MASS STORAGE READ OVERLAY
  2740. QUAL *
  2741. TITLE READ MASS STORAGE PRESET.
  2742. PRS SPACE 4,20
  2743. ** PRS - READ MASS STORAGE PRESET.
  2744. *
  2745. * ENTRY (FC) = INTERNAL *CIO* FUNCTION CODE.
  2746. * (FT - OT+1) = BUFFER POINTERS.
  2747. * (FS - FS+4) = FST ENTRY.
  2748. *
  2749. * EXIT (BP) = BUFFER SPACE IN PRUS FOR NON-CONTROL WORD
  2750. * READ, IN WORDS FOR CONTROL WORD READ.
  2751. * (OP - OP+1) = (OT - OT+1).
  2752. * TO *RMS* IF SYSTEM SECTOR WRITE REQUIRED.
  2753. * TO *RMS1* IF SYSTEM SECTOR WRITE NOT REQUIRED.
  2754. * TO *UFS* IF INSUFFICIENT BUFFER SPACE FOR
  2755. * CONTINUATION FUNCTION.
  2756. *
  2757. * ERROR TO *ERR* IF ERROR OR UNNECESSARY FUNCTION.
  2758. *
  2759. * USES T1, CM - CM+4.
  2760.  
  2761.  
  2762. PRS BSS 0 ENTRY
  2763. LDD OT CHECK BUFFER SPACE
  2764. SBD IN LENGTH = OUT - IN - 1
  2765. SHN 14
  2766. ADD OT+1
  2767. SBD IN+1
  2768. SBN 1
  2769. PJN PRS1 IF NO WRAP AROUND
  2770. SHN 6 LENGTH = LIMIT - IN - 1 + OUT - FIRST
  2771. ADD LM
  2772. SBD FT
  2773. SHN 14
  2774. ADD LM+1
  2775. SBD FT+1
  2776. PRS1 STD T1 SAVE FREE WORD COUNT
  2777. SHN -6
  2778. STD BP SAVE BUFFER SPACE / 100B
  2779. NJN PRS3 IF BUFFER NOT FULL
  2780. LDD FC CHECK REQUEST
  2781. SHN 21-12
  2782. MJN PRS3 IF *READSKP*
  2783. LDM RCRF
  2784. SHN 21-6
  2785. MJN PRS2 IF DATA TRANSFERRED PREVIOUSLY
  2786. ERROR UCF *UNNECESSARY CIO FUNCTION*
  2787.  
  2788. PRS2 LJM UFS UPDATE FET STATUS
  2789.  
  2790. * SET UP RECALL LOGIC.
  2791.  
  2792. PRS3 LDD IR+1 CHECK RECALL STATUC
  2793. SHN 21-5
  2794. MJN PRS4 IF AUTO RECALL
  2795. LDD CP SET CONTROL POINT ADDRESS
  2796. RAM BRDW
  2797. STM CRDR
  2798. LDC BRD19 SET TO RECALL CPU AFTER FIRST SECTOR
  2799. STM BRDN
  2800. LDC CRD17
  2801. STM CRDK
  2802.  
  2803. * SET BUFFER RELATED ADDRESSES.
  2804.  
  2805. PRS4 LDD LM LIMIT - FIRST
  2806. SBD FT
  2807. SHN 14
  2808. ADD LM+1
  2809. SBD FT+1
  2810. STM BRDB+1
  2811. STM CRDA+1
  2812. SHN -14
  2813. RAM BRDB
  2814. STM CRDA
  2815.  
  2816. LDC ADCI+77 -LIMIT
  2817. LMD LM
  2818. STM BRDI
  2819. STM CRDF
  2820. LDC 7777
  2821. LMD LM+1
  2822. STM BRDI+1
  2823. STM CRDF+1
  2824.  
  2825. LDD FT+1 FIRST
  2826. STM BRDK+1
  2827. STM CRDH+1
  2828. LDD FT
  2829. RAM BRDK
  2830. STM CRDH
  2831.  
  2832. * CHECK FOR SYSTEM SECTOR READ.
  2833.  
  2834. LDD FS+4
  2835. SHN 21-13
  2836. PJN PRS5 IF NOT SYSTEM SECTOR READ
  2837. LDD FC
  2838. SHN 21-5
  2839. PJN PRS7 IF NOT *READCW*
  2840. LDC CRD20 CHANGE LOOP
  2841. STM CRDQ
  2842. PRS5 LDN 0
  2843. STD FS+4
  2844. LDD FC
  2845. SHN 21-12
  2846. MJN PRS6 IF *READSKP*
  2847. SHN 21-4-21+12
  2848. PJN PRS8 IF NOT READ LIST
  2849. LDK UJNI-NJNI PREVENT ENTERING RECALL STACK
  2850. RAM BRDY
  2851. PRS6 LJM LSO LOAD SPECIAL READ OVERLAY
  2852.  
  2853. PRS7 ERROR IRQ *INCORRECT I/O REQUEST*
  2854.  
  2855. PRS8 SHN 21-5-21+4+22
  2856. MJN PRS11 IF *READCW*
  2857. SHN -21+5+22
  2858. LPN 14 GET TERMINATION CONDITION
  2859. NJN PRS9 IF NOT *RPHR*
  2860. LDC BRD2 SET STOP ON PRU
  2861. STM BRDU
  2862. LDK UJNI-NJNI PREVENT ENTERING RECALL STACK
  2863. RAM BRDY
  2864. UJN PRS11 PROCESS READ
  2865.  
  2866. PRS9 LMN /CIO/EOF
  2867. ZJN PRS10 IF *READNS*
  2868. LMN /CIO/EOI&/CIO/EOF
  2869. NJN PRS11 IF NOT *READEI*
  2870. LDC UJNI+2 CLEAR STOP ON EOF
  2871. STM BRDG
  2872. PRS10 LDD HN+LJMI* CLEAR EOR CHECK
  2873. STM BRDT
  2874. LDC BRD
  2875. STM BRDT+1
  2876. LDK PSNI PREVENT EOR/EOF CHECK
  2877. STM BRDZ
  2878. PRS11 LJM RMS PROCESS READ
  2879. SPACE 4,10
  2880. OVERFLOW MSDO
  2881. SMR OVERLAY (SPECIAL MASS STORAGE READS.),SMRO
  2882. SMR SPACE 4,10
  2883. ** DIRECT LOCATION ASSIGNMENTS.
  2884.  
  2885.  
  2886. OP EQU 16 - 17 *OUT* POINTER
  2887. LE EQU 30 - 31 LIST ENTRY (2 LOCATIONS)
  2888. RI EQU 32 - 33 RANDOM INDEX (2 LOCATIONS)
  2889. LP EQU 34 - 35 LIST POINTER (2 LOCATIONS)
  2890. TC EQU 35 TRACK COUNT
  2891. LI EQU 36 LIST INDEX
  2892. BP EQU 37 BUFFER SPACE IN PRUS
  2893. LS EQU 46 - 47 LIST ADDRESS (2 LOCATIONS)
  2894. SMR SPACE 4,10
  2895. ** SMR - SPECIAL MASS STORAGE READS MAIN ROUTINE.
  2896. *
  2897. * ENTRY (FC) = INTERNAL *CIO* FUNCTION CODE.
  2898. *
  2899. * EXIT TO *RLS* IF *READLS*.
  2900. * TO *RPL* IF *RPHRLS*.
  2901. * TO *RSK* IF *READSKP*.
  2902.  
  2903.  
  2904. SMR SUBR ENTRY/EXIT
  2905. LDD FC
  2906. SHN 21-12
  2907. MJN RSK IF *READSKP*
  2908. SHN -21+12+22 GET TERMINATION CONDITION
  2909. LPN 14
  2910. ZJN SMR1 IF *RPHRLS*
  2911. LJM RLS PROCESS *READLS*
  2912.  
  2913. SMR1 LJM RPL PROCESS *RPHRLS*
  2914. TITLE READ SKIP PROCESSOR.
  2915. RSK SPACE 4,15
  2916. ** RSK - READ SKIP (*READSKP*) PROCESSOR (FUNCTION 020).
  2917. *
  2918. * ENTRY (BS - BS+4) = (FET+0).
  2919. * (FS - FS+4) = FST ENTRY.
  2920. * (FT - FT+1) = *FIRST* POINTER.
  2921. * (OP - OP+1) = *OUT* POINTER.
  2922. *
  2923. * EXIT (PC) = COUNT OF PRUS TRANSFERRED.
  2924. * (FS - FS+4) = ADVANCED FST ENTRY.
  2925. * TO */RMS/CPR*.
  2926. * TO *SMRX* AFTER PRESET FOR REENTRY.
  2927. * TO *CDA*, IF MASS STORAGE ERROR.
  2928. *
  2929. * CALLS /RMS/BRD, CRT, RNS, /RMS/SBA.
  2930. *
  2931. * USES T1, T3.
  2932.  
  2933.  
  2934. RSK BSS 0 ENTRY
  2935. LDM RCRF CHECK FOR SKIP PROCESSING
  2936. SHN 21-10
  2937. PJN RSK1 IF NOT SKIP PROCESSING
  2938. LDC RSK9 SET TO CONTINUE SKIP PROCESSING
  2939. STM /RMS/RMSA
  2940. RSK1 LDC RSK2 SET LOAD BUFFER EXIT
  2941. STM /RMS/BRDE
  2942. LDD HN PRESET FULL SECTOR FOR *READSKP*
  2943. STM BFMS+1
  2944. UJN SMRX RETURN
  2945.  
  2946. * REENTRY AFTER TRACK COUNT EXHAUSTED OR WHEN USER
  2947. * BUFFER FULL (LESS THAN ONE PRU OF SPACE REMAINS)
  2948. * OR EOR/EOF/EOI ENCOUNTERED.
  2949.  
  2950. RSK2 LDM COCA
  2951. NJN RSK3 IF TO ENTER RECALL STACK
  2952. LDC SHNI+77-2 FORCE SETTING OF FET TERMINATION STATUS
  2953. STM UFSA
  2954. LDD FS+4 CHECK FET STATUS
  2955. LPN 14
  2956. ZJN RSK4 IF NOT EOR/EOF/EOI
  2957. LPN 10
  2958. NJN RSK3 IF EOF OR EOI ENCOUNTERED
  2959. LDC 400 SET SKIP FLAG
  2960. RAM RCRF
  2961. LJM RSK11 CHECK FOR SKIP TO EOF
  2962.  
  2963. RSK3 LJM /RMS/CPR EXIT TO COMPLETE READ
  2964.  
  2965. * PROCESS PARTIAL SECTOR TRANSFER TO USER BUFFER.
  2966.  
  2967. RSK4 AOD PC INCREMENT PRU COUNT
  2968. LDC RSK7 SET STOP ON PRU
  2969. STM /RMS/BRDU
  2970. STM /RMS/BRDV
  2971. LDC 400 SET SKIP FLAG
  2972. RAM RCRF
  2973. LDC BFMS READ NEXT SECTOR
  2974. RJM RNS
  2975. ZJN RSK7.2 IF EMPTY SECTOR
  2976. STM RSKA
  2977. LDD OP CHECK BUFFER SPACE
  2978. SBD DP+3 LENGTH = OUT - IN - 1
  2979. SHN 14
  2980. ADD OP+1
  2981. SBD DP+4
  2982. SBN 1
  2983. PJN RSK5 IF NO WRAP AROUND
  2984. SHN 6 LENGTH = LIMIT - IN - 1 + OUT - FIRST
  2985. ADD LM
  2986. SBD FT
  2987. SHN 14
  2988. ADD LM+1
  2989. SBD FT+1
  2990. RSK5 STD T3 SET BUFFER LENGTH
  2991. SBD T1
  2992. PJN RSK6 IF ROOM FOR SECTOR
  2993. LDD T3 SET BUFFER WORD COUNT
  2994. STD T1
  2995. ZJN RSK7 IF FULL BUFFER
  2996. RSK6 RJM /RMS/SBA RESET BUFFER ADDRESSES
  2997. LDD T1
  2998. LJM /RMS/BRD11 WRITE DATA TO BUFFER
  2999.  
  3000. * PROCESS SKIP TO EOR/EOF/EOI.
  3001.  
  3002. RSK7 LDC ** CHECK SECTOR WORD COUNT
  3003. RSKA EQU *-1
  3004. RSK7.1 SHN -6
  3005. RSK7.2 ZJN RSK11 IF SHORT SECTOR
  3006. RSK8 LDD T7 CHECK FOR NEW TRACK
  3007. * LDN 0 (MASS STORAGE ERROR)
  3008. RSKB EQU *-1
  3009. RSKC NJN RSK9 IF NOT NEW TRACK
  3010. * LJM RSK13 (MASS STORAGE ERROR)
  3011. RJM CRT CHECK RECALL TIME
  3012. MJN RSK10 IF PROCESSING TIME EXCEEDED
  3013. LDD PC
  3014. ADM SLM
  3015. SHN -14
  3016. NJN RSK10 IF PRU COUNT WILL EXCEED 12 BITS
  3017. RSK9 AOD PC
  3018. LDC BFMS+DTSF READ NEXT SECTOR HEADER WORDS
  3019. RJM RNS
  3020. UJN RSK7.1 CONTINUE SKIP TO SHORT SECTOR
  3021.  
  3022. RSK10 AOM COCA SET RECALL STACK FLAG
  3023. UJN RSK14 COMPLETE READ PROCESSING
  3024.  
  3025. RSK11 LDM BFMS CHECK TERMINATION
  3026. ZJN RSK12 IF EOF/EOI
  3027. LDD BS+3 CHECK SKIP TO EOF
  3028. LPN 74
  3029. LMN 74
  3030. ZJN RSK8 IF SKIP TO EOF
  3031. LDN /CIO/EOR
  3032. UJN RSK13 SET EOR READ STATUS
  3033.  
  3034. RSK12 LDN /CIO/EOF SET EOF
  3035. STD FS+4
  3036. LDM BFMS+1
  3037. NJN RSK14 IF NOT EOI
  3038. SOD PC
  3039. LDN /CIO/EOI
  3040. RSK13 STD FS+4
  3041. RSK14 LJM /RMS/CPR EXIT TO COMPLETE READ
  3042. CRT SPACE 4,10
  3043. ** CRT - CHECK RECALL TIME.
  3044. *
  3045. * ENTRY FIRST CALL STARTS TIMING. ELAPSED TIME OF EACH
  3046. * INTERVAL IS KEPT TO MINIMIZE CLOCK OVERFLOW.
  3047. *
  3048. * EXIT (A) .LT. 0 IF PROCESSING TIME EXCEEDED.
  3049. *
  3050. * USES CM - CM+4.
  3051.  
  3052.  
  3053. CRT2 AOM CRTA INDICATE TIME ACCUMULATION STARTED
  3054. CRT3 LDD CM+4 SAVE CURRENT CLOCK VALUE
  3055. STM CRTB
  3056.  
  3057. CRT SUBR ENTRY/EXIT
  3058. LDC RTCL READ REAL TIME CLOCK
  3059. CRD CM
  3060. LDC 0 ELAPSED TIME
  3061. CRTA EQU *-1
  3062. ZJN CRT2 IF FIRST CALL
  3063. LDD CM+4 CALCULATE TIME SINCE LAST CALL
  3064. SBM CRTB
  3065. PJN CRT1 IF NO OVERFLOW
  3066. ADC 10000
  3067. CRT1 RAM CRTA ACCUMULATED PROCESSING TIME
  3068. ADC -RSPT
  3069. MJN CRT3 IF TIME NOT EXCEEDED
  3070. LCN 0 SET TIME EXCEEDED
  3071. UJN CRTX RETURN
  3072.  
  3073.  
  3074. CRTB CON 0 PREVIOUS CLOCK VALUE
  3075. TITLE READ LIST PROCESSOR.
  3076. RPL SPACE 4,10
  3077. ** RPL - READ PRUS WITH LIST (*RPHRLS*) (FUNCTION 230).
  3078. *
  3079. * EXIT TO *RLS*.
  3080.  
  3081.  
  3082. RPL BSS 0 ENTRY
  3083. LDC ALS SET LIST ADVANCE AT EACH PRU
  3084. STM /RMS/BRDU
  3085. * LJM RLS PROCESS LIKE *READNS*
  3086. RLS SPACE 4,20
  3087. ** RLS - READ RECORDS WITH LIST (*READLS*) (FUNCTION 210).
  3088. *
  3089. * ENTRY (FO) = FET OPTIONS.
  3090. * (FS - FS+4) = FST ENTRY.
  3091. *
  3092. * EXIT (LI) = LIST INDEX (IN *TLSA* TRACK/SECTOR TABLE).
  3093. * (FS - FS+4) = ADVANCED FST AENTRY.
  3094. * (LS - LS+1) = LIST ADDRESS.
  3095. * TO *SLS* IF EMPTY LIST.
  3096. * TO *SMRX* AFTER PRESET FOR REENTRY.
  3097. *
  3098. * USES T5, CM - CM+4, LP - LP+1.
  3099. *
  3100. * CALLS CLI.
  3101. *
  3102. * MACROS CFET, ERROR, SETMS.
  3103.  
  3104. RLS BSS 0 ENTRY
  3105. LDM FETL CHECK FET LENGTH
  3106. NJN RLS1 IF FET CONTAINS THE LIST ADDRESS WORD
  3107. ERROR FPE *FET PARAMETER ERROR*
  3108.  
  3109. RLS1 LDC ALS SET LIST ADVANCE ON EOR
  3110. STM /RMS/BRDV
  3111. STM /RMS/BRDF
  3112. STM /RMS/EOFA
  3113. LDC SLS SET LIST COMPLETION
  3114. STM /RMS/CPRB
  3115. STM CDAB
  3116. LDC TLSA SET LIST INDEX
  3117. STD LI
  3118. CFET 5 READ LIST POINTER
  3119. CRD CM
  3120. LDD CM+3 SET LIST POINTER
  3121. LPC 4037
  3122. STD LS
  3123. STM SLSC
  3124. LPN 37
  3125. STD LP
  3126. LDD CM+4
  3127. STD LS+1
  3128. STD LP+1
  3129. LDD FS SET EST ORDINAL
  3130. STD T5
  3131. SETMS STATUS
  3132. LDD CM+4 READ TRT POINTER
  3133. SHN 3
  3134. ADN TRLL
  3135. CRD CM
  3136. LDD CM+3 EXTRACT TRT ADDRESS
  3137. LPN 77
  3138. SHN 14
  3139. LMD CM+4
  3140. ADC -4000/4
  3141. STM CLIA+1
  3142. STM CLIB+1
  3143. STM CLIC+1
  3144. SHN -14
  3145. RAM CLIA
  3146. STM CLIB
  3147. STM CLIC
  3148. RJM CLI CONVERT LIST INDICES
  3149. LDN 0 TERMINATE LIST
  3150. STI LI
  3151. LDC TLSA RESET LIST INDEX
  3152. STD LI
  3153. LDI LI SET TRACK
  3154. ZJN RLS3 IF EMPTY LIST
  3155. LDD LS
  3156. SHN 21-13
  3157. MJN RLS2 IF CONTINUATION OF PREVIOUS OPERATION
  3158. LDC 4000 SET CONTINUATION FLAG
  3159. RAD LS
  3160. LDI LI
  3161. STD FS+2
  3162. LDM 1,LI SET SECTOR
  3163. STD FS+3
  3164. RLS2 LJM SMRX RETURN
  3165.  
  3166. RLS3 LDD FO CLEAR RANDOM FILE FLAG
  3167. LPC 3777
  3168. STD FO
  3169. LDN /CIO/EOF SET EOF STATUS
  3170. RAM SLSA
  3171. * LJM SLS SET LIST STATUS
  3172. SLS SPACE 4,15
  3173. ** SLS - SET LIST STATUS.
  3174. *
  3175. * ENTRY (FO) = FET OPTIONS.
  3176. * (PC) = ACCUMULATED PRU COUNT.
  3177. * (LS - LS+1) = LIST ADDRESS AND CONTINUATION FLAG.
  3178. *
  3179. * EXIT (FS+4) = LIST STATUS.
  3180. * TO *MSP* IF NOT RANDOM FILE OR IF ALL PROCESSING
  3181. * DONE FOR SAME CONTINUATION LIST ENTRY.
  3182. * TO *COC* IF NEW LIST ENTRY PROCESSED.
  3183. *
  3184. * USES CM - CM+4.
  3185. *
  3186. * MACROS CFET.
  3187.  
  3188.  
  3189. SLS BSS 0 ENTRY
  3190. CFET 5 UPDATE LIST POINTER
  3191. CRD CM
  3192. LDD LI UPDATE LIST ADDRESS
  3193. ADC -TLSA
  3194. SHN -1
  3195. RAD LS+1
  3196. STD CM+4
  3197. SHN -14
  3198. RAD LS
  3199. STD CM+3
  3200. SHN -13 COMPLEMENT CONTINUATION FLAG
  3201.  
  3202. * IF CONTINUATION, CRI UPDATE IS BASED ON ENTRY POINTED TO.
  3203. * OTHERWISE *CRI* IS SET BASED ON PREVIOUS ENTRY.
  3204.  
  3205. LMN 1
  3206. STD T2
  3207. CFET 5
  3208. CWD CM
  3209. SLSA LDN 0 SET FST STATUS
  3210. * LDN /CIO/EOF (END OF LIST - SET EOF STATUS)
  3211. STD FS+4
  3212. LDC 0 CALCULATE PRUS TRANSFERRED FOR LIST ENTRY
  3213. SLSB EQU *-1
  3214. NJN SLS2 IF LIST HAS BEEN ADVANCED
  3215. LDC 0 (ORIGINAL LIST POINTER CONTINUATION FLAG)
  3216. SLSC EQU *-1
  3217. SHN 21-13
  3218. PJN SLS3 IF NOT CONTINUATION OPERATION INITIALLY
  3219. SLS1 LJM MSP COMPLETE MASS STORAGE PROCESSING
  3220.  
  3221. * CALCULATE I/O PENALTY.
  3222.  
  3223. SLS2 LDD LI
  3224. ADC -TLSA
  3225. SHN -1
  3226. STD T1
  3227. LDM TLAA,T1 ADD I/O PENALTY
  3228. RAM CFNH+1
  3229. SHN -14
  3230. RAM CFNH
  3231. LCN 2
  3232. RAD LI
  3233. LMC TLSA
  3234. NJN SLS2 IF NOT AT BEGINNING OF LIST
  3235.  
  3236. * RETURN RANDOM ADDRESS TO FET.
  3237.  
  3238. SLS3 LDD FO
  3239. SHN 21-13
  3240. PJN SLS1 IF NOT RANDOM FET
  3241. CFET 6
  3242. CRD CM
  3243.  
  3244. * USE PREVIOUS ENTRY UNLESS CONTINUATION, THEN USE CURRENT
  3245. * ENTRY.
  3246.  
  3247. LDD LS
  3248. LPN 37
  3249. SHN 6
  3250. ADD RA
  3251. SHN 6
  3252. ADD LS+1
  3253. SBD T2
  3254. CRD DP
  3255. LDD CM+2
  3256. LPN 77
  3257. STD CM+2
  3258. LDD PC ADVANCE RANDOM ADDRESS
  3259. SBM SLSB
  3260. RAD DP+4
  3261. SHN -14
  3262. RAD DP+3
  3263. LDD DP+4
  3264. SHN 6
  3265. RAD CM+2
  3266. LMD CM+2
  3267. ADD DP+3
  3268. SHN 6
  3269. STD CM+1
  3270. SHN -14
  3271. STD CM
  3272. CFET 6
  3273. CWD CM
  3274. LJM COC COMPLETE MASS STORAGE PROCESSING
  3275. ALS SPACE 4,20
  3276. ** ALS - ADVANCE LIST.
  3277. *
  3278. * ENTRY (LI) = LIST INDEX.
  3279. * (PC) = ACCUMULATED PRU COUNT.
  3280. * (LS - LS+1) = LIST ADDRESS AND CONTINUATION FLAG.
  3281. * (TC) = TRACKS TO PROCESS COUNT.
  3282. *
  3283. * EXIT (LI) = ADVANCED LIST INDEX.
  3284. * (T6) = NEW LIST ENTRY CURRENT TRACK.
  3285. * (T7) = NEW LIST ENTRY CURRENT SECTOR.
  3286. * (LS) = CONTINUATION CLEARED IF RECALL OR END OF LIST.
  3287. * (TC) = DECREMENTED IF TRACK SWITCH.
  3288. * (SLSC) = (PC) IF NORMAL EXIT.
  3289. * TO */RMS/BRD* TO PROCESS READ FOR NEXT LIST ENTRY.
  3290. * TO */RMS/CPR* TO COMPLETE READ PROCESSING.
  3291. * TO *CDA*, IF MASS STORAGE ERROR.
  3292. *
  3293. * USES CM - CM+4.
  3294. *
  3295. * CALLS RNS.
  3296. *
  3297. * MACROS SETMS.
  3298.  
  3299.  
  3300. ALS BSS 0 ENTRY
  3301. LDN 2 ADVANCE LIST INDEX
  3302. RAD LI
  3303. LDI LI CHECK TRACK
  3304. NJN ALS4 IF NOT END OF TABLE
  3305. LDD LI CHECK LIST INDEX
  3306. ADC -TLSAE
  3307. MJN ALS2 IF END OF REQUEST LIST ENCOUNTERED
  3308. ALS1 AOM COCA SET RECALL STACK FLAG
  3309. UJN ALS3 COMPLETE READ PROCESSING
  3310.  
  3311. ALS2 LDN /CIO/EOF SET EOF STATUS
  3312. RAM SLSA
  3313. ALS3 LDC -4000 CLEAR CONTINUATION FLAG
  3314. RAD LS
  3315. LJM /RMS/CPR COMPLETE READ PROCESSING
  3316.  
  3317. ALS4 LMD T6
  3318. ZJN ALS6 IF SAME TRACK
  3319. SOD TC DECREMENT TRACK COUNT
  3320. NJN ALS5 IF NOT TIME TO RECALL
  3321. LDD PC
  3322. SBD HN
  3323. PJN ALS1 IF 100 OR MORE SECTORS READ
  3324. LDN 2 RESET TRACK COUNT
  3325. STD TC
  3326. ALS5 LDI LI SET NEW TRACK
  3327. STD T6
  3328. SETMS POSITION
  3329. UJN ALS7 EXIT
  3330.  
  3331. ALS6 LDM 1,LI
  3332. SBD T7
  3333.  
  3334. * TIMING OF THIS ROUTINE WHEN PROCESSING CONSECUTIVE SECTORS IS
  3335. * CRITICAL. ADDITIONAL CODE MAY CAUSE LOST REVOLUTIONS.
  3336.  
  3337. ZJN ALS8 IF NEXT SECTOR IS DESIRED ONE
  3338. MJN ALS7 IF ADDRESSES NOT ASCENDING
  3339. SBN 5
  3340. PJN ALS7 IF ENOUGH TIME TO RESEEK
  3341.  
  3342. * READING OF UP TO 5 SECTORS IS DONE INSTEAD OF ISSUING A SEEK
  3343. * AS MOST CONTROLLERS ARE NOT FAST ENOUGH TO PROCESS THE SEEK
  3344. * AND BE ABLE TO ACCESS THE NEXT SECTOR OR THE ONE FOLLOWING.
  3345.  
  3346. LDC BFMS+DTSF READ HEADER WORDS ONLY OPTION
  3347. RJM RNS READ NEXT SECTOR
  3348. UJN ALS6 LOOP TO DESIRED SECTOR
  3349.  
  3350. ALS7 LDM 1,LI SET SECTOR
  3351. STD T7
  3352. ALS8 LDD PC SAVE SECTORS READ SO FAR
  3353. STM SLSB
  3354. LJM /RMS/BRD PROCESS NEXT READ
  3355. CLI SPACE 4,10
  3356. ** CLI - CONVERT LIST INDICES.
  3357. *
  3358. * ENTRY (LI) = INITIAL LIST INDEX.
  3359. * (LP - LP+1) = LIST ADDRESS.
  3360. *
  3361. * EXIT TRACK/SECTOR/PENALTY TABLES BUILT FOR LIST ENTRIES.
  3362. *
  3363. * USES CM - CM+4, LE - LE+1, RI - RI+1, T1 - T3, T6 - T7.
  3364. *
  3365. * MACROS ERROR.
  3366.  
  3367.  
  3368. CLI SUBR ENTRY/EXIT
  3369. CLI1 LDN 1 SET RANDOM INDEX
  3370. STD RI+1
  3371. SHN -14
  3372. STD RI
  3373. LDN FSMS SET FIRST SECTOR
  3374. STD T7
  3375. LDD FS+1 SET FIRST TRACK
  3376. STD T6
  3377. SHN -2 CHECK FIRST TRACK CONTAINS EOI
  3378. CLIA ADC TRTS
  3379. CRD CM
  3380. LDD T6
  3381. LPN 3
  3382. STD T1
  3383. LDM CM,T1
  3384. STD T3
  3385. SHN 6
  3386. PJN CLI2 IF FIRST TRACK CONTAINS EOI
  3387. LDM SLM
  3388. STD T3
  3389. CLI2 LDD LI CHECK LIST INDEX
  3390. ADC -TLSAE
  3391. CLI3 PJN CLIX IF LIST FULL
  3392. LDD LP CHECK POINTER ADDRESS
  3393. SHN 14
  3394. LMD LP+1
  3395. SBN 2
  3396. MJN CLI4 IF LIST ADDRESS .LT. 2
  3397. ADN 2
  3398. SHN -6
  3399. SBD FL
  3400. MJN CLI5 IF ADDRESS WITHIN FL
  3401. CLI4 ERROR FPE *FET PARAMETER ERROR*
  3402.  
  3403. CLI5 LDD LP READ LIST ENTRY
  3404. SHN 6
  3405. ADD RA
  3406. SHN 6
  3407. ADD LP+1
  3408. CRD CM
  3409. LDD LI COMPUTE INDEX INTO PENALTY TABLE
  3410. ADC -TLSA
  3411. SHN -1
  3412. STD T2
  3413. LDC 0 (PREVIOUS POSITION)
  3414. CLID EQU *-1
  3415. SBD CM+3
  3416. ZJN CLI5.1 IF THE SAME
  3417. PJN CLI5.2 IF PENALTY CHARGE
  3418. ADN 1
  3419. NJN CLI5.2 IF PENALTY CHARGE
  3420. SBN 1
  3421. SHN 14
  3422. CLI5.1 ADC 0 (PREVIOUS POSITION)
  3423. CLIE EQU *-1
  3424. SBD CM+4
  3425. PJN CLI5.2 IF PENALTY CHARGE
  3426. ADC IMPL
  3427. MJN CLI5.2 IF PENALTY CHARGE
  3428. LDN 0
  3429. UJN CLI5.3 NO CHARGE
  3430.  
  3431. CLI5.2 LDN IMRL SET PENALTY
  3432. CLI5.3 STM TLAA,T2
  3433. LDD CM+4 SET LIST INDEX
  3434. STD LE+1
  3435. ADD CM+3
  3436. NJN CLI5.4 IF NOT END OF LIST
  3437. LJM CLIX RETURN
  3438.  
  3439. CLI5.4 LDD CM+3
  3440. STD LE
  3441.  
  3442. * SET SECTOR ADVANCE
  3443.  
  3444. CLI6 LDD LE+1 SUBTRACT BOTTOM 12 BITS
  3445. SBD RI+1
  3446. STD T2
  3447. PJN CLI7 IF NO BORROW
  3448. AOD T2 END AROUND CARRY
  3449. LCN 1
  3450. UJN CLI8 BORROW FROM UPPER
  3451.  
  3452. CLI7 LDN 0
  3453. CLI8 ADD LE SUBTRACT TOP 12 BITS
  3454. SBD RI
  3455. STD T1
  3456. PJN CLI9 IF FORWARD
  3457. LJM CLI1 RESTART
  3458.  
  3459. CLI9 LDD T7 CHECK FOR SECTOR LIMIT
  3460. RAD T2
  3461. SHN -14
  3462. ADD T1
  3463. NJN CLI10 IF SECTOR LIMIT PASSED
  3464. LDD T2
  3465. STM 1,LI
  3466. SBD T3
  3467. PJN CLI10 IF SECTOR LIMIT PASSED
  3468. LDD T6 SET TRACK
  3469. STI LI
  3470. LDD LE UPDATE RANDOM INDEX
  3471. STD RI
  3472. STM CLID SAVE POSITION
  3473. LDD LE+1
  3474. STD RI+1
  3475. STM CLIE SAVE POSITION
  3476. LDM 1,LI UPDATE SECTOR NUMBER
  3477. STD T7
  3478. AOD LP+1 ADVANCE LIST POINTER
  3479. SHN -14
  3480. RAD LP
  3481. LDN 2 ADVANCE LIST INDEX
  3482. RAD LI
  3483. LJM CLI2 LOOP
  3484.  
  3485. * ADVANCE TRACK.
  3486.  
  3487. CLI10 LDD T3 ADVANCE RANDOM INDEX
  3488. SBD T7
  3489. RAD RI+1
  3490. SHN -14
  3491. RAD RI
  3492. LDN 0 SECTOR = 0
  3493. STD T7
  3494. LDD T6 CHECK NEXT TRACK
  3495. SHN -2
  3496. CLIB ADC TRTS
  3497. CRD CM
  3498. LDD T6 SET BYTE INDEX
  3499. LPN 3
  3500. STD T1
  3501. LDM CM,T1 SET NEXT TRACK
  3502. STD T6
  3503. SHN 6
  3504. MJN CLI11 IF NEXT TRACK FOUND
  3505. ERROR RAD *RANDOM ADDRESS NOT ON FILE*
  3506.  
  3507. CLI11 SHN -10
  3508. CLIC ADC TRTS
  3509. CRD CM
  3510. LDD T6
  3511. LPN 3
  3512. STD T1
  3513. LDM CM,T1
  3514. STD T3 SET SECTOR LIMIT
  3515. SHN 6
  3516. PJN CLI12 IF END OF CHAIN
  3517. LDM SLM
  3518. STD T3
  3519. CLI12 LJM CLI6 LOOP
  3520. SPACE 4,10
  3521. ** COMMON DECKS.
  3522.  
  3523.  
  3524. MSR$ EQU 1 DEFINE ERROR PROCESSING
  3525. MSR EQU CDA ERROR PROCESSOR FOR *COMPRNS*
  3526. *CALL COMPRNS
  3527. SPACE 4,10
  3528. ** READ LIST BUFFERS.
  3529.  
  3530.  
  3531. USE BUFFER
  3532. TLAA EQU * ACCOUNTING PENALTY INCREMENT BUFFER
  3533. TLSA EQU TLAA+MRAL+1
  3534. TLSAE EQU TLSA+MRAL*2
  3535. ERRPL TLSAE+1-BFMS OVERFLOW INTO MASS STORAGE BUFFER
  3536. SPACE 4,10
  3537. QUAL
  3538. ERDO EQU *+5 END OF READ OVERLAYS
  3539. SPACE 4,10
  3540. OVERFLOW ERMS
  3541. WMS OVERLAY (WRITE MASS STORAGE.),MSDO
  3542. WMS SPACE 4,10
  3543. ** DIRECT LOCATION ASSIGNMENTS.
  3544.  
  3545.  
  3546. IP EQU 16 - 17 *IN* POINTER FOR RECALL CALCULATION
  3547. WC EQU 35 SECTOR WORD COUNT
  3548. NT EQU 36 NEXT TRACK TABLE ADDRESS
  3549. BD EQU 37 WORDS OF DATA IN BUFFER
  3550. SC EQU 46 SECTOR COUNT
  3551. SL EQU 47 NEXT SECTOR/TRACK LINK FLAG
  3552. WMS SPACE 4,10
  3553. ORG *+2
  3554. LJM PRS PRESET FOR WRITE
  3555. WSY SPACE 4,10
  3556. ** WSY - WRITE SYSTEM SECTOR.
  3557. *
  3558. * EXIT TO *WMS*.
  3559. * TO *CDA*, IF ERROR WRITING SYSTEM SECTOR.
  3560. *
  3561. * CALLS SBA, WSS.
  3562.  
  3563.  
  3564. WSY BSS 0 ENTRY
  3565. RJM WSS WRITE SYSTEM SECTOR
  3566. PJN WSY1 IF NO ERROR
  3567. RJM CDA CHECK DEVICE
  3568.  
  3569. WSY1 CFET 3 UPDATE OUT POINTER
  3570. CWD DP
  3571. LDM CFNB CLEAR SYSTEM SECTOR OPERATION FLAG
  3572. LPN 37
  3573. STM CFNB
  3574. LDM WTBP
  3575. LMD RA
  3576. ZJN WMS IF NO MOVE
  3577. RJM SBA SET BUFFER ADDRESSES
  3578. * UJN WMS PROCESS WRITE
  3579. WMS SPACE 4,10
  3580. ** WMS - WRITE MASS STORAGE MAIN ROUTINE.
  3581. *
  3582. * EXIT TO *CDA*, IF MASS STORAGE ERROR.
  3583. * TO *MSP*.
  3584. *
  3585. * USES WC.
  3586. *
  3587. * CALLS WEI, WTB.
  3588.  
  3589.  
  3590. WMS BSS 0 ENTRY
  3591. LDD HN SET FULL SECTOR WORD COUNT
  3592. STD WC
  3593. STM BFMS+1
  3594. LJM WTB3 WRITE DATA
  3595. * LJM WTB (*WRITECW*)
  3596. * LJM WMS1 (*WRITEF*, NO DATA, OPERATION COMPLETE)
  3597. * LJM WMS2 (BUFFERED DEVICE SYSTEM SECTOR WRITE)
  3598. WMSA EQU *-1
  3599.  
  3600. * REENTRY FROM *WTB* FOR EOF WRITE.
  3601. * WRITE EOF SECTOR FOR *WRITEF*/*REWRITEF*.
  3602.  
  3603. WMS1 LDN 0 PREVENT UPDATE OF OUT POINTER
  3604. STM WTBT
  3605. LDC WTB18-WTBN+UJNI
  3606. STM WTBN
  3607. LDC WMS2 SET RETURN ADDRESS FOR *WTB*
  3608. STM WTBU
  3609. LJM WTB11 WRITE EOF SECTOR
  3610.  
  3611. * REENTRY FROM *WTB*.
  3612. * WRITE EOI SECTOR.
  3613.  
  3614. WMS2 RJM WEI WRITE EOI SECTOR
  3615. ZJN WMS3 IF NO ERROR
  3616. RJM CDA CHECK DEVICE
  3617.  
  3618. WMS3 LDM CFNB SET FILE MODIFIED
  3619. LPN 74
  3620. * LPN 76 (REWRITE)
  3621. WMSB EQU *-1
  3622. LMN 3
  3623. * LMN 1 (REWRITE)
  3624. WMSC EQU *-1
  3625. STM CFNB
  3626. LDN 2 SET WRITE MODE
  3627. STD FS+4
  3628. LDM BFMS+2+505+4 WORD COUNT - 500
  3629. ADC -500
  3630. NJN WMS4 IF EOR/EOF ON *WRITECW*
  3631. LDD BS+4 CHECK REQUEST
  3632. SHN 21-4
  3633. PJN WMS5 IF NOT EOR/EOF
  3634. WMS4 LDN 4 SET OPERATION COMPLETE
  3635. RAD FS+4
  3636. WMS5 LJM MSP PROCESS MASS STORAGE EXIT
  3637. WTB SPACE 4,30
  3638. ** WTB - WRITE BUFFER.
  3639. *
  3640. * ENTRY (BD) = WORD COUNT OF DATA IN BUFFER.
  3641. * (FC) = INTERNAL *CIO* FUNCTION.
  3642. * (PC) = 0.
  3643. * (RC) = *DRCM* MONITOR FUNCTION CODE.
  3644. * (T6) = CURRENT TRACK.
  3645. * (T7) = CURRENT SECTOR.
  3646. * (DP - DP+4) = *OUT* POINTER.
  3647. * (IN - IN+1) = (IP - IP+1) = *IN* POINTER.
  3648. * AT *WTB* FOR *WRITECW* OF DATA.
  3649. * AT *WTB3* FOR NON-CONTROL WORD WRITE OF DATA.
  3650. * AT *WTB6* FOR *WRITECW* SYSTEM SECTOR OPERATION.
  3651. * AT *WTB11* TO WRITE EOF SECTOR.
  3652. *
  3653. * EXIT (PC) = COUNT OF PRUS TRANSFERRED.
  3654. * (T6) = ADVANCED CURRENT TRACK.
  3655. * (T7) = ADVANCED CURRENT SECTOR.
  3656. * (DP - DP+4) = ADVANCED *OUT* POINTER.
  3657. * TO *CFN* IF PRESET TRACK ALLOCATION ERROR.
  3658. * TO *CDA*, IF MASS STORAGE ERROR.
  3659. *
  3660. * ERROR TO *ERR* IF CONTROL WORD ERROR.
  3661. *
  3662. * USES IN+1, NT, SL, T1, T2, T3, WC, CM - CM+4, IP-3, IP+1.
  3663. *
  3664. * CALLS CHG, MSR, SBA, WDS, WEI.
  3665. *
  3666. * MACROS ERROR.
  3667.  
  3668.  
  3669. WTB25 UJN WMS2 COMPLETE OPERATION
  3670.  
  3671. WTB26 RJM WEI WRITE EOI
  3672. ZJN WTB27 IF NO ERROR
  3673. RJM CDA CHECK DEVICE
  3674.  
  3675. WTB27 ERROR BLE *BUFFER CONTROL WORD ERROR*
  3676.  
  3677. * *WRITECW* PREPROCESSING FOR DATA BLOCK.
  3678.  
  3679. * ENTRY FOR CONTROL WORD WRITE.
  3680. * LOOP FOR *WRITECW* AFTER SHORT BLOCK PROCESSED.
  3681.  
  3682. WTB BSS 0 ENTRY
  3683. LDD HN SET FULL SECTOR WORD COUNT
  3684. STM BFMS+1
  3685. ADN 2 ALLOW FOR CONTROL WORDS
  3686. STD WC
  3687. LDC WTB1 RESET FULL BLOCK LOOP
  3688. STM WTBU
  3689.  
  3690. * LOOP FOR *WRITECW* AFTER FULL BLOCK PROCESSED.
  3691.  
  3692. WTB1 LDD BD CHECK FOR EMPTY BUFFER
  3693. ZJN WTB25 IF BUFFER EMPTY
  3694. LDM BFMS+2+505+4 PREPROCESS HEADER CONTROL WORD
  3695. ADC -500
  3696. ZJN WTB3 IF FULL BLOCK
  3697. PJN WTB26 IF BLOCK .GT. 500 BYTES
  3698. ADC 500 CALCULATE WORD COUNT
  3699. STD T2 (BYTE COUNT * 103) / 512
  3700. SHN 1
  3701. ADD T2
  3702. STD T1
  3703. SHN 3
  3704. ADD T2
  3705. SHN 2
  3706. ADD T1
  3707. SHN -9D
  3708. STM BFMS+1 SET SECTOR WORD COUNT
  3709. ADN 2
  3710. STD WC SET CONTROL WORD BLOCK WORD COUNT
  3711. SBN 2 SAVE INDEX TO END OF BLOCK
  3712. STD T3
  3713. SHN 2
  3714. RAD T3
  3715. LDC WTB SET TO RESTORE FULL BLOCK WORD COUNT
  3716. STM WTBU
  3717. LDC WTB12+77-WTBN+UJNI
  3718. STM WTBN
  3719.  
  3720. * ENTRY FOR NON-CONTROL WORD WRITE.
  3721. * CHECK AMOUNT OF DATA IN BUFFER.
  3722. * *IN* IS NOT READ UP HERE DUE TO TIMING CONSIDERATIONS.
  3723.  
  3724. WTB3 BSS 0 ENTRY
  3725. LDD IP DATA LENGTH = IN - OUT
  3726. SBD DP+3
  3727. SHN 14
  3728. ADD IP+1
  3729. SBD DP+4
  3730. PJN WTB4 IF NOT WRAP AROUND
  3731. WTBA ADC ** (LIMIT - FIRST)
  3732. WTB4 SBD WC
  3733. PJN WTB5 IF SUFFICIENT DATA IN BUFFER
  3734. LJM WMS2 RETURN
  3735. * LJM WTB21 (PROCESS EOR FOR EOR/EOF WRITE)
  3736. WTBB EQU *-1
  3737.  
  3738. * READ DATA FROM *CIO* BUFFER.
  3739.  
  3740. WTB5 STD BD UPDATE BUFFER DATA WORD COUNT
  3741. SHN -14
  3742. ZJN WTB6 IF .LT. 10000B WORDS OF DATA
  3743. LCN 0 SET 7777B WORDS OF DATA
  3744. STD BD
  3745.  
  3746. * ENTRY FOR *WRITECW* SYSTEM SECTOR OPERATION.
  3747.  
  3748. WTB6 LDD DP+3 CHECK FOR WRAP AROUND SECTOR
  3749. SHN 14
  3750. ADD DP+4
  3751. ADD WC
  3752. WTBC ADC -** (-LIMIT)
  3753. * ADC -** ((-LIMIT)+1) FOR *WRITECW*
  3754. MJN WTB7 IF NOT WRAP AROUND SECTOR
  3755. STD T2 SET SECOND PART WORD COUNT
  3756. NJN WTB9 IF SECOND PART PRESENT
  3757. LDD DP+3
  3758. SHN 14
  3759. ADD DP+4
  3760. WTBD ADC ** (RA)
  3761. * ADC ** (RA+1) FOR *WRITECW*
  3762. CRM BFMS+2,WC
  3763. WTBE LDC ** (FIRST)
  3764. * LDC ** (LIMIT-1) FOR *WRITECW*
  3765. UJN WTB8 UPDATE OUT
  3766.  
  3767. * PROCESS NORMAL SECTOR.
  3768.  
  3769. WTB7 ADC ** (LIMIT+RA)
  3770. WTBF EQU *-2
  3771. SBD WC
  3772. CRM BFMS+2,WC
  3773. WTBG ADC -** (-RA)
  3774. * ADC -** (-RA-1) FOR *WRITECW*
  3775. WTB8 STD DP+4 UPDATE OUT
  3776. SHN -14
  3777. STD DP+3
  3778.  
  3779. * THE FOLLOWING CHECK MINIMIZES OVERHEAD ON TRACK SWITCH
  3780. * AND PREVENTS A *DRCM* BEING ISSUED JUST PRIOR
  3781. * TO THE DRIVER NEEDING TO DO AN *LDAM*.
  3782.  
  3783. LDD T7
  3784. ZJN WTB11 IF TRACK SWITCH
  3785.  
  3786. * THE FOLLOWING LINE OF CODE IS MODIFIED VIA *RJM*.
  3787.  
  3788. LJM WTB11 WRITE SECTOR
  3789. WTBH EQU *-1
  3790. * LJM WTB23 (RECALL CPU AFTER FIRST SECTOR)
  3791. * LJM WTB23+2 (RECALL CPU)
  3792. * LJM WTB24+2 (MONITOR IN POINTER)
  3793. UJN WTB11 WRITE SECTOR
  3794.  
  3795. * PROCESS WRAP-AROUND SECTOR.
  3796.  
  3797. WTB9 LDD WC SET FIRST PART WORD COUNT
  3798. SBD T2
  3799. STD T1
  3800. ZJN WTB10 IF NO FIRST PART
  3801. LDD DP+3 READ FIRST PART
  3802. SHN 14
  3803. ADD DP+4
  3804. WTBI ADC ** (RA)
  3805. * ADC ** (RA+1) FOR *WRITECW*
  3806. CRM BFMS+2,T1
  3807. LDD T1 ADVANCE PP BUFFER ADDRESS
  3808. SHN 2
  3809. ADD T1
  3810. WTB10 ADC BFMS+2
  3811. STM WTBK
  3812. WTBJ LDC ** (FIRST+RA)
  3813. CRM **,T2 READ SECOND PART
  3814. WTBK EQU *-1
  3815. WTBL ADC -** (-RA)
  3816. * ADC -** (-RA-1) FOR *WRITECW*
  3817. STD DP+4 UPDATE OUT
  3818. SHN -14
  3819. STD DP+3
  3820.  
  3821. * ENTRY TO WRITE EOF SECTOR FOR *WRITEF*/*REWRITEF*.
  3822. * ADVANCE CURRENT SECTOR/TRACK.
  3823. * RETURN TO *PRS* FOR *WRITECW* OF SYSTEM SECTOR.
  3824.  
  3825. WTB11 LDD T7 SET NEXT SECTOR POINTER
  3826. * LJM PRS25 (*WRITECW* SYSTEM SECTOR OPERATION)
  3827. WTBM EQU *-1
  3828. ADN 1
  3829. STM BFMS
  3830.  
  3831. * CHECK FOR END OF TRACK (IF UPDATE MODE AND/OR REWRITE, AND
  3832. * IF PROCESSING ORIGINAL EOI TRACK, CHECK FOR ORIGINAL EOI
  3833. * SECTOR). ONCE THE ORIGINAL EOI IS REACHED ON A BUFFERED
  3834. * DEVICE, *SETMS RW* MAY NO LONGER BE USED. WRITING BEYOND
  3835. * THE ORIGINAL EOI IN UPDATE MODE IS AN ERROR.
  3836.  
  3837. LMC ** CHECK FOR END OF TRACK OR ORIGINAL EOI
  3838. * LMC (SLM) (END OF TRACK)
  3839. * LMC (EOI+1) (ORIGINAL EOI SECTOR)
  3840. WTBZ EQU *-1
  3841. STD SL
  3842. NJP WTB13 IF NOT END OF TRACK (IF NOT ORIGINAL EOI)
  3843. WTBAA UJN WTB11.1 SET NEXT TRACK
  3844. * PSN (UPDATE MODE AND/OR REWRITE)
  3845.  
  3846. * CHECK FOR ORIGINAL EOI TRACK.
  3847.  
  3848. LDM 1,NT CHECK NEXT TRACK
  3849. LMC **
  3850. WTBAB EQU *-1 (ORIGINAL EOI TRACK)
  3851. WTBAC NJN WTB11.2 IF NEXT TRACK IS NOT ORIGINAL EOI TRACK
  3852. * NJN WTB11.3 (UPDATE MODE - IF NEXT TRACK IS NOT EOI)
  3853. LDC * SET CHECK FOR ORIGINAL EOI SECTOR
  3854. WTBAD EQU *-1
  3855. STM WTBZ
  3856. WTB11.1 UJN WTB11.3 SET NEXT TRACK
  3857.  
  3858. WTB11.2 LDI NT CHECK CURRENT TRACK
  3859. LMM WTBAB
  3860. NJN WTB11.3 IF CURRENT TRACK NOT ORIGINAL EOI TRACK
  3861. SETMS IO,NF,WDSB CLEAR *RW* (REWRITE) OPTION
  3862. ISTORE WTBAA,(UJN WTB11.1) DISABLE ORIGINAL EOI CHECK
  3863. LDM SLM RESET SECTOR LIMIT CHECK
  3864. STM WTBZ
  3865. LMM BFMS
  3866. STD SL
  3867. NJN WTB13 IF ORIGINAL EOI IS NOT ALSO END OF TRACK
  3868.  
  3869. * SET NEXT TRACK.
  3870.  
  3871. WTB11.3 AOD NT SET NEXT TRACK
  3872. LDI NT CHECK IF NEXT TRACK RESERVED
  3873. STM BFMS
  3874. NJN WTB13 IF NEXT TRACK RESERVED
  3875. LJM WTB19 CHECK TERMINATION CONDITION
  3876. * LJM WTB20.1 (UPDATE MODE - WRITE PAST EOI)
  3877. WTBAE EQU *-1
  3878.  
  3879. * PROCESS *WRITECW* SHORT BLOCK.
  3880.  
  3881. WTB12 LDC AODI+PC RESET FULL BLOCK PROCESSING
  3882. STM WTBN
  3883. LDM BFMS+2+5+4,T3 MOVE NEXT BYTE COUNT
  3884. STM BFMS+2+505+4
  3885. LDD T3 CHECK FOR EOF BLOCK
  3886. NJN WTB13 IF DATA IN BLOCK
  3887. LDM BFMS+2,T3
  3888. LMN 17
  3889. ZJN WTB18 IF EOF
  3890.  
  3891. * TRANSFER SECTOR TO DISK.
  3892.  
  3893. WTB13 AOD PC INCREMENT PRU COUNT
  3894. * UJN WTB12 (PROCESS SHORT BLOCK FOR *WRITECW*)
  3895. * UJN WTB18 (PROCESS EOF SECTOR FOR EOF WRITE)
  3896. WTBN EQU *-1
  3897. ERRPL WTBN-WTB12-40 JUMP OUT OF RANGE
  3898. ERRPL WTB18-WTBN-40 JUMP OUT OF RANGE
  3899.  
  3900. WTB13.1 LDC BFMS+WCSF
  3901. * LDC BFMS+WLSF (*WPHR*)
  3902. WTBO EQU *-2
  3903. RJM WDS WRITE SECTOR
  3904. PJN WTB14 IF NO ERROR
  3905. RJM CDA CHECK DEVICE
  3906.  
  3907. WTB14 LDD RA CHECK RA
  3908. LMC ** (RA)
  3909. WTBP EQU *-1
  3910. ZJN WTB15 IF NO CHANGE
  3911. RJM SBA SET BUFFER ADDRESSES
  3912. WTB15 LDD SL CHECK FOR TRACK CHANGE
  3913. ZJN WTB16 IF NEW TRACK
  3914. AOD T7 INCREMENT SECTOR
  3915.  
  3916. * *IN* IS READ UP HERE SO THAT THE OVERHEAD IS NOT ENCOUNTERED
  3917. * ON LOGICAL TRACK SWITCH.
  3918.  
  3919. WTBQ LDC ** (IN + RA)
  3920. WTBR PSN (NON-BUFFERED OR UPDATE MODE FILE)
  3921. * CRD IP-3 (BUFFERED)
  3922. UJN WTB17 STORE OUT
  3923.  
  3924. WTB16 STD T7 RESET SECTOR
  3925. LDI NT SET NEXT TRACK
  3926. STD T6
  3927.  
  3928. * STORE OUT POINTER. THE OUT POINTER IS NOT UPDATED BEFORE THE
  3929. * WRITE SO RECOVERABLE ERRORS CAN BE RETRIED WHEN THE DEVICE
  3930. * BECOMES ACCESSIBLE.
  3931.  
  3932. WTB17 LDC ** (OUT + RA)
  3933. WTBS EQU *-2
  3934. WTBT CWD DP STORE OUT
  3935. * PSN (*CLOSE*)
  3936. * PSN (*WRITEF*/*REWRITEF* WRITE EOF SECTOR)
  3937. LJM WTB3 TRANSFER NEXT BLOCK
  3938. * LJM WTB (*WRITECW* AFTER SHORT BLOCK)
  3939. * LJM WTB1 (*WRITECW* AFTER FULL BLOCK)
  3940. * LJM WMS1 (EOR BLOCK WRITTEN FOR EOF WRITE)
  3941. * LJM WMS2 (EOR BLOCK WRITTEN FOR EOR WRITE)
  3942. * LJM WMS2 (EOF BLOCK WRITTEN FOR EOF WRITE)
  3943. * LJM WMS2 (*WPHR*)
  3944. WTBU EQU *-1
  3945.  
  3946. * PROCESS EOF WRITE FOR *WRITECW* AND *WRITEF*/*REWRITEF*.
  3947.  
  3948. WTB18 LDM BFMS SET EOF HEADER BYTES
  3949. STM BFMS+1
  3950. LDN 0
  3951. STM BFMS
  3952. AOD PC INCREMENT PRU COUNT
  3953. UJP WTB13.1 WRITE SECTOR
  3954.  
  3955. * PROCESS END OF TRACK TABLE.
  3956.  
  3957. WTB19 LDD FC CHECK TERMINATION CONDITION
  3958. LPN 14
  3959. LMN /CIO/EOI
  3960. ZJN WTB20 IF *WRITE*/*REWRITE*/*WRITECW*
  3961.  
  3962. * WRITE FUNCTIONS (AND *CLOSE*) OTHER THAN *WRITE*, *REWRITE*,
  3963. * OR *WRITECW* SHOULD NOT REQUIRE MORE TRACKS THAN THOSE
  3964. * ALLOCATED BY *RMS* IN PRESET PROCESSING.
  3965.  
  3966. RJM WEI WRITE EOI SECTOR
  3967. LDK SWET SET SYSTEM ERROR FLAG
  3968. RJM CHG CONDITIONALLY HANG PP
  3969. LJM CFN COMPLETE FUNCTION
  3970.  
  3971. WTB20 AOM COCA SET TO ENTER RECALL STACK
  3972. LJM WMS2 RETURN
  3973.  
  3974. WTB20.1 ENDMS RELEASE CHANNEL
  3975. ERROR IFM *INCORRECT MODIFICATION*
  3976.  
  3977. * PROCESS EOR SECTOR FOR EOR/EOF WRITE.
  3978.  
  3979. WTB21 RAD WC
  3980. LDC WMS2 SET RETURN FOR EOR WRITE
  3981. * LDC WMS1 (SET RETURN FOR EOF WRITE)
  3982. WTBV EQU *-1
  3983. STM WTBU
  3984. LDD WC GET EOR BLOCK LENGTH
  3985. STM BFMS+1
  3986. ZJN WTB22 IF ZERO LENGTH BLOCK
  3987. LJM WTB6 READ CENTRAL BUFFER
  3988.  
  3989. WTB22 LJM WTB11 WRITE EOR SECTOR
  3990.  
  3991. * PROCESS CPU RECALL.
  3992.  
  3993. WTB23 RJM WTBH MODIFY INSTRUCTION
  3994. LDC **+CWQW CHECK RECALL REQUIRED
  3995. WTBW EQU *-1
  3996. CRD CM
  3997. LDD CM+1
  3998. SHN 21-12
  3999. MJN WTB24 IF RECALL NOT REQUIRED
  4000. LDD OA
  4001. CWD RC
  4002.  
  4003. * CALCULATE DATA IN THE BUFFER.
  4004.  
  4005. WTB24 RJM WTBH MODIFY INSTRUCTION
  4006. LDD BD
  4007. SHN -11
  4008. NJN WTB24 IF .GE. 8 SECTORS OF DATA IN THE BUFFER
  4009. LDD IP+1
  4010. SBD IN+1
  4011. ZJN WTB24 IF *IN* NOT CHANGED
  4012. RAD IN+1
  4013. UJN WTB23 RECALL CPU
  4014. SBA SPACE 4,10
  4015. ** SBA - SET BUFFER ADDRESSES.
  4016. * PRESETS CM ADDRESSES IN *WTB*.
  4017. * ENTER IF (RA) CHANGES.
  4018. *
  4019. * ENTRY (FT - FT+1) = *FIRST* POINTER.
  4020. * (LM - LM+1) = *LIMIT* POINTER.
  4021. *
  4022. * MACROS CFET.
  4023.  
  4024.  
  4025. SBA SUBR ENTRY/EXIT
  4026. LDD RA RA
  4027. STM WTBP
  4028. SHN 6
  4029. SBAA ADN 0
  4030. * ADN 1 (*WRITECW*)
  4031. STM WTBI+1
  4032. STM WTBD+1
  4033. LMC 7777 -RA
  4034. STM WTBG+1
  4035. STM WTBL+1
  4036. SHN -14
  4037. LMC ADCI
  4038. STM WTBI
  4039. STM WTBD
  4040. LMN 77
  4041. STM WTBG
  4042. STM WTBL
  4043.  
  4044. LDD FT FIRST + RA
  4045. SHN 6
  4046. ADD RA
  4047. SHN 6
  4048. ADD FT+1
  4049. STM WTBJ+1
  4050. SHN -14
  4051. LMC LDCI
  4052. STM WTBJ
  4053.  
  4054. CFET 2 IN + RA
  4055. STM WTBS+1
  4056. STM WTBQ+1
  4057. SHN -14
  4058. LMC LDCI
  4059. STM WTBS
  4060. STM WTBQ
  4061. AOM WTBS+1 OUT + RA
  4062. SHN -14
  4063. RAM WTBS
  4064.  
  4065. LDD LM LIMIT + RA
  4066. SHN 6
  4067. ADD RA
  4068. SHN 6
  4069. ADD LM+1
  4070. STM WTBF+1
  4071. SHN -14
  4072. LMC ADCI
  4073. STM WTBF
  4074. LJM SBAX RETURN
  4075. SRW SPACE 4,15
  4076. ** SRW - STATUS LAST SECTOR REWRITE.
  4077. *
  4078. * ENTRY (MSD) = DRIVER IDENTIFIER.
  4079. * (PC) = PRU COUNT WRITTEN.
  4080. * (T4) = CHANNEL.
  4081. * (T5) = EQUIPMENT.
  4082. * (T6) = CURRENT TRACK.
  4083. * (T7) = CURRENT SECTOR.
  4084. *
  4085. * EXIT (T7) = CURRENT SECTOR.
  4086. * TO *CDA*, IF MASS STORAGE ERROR.
  4087. *
  4088. * USES T1, T2, T7.
  4089. *
  4090. * CALLS MSR, WDS.
  4091.  
  4092.  
  4093. SRW SUBR ENTRY/EXIT
  4094. LDD PC
  4095. ZJN SRWX IF NO SECTORS WRITTEN
  4096. LDM MSD
  4097. LPN 77
  4098. LMN LA6DI
  4099. ZJN SRW1 IF *6DI* DRIVER
  4100. LMK LA6DJ&LA6DI
  4101. NJN SRWX IF NOT *6DJ* DRIVER
  4102. SRW1 LDM CHRV CHECK IF CHANNEL CONNECTED
  4103. LPN 1
  4104. ZJN SRWX IF CHANNEL NOT CONNECTED
  4105. LDD T7 CHECK TRACK SWITCH (DRIVER ISSUED *WLSF*)
  4106. ZJN SRWX IF STATUS NOT NEEDED
  4107. SOD T7
  4108. LDC SRW2
  4109. STM WDS
  4110. LJM .DST1 ENTER DRIVER TO TAKE SECOND GENERAL STATUS
  4111.  
  4112. SRW2 PJN SRW4 IF NO ERROR
  4113. RJM CDA PROCESS ERROR
  4114.  
  4115. SRW4 AOD T7 ADVANCE SECTOR
  4116. SRW5 LJM SRWX RETURN
  4117. WEI SPACE 4,25
  4118. ** WEI - WRITE EOI SECTOR.
  4119. *
  4120. * ENTRY (T5) = EST ORDINAL.
  4121. * (T6) = TRACK.
  4122. * (T7) = SECTOR.
  4123. * (NT) = NEXT TRACK POINTER.
  4124. * (FC) = INTERNAL *CIO* FUNCTION CODE.
  4125. * (FS - FS+4) = FST ENTRY.
  4126. * (WEIA) = OLD EOI TRACK TABLE ADDRESS.
  4127. * (WEIB) = OLD EOI SECTOR.
  4128. * (WEIC) = 1 IF ADDITIONAL TRACKS ALLOWED.
  4129. * (WEID) = EOI TRACK SET BY *RTCM*.
  4130. * (WEIE) = EOI SECTOR SET BY *RTCM*.
  4131. *
  4132. * EXIT (FS - FS+4) = UPDATED FST ENTRY.
  4133. * (A) = 0 IF NO DISK ERROR.
  4134. * CHANNEL RELEASED AND EXCESS TRACKS DROPPED.
  4135. *
  4136. * USES T1, T2, CM - CM+4.
  4137. *
  4138. * CALLS DCC, FWB, MSR, SCF, SRW, /WEI/WEI.
  4139. *
  4140. * MACROS MONITOR.
  4141.  
  4142.  
  4143. WEI SUBR ENTRY/EXIT
  4144.  
  4145. * CHECK FOR ERROR WRITING SYSTEM SECTOR.
  4146.  
  4147. LDD T6
  4148. LMD FS+1
  4149. NJN WEI1 IF NOT IN FIRST TRACK
  4150. LDD T7
  4151. ZJN WEIX IF POSITIONED AT SYSTEM SECTOR
  4152. WEI1 LDD T6 SET CURRENT TRACK IN FST
  4153. STD FS+2
  4154. LDD T7 SET CURRENT SECTOR IN FST
  4155. STD FS+3
  4156. LDD FC CHECK FOR REWRITE
  4157. SHN 21-12
  4158. PJP WEI3 IF NOT REWRITE
  4159. LDC 7777 CHECK TRACK TABLE
  4160. WEIA EQU *-1
  4161. SBD NT
  4162. MJN WEI1.1 IF TRACK BEYOND EOI USED
  4163. NJN WEI1.2 IF NOT AT EOI TRACK
  4164. LDC 7777 CHECK EOI SECTOR
  4165. WEIB EQU *-1
  4166. SBD T7
  4167. WEI1.1 MJN WEI3 IF SECTOR BEYOND EOI
  4168. WEI1.2 RJM SRW STATUS LAST SECTOR REWRITE
  4169. RJM DCC DROP CHANNEL WHEN OUTPUT REGISTER CLEAR
  4170. LDN 76 ONLY SET FILE WRITTEN IN FST IF REWRITE
  4171. STM WMSB
  4172. LDN 1 SET FILE WRITTEN
  4173. STM WMSC
  4174. RJM SCF SET CONTROL BUFFER INDEX INTO FNT
  4175. RJM FWB FLUSH WRITE DATA FOR BUFFERED DEVICE
  4176. WEIC LDN 0 CHECK TRT MODIFIED
  4177. * LDN 1 (ADDITIONAL TRACKS REQUESTED)
  4178. ZJN WEI2 IF NO TRT UPDATE NEEDED
  4179. LDM WEIB RESET OLD EOI SECTOR
  4180. STD CM+3
  4181. LDM WEIA RESET OLD EOI TRACK
  4182. STD T1
  4183. LDI T1 RESET OLD EOI TRACK
  4184. UJN WEI5 RESET EOI IN TRT
  4185.  
  4186. WEI2 LJM WEI9 RETURN
  4187.  
  4188. WEI3 RJM /WEI/WEI WRITE EOI SECTOR
  4189. SHN 0-21
  4190. RAM WEIF
  4191. RJM DCC DROP CHANNEL
  4192. RJM SCF SET CONTROL BUFFER INDEX INTO FNT
  4193. LDM COCA
  4194. SHN 21-13
  4195. MJN WEI4.1 IF TO RESTART *CPUCIO* FOR BUFFERED DEVICE
  4196. RJM FWB FLUSH WRITE DATA FOR BUFFERED DEVICE
  4197. WEI4.1 LDD T7 SET CURRENT SECTOR
  4198. STD CM+3
  4199. LDD T6 SET CURRENT TRACK
  4200. WEI5 LPC 3777
  4201. STD CM+2
  4202. LMC 0 CHECK EOI ALREADY SET CORRECTLY BY *RTCM*
  4203. WEID EQU *-1
  4204. LMC 4000
  4205. NJN WEI6 IF EOI NOT ON SAME TRACK
  4206. LDC 0 CHECK EOI SECTOR CORRECT IN TRT
  4207. WEIE EQU *-1
  4208. LMD CM+3
  4209. ZJN WEI2 IF EOI CORRECT IN TRT
  4210. WEI6 LDD T5 SET EQUIPMENT
  4211. STD CM+1
  4212. LDM PMFF CHECK FILE TYPE
  4213. NJN WEI7 IF NOT DIRECT ACCESS PERMANENT FILE
  4214. LDC 4000 SET TO CHECKPOINT DEVICE
  4215. RAD CM+1
  4216. WEI7 MONITOR DTKM DROP TRACKS AND UPDATE TRT
  4217.  
  4218. * COMPUTE COUNT OF SECTORS EITHER ADDITIONALLY ALLOCATED, OR
  4219. * RETURNED TO THE SYSTEM FOR THE CURRENT WRITE OPERATION.
  4220. * ACTUAL COUNT OF SECTORS RETURNED VIA DTKM IS IN CM+3 - CM+4
  4221.  
  4222. LDM CFNJ COMPUTE NET STORAGE COMSUMED
  4223. SBD CM+3
  4224. SHN 14
  4225. ADM CFNJ+1
  4226. SBD CM+4 SECTORS ALLOCATED MINUS SECTORS RETURNED
  4227. PJN WEI8 IF MORE SECTORS USED THAN RETURNED
  4228. LDN CICS CHANGE TO INCREMENT FUNCTION
  4229. STM CFNI
  4230. LDD CM+3
  4231. SBM CFNJ
  4232. SHN 14
  4233. ADD CM+4
  4234. SBM CFNJ+1
  4235. WEI8 STM CFNJ+1
  4236. SHN -14
  4237. STM CFNJ
  4238. WEI9 LDN 0
  4239. WEIF EQU *-1
  4240. * LDN 1 (ERROR OCCURRED ON THE WRITE)
  4241. LJM WEIX RETURN
  4242. RWF SPACE 4,10
  4243. ** RWF - REWRITE FILE ON DIFFERENT TRACK.
  4244. *
  4245. * IF IT IS POSSIBLE TO START THE OPERATION OVER (I.E. THE
  4246. * FET POINTERS HAVE NOT BEEN CHANGED), TRY THE OPERATION
  4247. * ON A DIFFERENT TRACK. THIS IS ACCOMPLISHED BY RETURNING
  4248. * THE BAD TRACK AND RESTARTING THE OPERATION. IF IT CANNOT
  4249. * BE RESTARTED AND THE FET POINTERS HAVE BEEN ADVANCED, THE
  4250. * FILE IS RESET TO THE EMPTY STATE AND AN ERROR IS RETURNED
  4251. * BECAUSE IT IS NOT POSSIBLE TO DETERMINE WHETHER OR NOT
  4252. * THE SYSTEM SECTOR WAS PROPERLY WRITTEN.
  4253. *
  4254. * EXIT TO *CDA* IF NON-MEDIA ERROR ON PRE-ASSIGNED DEVICE.
  4255. * TO *TMS* IF THE OPERATION CAN BE RESTARTED ON ANOTHER
  4256. * TRACK.
  4257. *
  4258. * NOTE - THIS SUBROUTINE IS ONLY USED BY THE ERROR PROCESSOR.
  4259.  
  4260.  
  4261. * FET POINTERS HAVE BEEN ADVANCED - DROP TRACKS, LEAVE FST
  4262. * IN ORIGINAL VALUE AND CONTINUE WITH ERROR PROCESSING.
  4263.  
  4264. RWF5 LDD FS+1 SET TRACK NUMBER
  4265. STD CM+2
  4266. LDM RWFC
  4267. ZJN RWF6 IF NOT PRE-ASSIGNED TO A DEVICE
  4268. LDD CM+2 SET EOI
  4269. LPC 3777
  4270. STD CM+2
  4271. UJN RWF7 DROP TRACKS
  4272.  
  4273. RWF6 STD FS CLEAR EQUIPMENT ASSIGNMENT
  4274. STD FS+1
  4275. RWF7 MONITOR DTKM
  4276.  
  4277. RWF SUBR ENTRY/EXIT
  4278. RWFA LDN ZERL SET UP MONITOR FUNCTION PARAMETERS
  4279. * UJN RWFX (NON-MEDIA ERROR ON PRE-ASSIGNED DEVICE)
  4280. CRD CM
  4281. LDD T5
  4282. STD CM+1
  4283. LDD IR+1
  4284. SHN 21-5
  4285. MJN RWF1 IF AUTORECALL
  4286. LDD T7
  4287. RWFB SBN FSMS+1
  4288. * SBN FSMS (SYSTEM SECTOR DATA IS IN CM BUFFER)
  4289. PJN RWF5 IF OPERATION ADVANCED PAST SYSTEM SECTOR
  4290. LDD T6
  4291. LMD FS+1
  4292. NJN RWF5 IF OPERATION ADVANCED PAST SYSTEM SECTOR
  4293. RWF1 LDD TH IMMEDIATE RETURN IF INACCESSIBLE DEVICE
  4294. RAD CM+1
  4295. LDC *
  4296. RWFC EQU *-1
  4297. ZJN RWF3 IF NOT PRE-ASSIGNED TO A DEVICE
  4298. LDM DCSA+1
  4299. LPN 77
  4300. LMN PARE
  4301. ZJN RWF2 IF MEDIA ERROR
  4302.  
  4303. * NON-MEDIA ERROR ON PRE-ASSIGNED DEVICE - RETURN TO *CDA* TO
  4304. * RESTART THE JOB OR PROCESS THE ERROR.
  4305.  
  4306. RWF1.1 LDM DCSA+1 SET UP TO RECALL JOB AND RESTART OPERATION
  4307. LPC 5777 CLEAR UNRECOVERABLE FLAG
  4308. STM RDCT
  4309. ISTORE RWFA,(UJN RWFX)
  4310. LJM CDA+1 REDETERMINE PROPER PROCESSING FOR ERROR
  4311.  
  4312. * MEDIA ERROR ON PRE-ASSIGNED DEVICE - REQUEST NEW TRACK ON
  4313. * SAME DEVICE, RETURN PREVIOUS TRACK, AND RESTART THE
  4314. * OPERATION.
  4315.  
  4316. RWF2 MONITOR RTCM
  4317. LDD CM+1 CHECK STATUS
  4318. SHN 21-11
  4319. MJN RWF1.1 IF FUNCTION CANT BE PROCESSED
  4320. LDD CM+4
  4321. UJN RWF4 DROP THE OLD TRACK CHAIN
  4322.  
  4323. * THE DEVICE WAS CHOSEN BY THIS *1MS* CALL - DROP THE TRACKS,
  4324. * LEAVE THE FST FIRST TRACK = 0, AND RESTART THE OPERATION.
  4325.  
  4326. RWF3 STD FS
  4327. RWF4 STD FS+1
  4328. LDD T6 DROP TRACKS
  4329. STD CM+2
  4330. MONITOR DTKM
  4331.  
  4332. * NOTE - THE *DTKM* STATUS IS NOT CHECKED. IF TRACKS CANNOT
  4333. * BE DROPPED ON AN INACCESSIBLE ISHARE DEVICE, THEY WILL JUST
  4334. * BE LEFT RESERVED UNTIL THE NEXT TIME THE DEVICE IS RECOVERED
  4335. * BY *MSM*. IT IS BETTER TO LEAVE THE TRACKS RESERVED AND LET
  4336. * THE JOB CONTINUE THAN TO TIE UP THE PP TRYING TO DROP THEM.
  4337.  
  4338. NFA FA,R
  4339. ADK FSTL
  4340. CWD FS
  4341. LDC * RESTORE FLAGS
  4342. RWFD EQU *-1
  4343. STM RCRF
  4344. LJM TMS RESTART THE OPERATION
  4345. SPACE 4,10
  4346. ** COMMON DECKS.
  4347.  
  4348.  
  4349. QUAL WEI
  4350. *CALL COMPWEI
  4351. QUAL *
  4352. WCS$ EQU 0
  4353. *CALL COMPWSS
  4354. TRTK SPACE 4,10
  4355. ** TRTK - TABLE OF RESERVED TRACKS.
  4356. * ENTRY = 1 WORD.
  4357. *
  4358. *T, 12/ TK
  4359. * TK TRACK IN FILE CHAIN
  4360.  
  4361.  
  4362. TRTK BSS 0
  4363. WDSB SPACE 4,10
  4364. ** WDSB - WRITE ERROR PROCESSING BUFFER.
  4365. * THIS BUFFER IS USED STRICTLY BY THE DRIVER ERROR PROCESSOR
  4366. * WHEN A WRITE ERROR IS ENCOUNTERED ON THE SECTOR PREVIOUS TO
  4367. * A SECTOR CURRENTLY BEING WRITTEN. THIS SPACE MAY BE
  4368. * OVERLAYED BY THE ERROR PROCESSING OVERLAY.
  4369.  
  4370. WDSB EQU TRTK+202
  4371. ERRNG BFMS-WDSB-502 WDSB EXTENDS INTO BFMS
  4372. SPACE 4,10
  4373. QUAL
  4374. EWTO EQU /WMS/WDSB+5 END OF WRITE MASS STORAGE OVERLAY
  4375. QUAL *
  4376. TITLE WRITE MASS STORAGE PRESET.
  4377. PRS SPACE 4,15
  4378. ** PRS - WRITE MASS STORAGE PRESET.
  4379. *
  4380. * ENTRY (FC) = INTERNAL *CIO* FUNCTION CODE.
  4381. * (FS - FS+4) = FST ENTRY.
  4382. * (FT - OT+1) = BUFFER POINTERS.
  4383. *
  4384. * EXIT (BD) = WORD COUNT OF DATA IN BUFFER.
  4385. * (DP - DP+4) = *OUT* POINTER.
  4386. * (IP - IP+1) = *IN* POINTER.
  4387. *
  4388. * USES SC, WC.
  4389. *
  4390. * CALLS GNT, RMS, SBA.
  4391. *
  4392. * MACROS ERROR, PAUSE.
  4393.  
  4394.  
  4395. PRS BSS 0 ENTRY
  4396. LDC 500 SET BYTE COUNT FOR *WMS* COMPLETION CODE
  4397. STM BFMS+2+505+4
  4398. LDM RCRF SAVE RESTART FLAG STATUS
  4399. STM RWFD
  4400.  
  4401. * SET BUFFER RELATED ADDRESSES.
  4402.  
  4403. LDD LM LIMIT - FIRST
  4404. SBD FT
  4405. SHN 14
  4406. ADD LM+1
  4407. SBD FT+1
  4408. STM WTBA+1
  4409. STM PRSA+1
  4410. SHN -14
  4411. LMC ADCI
  4412. STM WTBA
  4413. STM PRSA
  4414.  
  4415. LDC ADCI+77 -LIMIT
  4416. LMD LM
  4417. STM WTBC
  4418. LCN 0
  4419. LMD LM+1
  4420. STM WTBC+1
  4421.  
  4422. LDD FC
  4423. SHN 21-5
  4424. PJN PRS1 IF NOT *WRITECW*
  4425. AOM WTBC+1 ADJUST FOR CONTROL WORDS
  4426. SHN -14
  4427. RAM WTBC
  4428. LDD LM SET LIMIT-1
  4429. SHN 14
  4430. LMD LM+1
  4431. SBN 1
  4432. UJN PRS2 SET BOUNDARY CONDITION FOR *WTB*
  4433.  
  4434. PRS1 LDD FT SET FIRST
  4435. SHN 14
  4436. LMD FT+1
  4437. PRS2 STM WTBE+1
  4438. SHN -14
  4439. RAM WTBE
  4440.  
  4441. * CHECK AMOUNT OF DATA IN THE BUFFER.
  4442.  
  4443. LDD IN+1 SET *IN* POINTER
  4444. STD IP+1
  4445. LDD IN CHECK DATA IN BUFFER
  4446. STD IP
  4447. SBD OT LENGTH = IN - OUT
  4448. SHN 14
  4449. ADD IN+1
  4450. SBD OT+1
  4451. PJN PRS3 IF NO WRAP AROUND
  4452. PRSA ADC ** (LIMIT - FIRST)
  4453. PRS3 STD BD SAVE WORD COUNT OF DATA IN BUFFER
  4454. SHN 21-5
  4455. STD SC SAVE NUMBER OF PRUS OF DATA
  4456. NJN PRS4 IF DATA IN BUFFER
  4457. LDD FC
  4458. SHN 21-5
  4459. MJN PRS5 IF *WRITECW* WITH NO DATA
  4460. SHN 5-21+22 GET TERMINATION CONDITION
  4461. LPN 14
  4462. LMN /CIO/EOF
  4463. NJN PRS4 IF NOT EOF OPERATION
  4464. LDD FS+4 CHECK LAST STATUS
  4465. LPN 6
  4466. LMN 2
  4467. ZJN PRS4 IF LAST OPERATION INCOMPLETE WRITE
  4468. LDC WMS1 PREVENT BUFFER WRITE
  4469. STM WMSA
  4470. PRS4 LDD SC
  4471. NJN PRS7 IF AT LEAST ONE SECTOR IN BUFFER
  4472. LDD FC CHECK TERMINATION CONDITION AND *WRITECW*
  4473. LPN 54
  4474. ZJN PRS5 IF *WPHR*
  4475. LMN /CIO/EOI
  4476. NJN PRS7 IF NOT BUFFERED WRITE
  4477. PRS5 LDM RCRF CHECK FOR DATA PREVIOUSLY TRANSFERRED
  4478. SHN 21-6
  4479. MJN PRS6 IF DATA ALREADY TRANSFERRED
  4480. ERROR UCF *UNNECESSARY CIO FUNCTION*
  4481.  
  4482. PRS6 LJM CFN COMPLETE FUNCTION
  4483.  
  4484. PRS7 LDD SC CHECK DATA WORD COUNT
  4485. SHN -6
  4486. ZJN PRS8 IF LESS THAN 10000B WORDS OF DATA
  4487. LCN 0 SET 7777B WORDS OF DATA
  4488. STD BD
  4489. PRS8 LDD FC
  4490. LPN 54
  4491. NJN PRS9 IF NOT *WPHR*
  4492. LDC WMS2 SET TERMINATION CONDITION
  4493. STM WTBU
  4494. LDC LDCI+WLSF/10000 SET WRITE LAST SECTOR
  4495. STM WTBO
  4496. LDN 1
  4497. LJM PRS14 SET SECTOR COUNT TO 1 FOR *WPHR*
  4498.  
  4499. PRS9 LMN /CIO/EOI+40
  4500. ZJN PRS11 IF *WRITECW*
  4501. LMN 40
  4502. ZJN PRS10 IF NOT EOR/EOF OPERATION
  4503. LJM PRS15 CALCULATE PRU COUNT FOR EOR/EOF OPERATION
  4504.  
  4505. PRS10 LDD IR+1 CHECK RECALL STATUS
  4506. SHN 21-5
  4507. PJN PRS12 IF NOT AUTO RECALL
  4508. LJM PRS17 CHECK FILE POSITION
  4509.  
  4510. PRS11 AOM SBAA SET TO ALLOW FOR HEADER WORD
  4511. LDC WTB SET LOOP ADDRESS
  4512. STM WMSA
  4513.  
  4514. * READ FIRST CONTROL WORD.
  4515.  
  4516. LDD OT
  4517. SHN 6
  4518. ADD RA
  4519. SHN 6
  4520. ADD OT+1
  4521. CRM BFMS+2+505,ON
  4522. LDD IR+1 CHECK AUTO RECALL
  4523. SHN 21-5
  4524. MJN PRS13 IF AUTO RECALL
  4525. PRS12 LDD CP SET CONTROL POINT ADDRESS
  4526. RAM WTBW
  4527. LDC CRDI+IP-3 SET TO READ IN
  4528. STM WTBR
  4529. LDC WTB23 SET TO RECALL CPU AFTER FIRST SECTOR
  4530. STM WTBH
  4531. PRS13 LDN 0 SET TO REDUCE SECTOR COUNT TO USER LIMIT
  4532. STM CFSA
  4533. AOM RTCA
  4534. LDC RWPC SET DEFAULT PRU COUNT
  4535. PRS14 STD SC
  4536. UJN PRS17 CHECK FILE POSITION
  4537.  
  4538. PRS15 LMN /CIO/EOF&/CIO/EOI
  4539. NJN PRS16 IF NOT EOF OPERATION
  4540. LDC WMS1 SET RETURN ADDRESS FOR EOF WRITE
  4541. STM WTBV
  4542. AOD SC COUNT EOF SECTOR
  4543. PRS16 AOD SC COUNT EOR SECTOR
  4544. LDC WTB21
  4545. STM WTBB
  4546. LDD FC CHECK FOR *CLOSE* OPERATION
  4547. SHN -6
  4548. LPN 17
  4549. LMN /CIO/CLO
  4550. NJN PRS17 IF NOT CLOSE
  4551. STM WTBT PREVENT UPDATE OF OUT POINTER
  4552.  
  4553. * CHECK FILE CURRENT POSITION AT EOI.
  4554.  
  4555. PRS17 AOD SC COUNT EOI SECTOR
  4556. LDD FS+2 GET CURRENT TRACK
  4557. ZJN PRS19 IF FILE NOT USED
  4558. RJM GNT GET NEXT TRACK POINTER
  4559. SHN 6
  4560. MJN PRS18 IF NOT AT EOI TRACK
  4561. SHN -6
  4562. SBD FS+3
  4563. ZJN PRS19 IF AT EOI SECTOR
  4564. PRS18 LDD FS+4
  4565. LPN 2
  4566. ZJN PRS20 IF LAST OPERATION NOT WRITE
  4567. AOM PRSB SET REWRITE FLAG
  4568. PRS19 LDD FC CLEAR REWRITE FLAG
  4569. SHN 0-12+22
  4570. SCN 1
  4571. PRSB LMN 0
  4572. * LMN 1 (SET REWRITE FLAG)
  4573. SHN 12-0
  4574. STD FC
  4575. STM ICFC
  4576.  
  4577. ERRNG *-TRTK-202 CHECK TRACK TABLE LENGTH
  4578.  
  4579. PRS20 RJM RMS RESERVE MASS STORAGE
  4580.  
  4581. * THE *LAST OPERATION WRITE* FLAG MUST BE WRITTEN TO THE
  4582. * CM COPY OF THE FST BEFORE THE WRITE OPERATION BEGINS
  4583. * IN CASE THE OPERATION IS INTERRUPTED BY A SYSTEM HANG.
  4584. * *REC*, ON A LEVEL 3, CHECKS THIS FLAG TO DETERMINE IF IT
  4585. * SHOULD VERIFY THAT FILES HAVE AN EOI AND ADD ONE TO FILES
  4586. * THAT DONT. THE FST IS UPDATED AGAIN WHEN THE WRITE OPERATION
  4587. * IS COMPLETE.
  4588.  
  4589. LDD FS+4 SET THE WRITE MODE FLAG
  4590. SCN 2
  4591. LMN 2
  4592. STD FS+4
  4593. NFA FA,R REWRITE THE FST ENTRY
  4594. ADK FSTL
  4595. CWD FS
  4596. LDN 0 BUILD OUT POINTER
  4597. STD DP
  4598. STD DP+1
  4599. STD DP+2
  4600. LDD OT
  4601. STD DP+3
  4602. LDD OT+1
  4603. STD DP+4
  4604. PAUSE NE
  4605. RJM SBA SET BUFFER ADDRESSES
  4606. LDD FS+2
  4607. ZJN PRS21 IF FIRST WRITE FOR NEW FILE
  4608. LJM WMS PROCESS DATA WRITE
  4609.  
  4610. PRS21 LDD FS+4
  4611. SHN 21-13
  4612. MJN PRS24 IF SYSTEM SECTOR OPERATION
  4613. LJM WSY WRITE SYSTEM SECTOR
  4614.  
  4615. PRS22 ERROR IRQ *INCORRECT I/O REQUEST*
  4616.  
  4617. PRS23 ERROR BLE *BUFFER CONTROL WORD ERROR*
  4618.  
  4619. * PROCESS *WRITECW* SYSTEM SECTOR OPERATION.
  4620.  
  4621. PRS24 LDD FC
  4622. SHN 21-5
  4623. PJN PRS22 IF NOT *WRITECW*
  4624. LDM BFMS+2+505+4
  4625. LMC 77*5
  4626. NJN PRS23 IF WRONG WORD COUNT
  4627. LDC 77+2 SET WORD COUNT OF DATA IN BUFFER
  4628. STD WC
  4629. LDD BD UPDATE BUFFER WORD COUNT
  4630. SBD WC
  4631. MJN PRS23 IF BUFFER CONTROL WORD ERROR
  4632. STD BD
  4633. SOM RWFB
  4634. LDD HN SET RETURN TO PRESET
  4635. ERRNZ 100-LJMI ADJUST IF INSTRUCTION VALUE CHANGES
  4636. STM WTBM
  4637. LDC PRS25
  4638. STM WTBM+1
  4639. LJM WTB6 READ CENTRAL BUFFER
  4640.  
  4641. * COMPLETE *WRITECW* SYSTEM SECTOR OPERATION.
  4642.  
  4643.  
  4644. PRS25 LDC LDDI+T7 RESET INSTRUCTIONS
  4645. STM WTBM
  4646. LDC ADNI+1
  4647. STM WTBM+1
  4648. LDM BFMS+2+500+4 MOVE WORD COUNT FOR NEXT PRU
  4649. STM BFMS+2+505+4
  4650. LJM WSY WRITE SYSTEM SECTOR
  4651. TITLE WRITE PRESET SUBROUTINES.
  4652. CFL SPACE 4,10
  4653. ** CFL - CHECK FILE SIZE LIMIT.
  4654. *
  4655. * ENTRY (DP - DP+1) = ADDITIONAL FILE SIZE ALLOWED
  4656. * IN SECTORS.
  4657. *
  4658. * EXIT (A) .LT. 0 IF FILE SIZE LIMIT EXCEEDED.
  4659. * (DP - DP+1) = REMAINING ADDITIONAL FILE SIZE ALLOWED
  4660. * IN SECTORS.
  4661.  
  4662.  
  4663. CFL2 LDD DP
  4664. ADD DP+1
  4665. ZJN CFL1 IF LIMIT REACHED
  4666.  
  4667. CFL SUBR ENTRY/EXIT
  4668. LDD DP+1
  4669. SBM SLM
  4670. STD DP+1
  4671. PJN CFL2 IF NO UNDERFLOW
  4672. AOD DP+1
  4673. SOD DP
  4674. PJN CFL2 IF LIMIT NOT EXCEEDED
  4675. CFL1 LCN 0 INDICATE FILE SIZE LIMIT EXCEEDED
  4676. UJN CFLX RETURN
  4677. CFS SPACE 4,20
  4678. ** CFS - CHECK FILE SIZE.
  4679. *
  4680. * ENTRY (FS - FS+4) = FST ENTRY.
  4681. * (FA) = FNT ORDINAL IN NEGATIVE FL.
  4682. * (SC) = ADDITIONAL SECTOR COUNT, INCLUDING EOI TRACK.
  4683. *
  4684. * EXIT (A) .LT. 0 IF NO ADDITIONAL TRACKS NEEDED.
  4685. * .EQ. 0 IF TRACKS REQUIRED FOR BUFFERED WRITE.
  4686. * .GT. 0 IF TRACKS REQUIRED FOR NON-BUFFERED WRITE.
  4687. *
  4688. * ERROR TO *ERR* IF FILE SIZE LIMIT EXCEEDED.
  4689. *
  4690. * USES SC, T2, CM - CM+4, DP - DP+2.
  4691. *
  4692. * CALLS CFL, GNT, RJC.
  4693. *
  4694. * MACROS ERROR, NFA.
  4695.  
  4696.  
  4697. CFS SUBR ENTRY/EXIT
  4698. LDD SC CHECK ROOM FOR WRITE
  4699. SBM SLM
  4700. STD SC
  4701. SBN 1
  4702. MJN CFSX IF SUFFICIENT TRACKS ASSIGNED
  4703. NFA FA,R GET FNT+2 WORD
  4704. ADN FUTL
  4705. CRD CM
  4706. LDD CM+2 GET FILE LIMIT INDEX
  4707. SHN -6
  4708. LPN 7
  4709. SHN 1 SET INDEX FOR TABLE
  4710. STD T2
  4711. NJN CFS0 IF NON-ZERO INDEX
  4712. LDM PMFF
  4713. NJN CFS0 IF NOT DIRECT ACCESS PERMANENT FILE
  4714. LDD CP GET JOB SERVICE CLASS
  4715. ADN TFSW
  4716. CRD CM
  4717. SFA EJT,CM
  4718. ADN SCLE
  4719. CRD CM
  4720. LDD CM GET VALUE FROM JOB CONTROL AREA
  4721. SHN -6
  4722. RJM RJC READ JOB CONTROL AREA
  4723. ZJN CFS0 IF SERVICE CLASS UNDEFINED
  4724. ADN PFCT
  4725. CRD CM
  4726. LDD CM SET SERVICE CLASS *DS* VALUE
  4727. SHN -11
  4728. LPN 7
  4729. SHN 1
  4730. STD T2
  4731. CFS0 LDM CFSB,T2 SET LIMIT
  4732. STD DP
  4733. LDM CFSB+1,T2
  4734. STD DP+1
  4735. ADD DP
  4736. ZJN CFS2 IF UNLIMITED
  4737. LDD FS+1 FIRST TRACK
  4738. SHN 6
  4739. CFS1 SHN -6
  4740. RJM GNT GET NEXT TRACK
  4741. RJM CFL CHECK FILE LIMIT
  4742. MJN CFS6 IF FILE SIZE LIMIT EXCEEDED
  4743. LDD T3
  4744. SHN 6
  4745. MJN CFS1 IF NOT EOI TRACK
  4746. LDD DP CHECK IF SECTORS NEEDED WITHIN LIMIT
  4747. SHN 14
  4748. ADD DP+1
  4749. SBD SC
  4750. PJN CFS2 IF ADDITIONAL SECTORS WITHIN USER LIMIT
  4751. LDD SC SAVE SECTOR COUNT
  4752. STD DP+2
  4753. CFSA UJN CFS5 CHECK IF REQUIRED TRACKS WITHIN LIMIT
  4754. * PSN (VARIABLE SECTOR COUNT)
  4755. LDD DP+1 REQUEST UP TO 1 TRACK OVER LIMIT
  4756. STD SC
  4757. CFS2 LDM CFSA RETURN BUFFERED/NON-BUFFERED WRITE STATUS
  4758. CFS3 LJM CFSX RETURN
  4759.  
  4760. CFS4 RJM CFL CHECK FILE LIMIT
  4761. MJN CFS7 IF FILE SIZE LIMIT EXCEEDED
  4762. CFS5 LDD DP+2 COUNT SECTORS FOR ADDITIONAL TRACKS
  4763. SBM SLM
  4764. STD DP+2
  4765. SBN 1
  4766. PJN CFS4 IF MORE TRACKS NEEDED
  4767. UJN CFS2 RETURN
  4768.  
  4769. CFS6 LDM CFSA CHECK IF BUFFERED WRITE
  4770. NJN CFS7 IF NOT VARIABLE SECTOR COUNT
  4771. LDD FS+3 CHECK CURRENT SECTOR AT END OF TRACK
  4772. ADN 1
  4773. SBM SLM
  4774. MJN CFS3 IF LIMIT TRACK NOT FULL
  4775. CFS7 ERROR FTL *FILE TOO LONG*
  4776.  
  4777.  
  4778. CFSB BSS 0 TABLE OF DIRECT ACCESS FILE SIZE LIMITS
  4779. CON 0,0
  4780. CON /PFM/DSRNG1/100,/PFM/DSRNG1*100-/PFM/DSRNG1/100*10000
  4781. CON /PFM/DSRNG2/100,/PFM/DSRNG2*100-/PFM/DSRNG2/100*10000
  4782. CON /PFM/DSRNG3/100,/PFM/DSRNG3*100-/PFM/DSRNG3/100*10000
  4783. CON /PFM/DSRNG4/100,/PFM/DSRNG4*100-/PFM/DSRNG4/100*10000
  4784. CON /PFM/DSRNG5/100,/PFM/DSRNG5*100-/PFM/DSRNG5/100*10000
  4785. CON /PFM/DSRNG6/100,/PFM/DSRNG6*100-/PFM/DSRNG6/100*10000
  4786. CON /PFM/DSRNG7/100,/PFM/DSRNG7*100-/PFM/DSRNG7/100*10000
  4787. CMA SPACE 4,10
  4788. ** CMA - CHECK FILE MODIFICATION ALLOWED.
  4789. *
  4790. * ENTRY (FC) = INTERNAL *CIO* FUNCTION CODE.
  4791. *
  4792. * ERROR TO *ERR* IF MODIFICATION NOT ALLOWED.
  4793. *
  4794. * MACROS ERROR.
  4795.  
  4796.  
  4797. CMA SUBR ENTRY/EXIT
  4798. LDM FACF CHECK FILE ACCESS FLAGS
  4799. LPN 30
  4800. ZJN CMAX IF NO RESTRICTIONS
  4801. SHN 21-3
  4802. PJN CMA1 IF MODIFICATION NOT ALLOWED
  4803. LDD FC CHECK FOR REWRITE
  4804. SHN 21-12
  4805. MJN CMAX IF REWRITE
  4806. CMA1 ERROR IFM *INCORRECT MODIFICATION*
  4807. GNT SPACE 4,10
  4808. ** GNT - GET NEXT TRACK POINTER.
  4809. *
  4810. * ENTRY (A) = CURRENT TRACK POINTER.
  4811. * (FS - FS+4) = FST ENTRY.
  4812. *
  4813. * EXIT (A) = (T3) = NEXT TRACK POINTER.
  4814. * (T2) = CURRENT TRACK POINTER.
  4815. * (T5) = EQUIPMENT IF INITIAL CALL.
  4816. *
  4817. * USES T2, T3, CM - CM+4.
  4818. *
  4819. * MACROS SFA.
  4820.  
  4821.  
  4822. GNT2 SHN -2 READ TRT WORD
  4823. GNTB ADC **
  4824. CRD CM
  4825. LDD T2 SET BYTE INDEX
  4826. LPN 3
  4827. STD T3
  4828. LDM CM,T3 GET NEXT TRACK POINTER
  4829. STD T3
  4830.  
  4831. GNT SUBR ENTRY/EXIT
  4832. STD T2 SAVE CURRENT TRACK POINTER
  4833. GNT1 LDD FS
  4834. * UJN GNT2 (TRT ADDRESS PRESET)
  4835. GNTA EQU *-1
  4836. STD T5
  4837. SFA EST GET EST ENTRY
  4838. ADK EQDE
  4839. CRD CM
  4840. LDD CM+4 MST ADDDRESS / 10
  4841. SHN 3
  4842. ADN TRLL READ TRT POINTER
  4843. CRD CM
  4844. LDD CM+3 EXTRACT TRT ADDRESS
  4845. LPN 77
  4846. SHN 14
  4847. LMD CM+4
  4848. SBD TH COMPENSATE FOR TRACK LINK FLAG (4000/4)
  4849. STM GNTB+1 SET TRT BASE ADDRESS
  4850. SHN -14
  4851. RAM GNTB
  4852. ISTORE GNTA,(UJN GNT2)
  4853. LDD T2
  4854. UJN GNT1 GET NEXT TRACK POINTER
  4855. RTC SPACE 4,15
  4856. ** RTC - REQUEST TRACK CHAIN.
  4857. *
  4858. * ENTRY (A) = TRACK PARAMETER OR DEVICE SELECTION.
  4859. * (T5) = EQUIPMENT IF NONZERO.
  4860. * (SC) = SECTOR COUNT.
  4861. *
  4862. * EXIT (A) = FIRST TRACK ASSIGNED.
  4863. * (CM+1) = EQUIPMENT.
  4864. *
  4865. * ERROR TO *ERR* IF MS PRU LIMIT OR TRACK LIMIT.
  4866. *
  4867. * USES CM - CM+4, DP - DP+4.
  4868. *
  4869. * MACROS ERROR, MONITOR.
  4870.  
  4871.  
  4872. RTC6 ERROR PRL *PRU LIMIT*
  4873.  
  4874. RTC SUBR ENTRY/EXIT
  4875. STD CM+2 SET TRACK PARAMETER/DEVICE SELECTION
  4876. LDD CP READ MASS STORAGE LIMIT WORD
  4877. ADN ACLW
  4878. CRD DP
  4879. LDD DP+3 CHECK MASS STORAGE PRU LIMIT
  4880. LPN 77
  4881. SHN 14
  4882. LMD DP+4
  4883. ZJN RTC6 IF JOB PRU LIMIT EXCEEDED
  4884. LDD CM+2 SAVE TRACK PARAMETER/DEVICE SELECTION
  4885. STD DP
  4886. RTC1 LDD T5 SET EQUIPMENT
  4887. ADD TH IMMEDIATE RETURN IF INACCESSIBLE DEVICE
  4888. STD CM+1
  4889. LDM PMFF CHECK FILE TYPE
  4890. NJN RTC2 IF NOT DIRECT ACCESS PERMANENT FILE
  4891. LDC 4000 SET DEVICE CHECKPOINT
  4892. RAD CM+1
  4893. RTC2 LDM FSAL GET FILE SECURITY ACCESS LEVEL
  4894. ADN 40 SET ACCESS LEVEL SELECTION
  4895. SHN 6
  4896. STD CM+3
  4897. LDD SC SET SECTOR COUNT
  4898. STD CM+4
  4899. MONITOR RTCM ASSIGN MASS STORAGE SPACE
  4900. LDD CM+1 CHECK STATUS
  4901. SHN 21-11
  4902. PJN RTC2.1 IF FUNCTION PROCESSED
  4903. ISTORE CDAA,(UJN CDA4) SKIP EOI WRITE
  4904. LDD FS SET EST ORDINAL
  4905. STM ERSD
  4906. RJM CDA CHECK DEVICE ACCESSIBILITY
  4907.  
  4908. RTC2.1 LDD CM+4
  4909. ZJN RTC4 IF NO TRACKS ASSIGNED
  4910. LDD CM+2 SAVE NEW EOI TRACK
  4911. STM WEID
  4912. LDD CM+3 SAVE NEW EOI SECTOR
  4913. STM WEIE
  4914. AOM WEIC SET TRT MODIFIED FLAG
  4915. LDM RCRF CHECK IF IN RECALL STACK FOR TRACK LIMIT
  4916. LPN 77
  4917. LMN TRLR
  4918. NJN RTC3 IF NO PRIOR TRACK LIMIT
  4919. LDD CP CLEAR CONSOLE MESSAGE
  4920. ADN MS2W
  4921. CWD CM
  4922. RTC3 LDD CM+4 RETURN FIRST TRACK ASSIGNED
  4923. LJM RTCX RETURN
  4924.  
  4925. RTC4 LDN 0 CHECK FOR BUFFERED WRITE
  4926. * LDN 1 (VARIABLE SECTOR COUNT)
  4927. RTCA EQU *-1
  4928. ZJN RTC5 IF NOT VARIABLE SECTOR COUNT
  4929. SOM RTCA
  4930. LDN 3 SET MINIMUM SECTOR COUNT
  4931. STD SC
  4932. LDD DP RESET TRACK PARAMETER/DEVICE SELECTION
  4933. STD CM+2
  4934. LJM RTC1 RETRY REQUEST FOR ONE TRACK
  4935.  
  4936. RTC5 ERROR TKL *TRACK LIMIT*
  4937. RMS SPACE 4,20
  4938. ** RMS - RESERVE MASS STORAGE SPACE.
  4939. *
  4940. * ENTRY (FS - FS+4) = FST ENTRY.
  4941. * (FC) = INTERNAL *CIO* FUNCTION CODE.
  4942. * (SC) = SECTOR COUNT TO WRITE.
  4943. *
  4944. * EXIT (T5) = EQUIPMENT.
  4945. * (T6) = CURRENT TRACK.
  4946. * (T7) = CURRENT SECTOR.
  4947. * (NT) = TRACK TABLE ADDRESS.
  4948. * (FS - FS+1) = EQUIPMENT AND FIRST TRACK ASSIGNED
  4949. * IF NEW FILE.
  4950. * (TRTK) = TABLE OF RESERVED TRACKS.
  4951. *
  4952. * USES SC, CM - CM+4.
  4953. *
  4954. * CALLS CFS, CMA, GNT, RTC.
  4955. *
  4956. * MACROS NFA, SETMS.
  4957.  
  4958.  
  4959. * COPY EXISTING TRACKS FROM TRT TO TRACK TABLE.
  4960.  
  4961. RMS8 STI NT ENTER TRACK TABLE
  4962. RJM GNT GET NEXT TRACK TABLE
  4963. SHN 6
  4964. PJN RMS10 IF EOI LINK
  4965. AOD NT ADVANCE TRACK TABLE ADDRESS
  4966. LDD SC CHECK SECTOR COUNT
  4967. SBM SLM
  4968. MJN RMS9 IF ROOM FOR WRITE
  4969. ZJN RMS9 IF EXACTLY FILLS TRACK
  4970. STD SC UPDATE SECTOR COUNT
  4971. LDD T3 SET NEXT TRACK
  4972. UJN RMS8 LOOP TO EOI OR ROOM FOR WRITE
  4973.  
  4974. * CHECK FILE MODIFICATION ALLOWED.
  4975.  
  4976. RMS9 RJM CMA CHECK MODIFICATION ALLOWED
  4977. LJM RMS17 PROCESS EXIT
  4978.  
  4979. * SET EOI POSITION.
  4980.  
  4981. RMS10 AOD NT ADVANCE TRACK TABLE ADDRESS
  4982. RMSB SBN 1
  4983. * LJM RMS12 (FIRST WRITE OF NEW FILE)
  4984. STM WEIA SET TRACK TABLE ADDRESS
  4985. LDD T3 SET ORIGINAL EOI SECTOR
  4986. STM WEIB
  4987. ADN 1
  4988. STM WTBAD
  4989. LDM FACF CHECK FILE ACCESS FLAGS
  4990. LPN 30
  4991. LMN 10
  4992. ZJN RMS10.1 IF UPDATE MODE
  4993. LDD FC
  4994. SHN 21-12
  4995. PJN RMS10.4 IF NOT REWRITE
  4996. RMS10.1 ISTORE WTBAA,(PSN) FORCE CHECK FOR ORIGINAL EOI TRACK
  4997. LDD T2 SAVE ORIGINAL EOI TRACK
  4998. STM WTBAB
  4999. LMD FS+2
  5000. NJN RMS10.2 IF NOT CURRENTLY AT EOI TRACK
  5001. LDM WTBAD FORCE CHECK FOR ORIGINAL EOI SECTOR
  5002. STM WTBZ
  5003. RMS10.2 LDM FACF CHECK FILE ACCESS FLAGS
  5004. LPN 30
  5005. LMN 10
  5006. NJN RMS10.4 IF NOT UPDATE MODE
  5007. ISTORE WTBAC,(NJN WTB11.3) STOP TRANSFER AT ORIGINAL EOI
  5008. LDC WTB20.1 SET ERROR FOR WRITE PAST EOI
  5009. STM WTBAE
  5010. RMS10.3 LJM RMS9 CHECK IF MODIFICATION ALLOWED
  5011.  
  5012. RMS10.4 LDD T3
  5013. SBD SC
  5014. PJN RMS10.3 IF NO FILE EXTENSION
  5015. LDM FACF CHECK FILE ACCESS FLAGS
  5016. LPN 30
  5017. ZJN RMS12 IF NO RESTRICTIONS
  5018. LDD T2
  5019. LMD FS+2
  5020. NJN RMS11 IF NOT AT EOI TRACK
  5021. LDD T3
  5022. LMD FS+3
  5023. ZJN RMS12 IF AT EOI SECTOR
  5024. RMS11 RJM CMA CHECK MODIFICATION ALLOWED
  5025. RMS12 LDD T2 SAVE TRACK LINK
  5026. STD SL
  5027.  
  5028. * CHECK MASS STORAGE LIMIT AND RESERVE ADDITIONAL TRACKS.
  5029.  
  5030. RJM CFS CHECK FILE SIZE
  5031. MJN RMS17 IF SUFFICIENT TRACKS ASSIGNED
  5032. NJN RMS14 IF NOT BUFFERED WRITE
  5033. LDD SC
  5034. RMS13 SBM SLM
  5035. PJN RMS13 IF MORE TRACKS NEEDED
  5036. LMC 777777
  5037. RAD SC ROUND SECTOR COUNT UP TO END OF TRACK
  5038. RMS14 LDD SL
  5039. RJM RTC REQUEST TRACK CHAIN
  5040. RMS15 SHN 6
  5041. RMS16 SHN -6
  5042. STI NT ENTER TRACK TABLE
  5043. RJM GNT GET NEXT TRACK
  5044. AOD NT ADVANCE TRACK TABLE
  5045. LDM SLM ACCUMULATE COUNT OF SECTORS
  5046. RAM CFNJ+1
  5047. SHN -14
  5048. RAM CFNJ
  5049. LDD T3 CHECK NEXT LINK
  5050. SHN 6
  5051. MJN RMS16 IF MORE TRACKS
  5052. RMS17 LDN 0 INDICATE END OF RESERVED TRACK TABLE
  5053. STI NT
  5054. LDC TRTK RESET TRACK TABLE ADDRESS
  5055. STD NT
  5056.  
  5057. RMS SUBR ENTRY/EXIT
  5058. LDC TRTK SET TRACK TABLE ADDRESS
  5059. STD NT
  5060. LDD FS+3 BIAS SECTOR COUNT WITH CURRENT SECTOR
  5061. STD T7
  5062. RAD SC
  5063. LDD FS+2
  5064. ZJN RMS1 IF FILE NOT USED
  5065. LJM RMS5 BUILD TRACK TABLE
  5066.  
  5067. RMS1 AOD SC COUNT SYSTEM SECTOR
  5068. LDD FS GET EQUIPMENT ASSIGNMENT
  5069. STM RWFC
  5070. STD T5
  5071. LDD FS+1
  5072. NJN RMS2 IF FIRST TRACK ASSIGNED
  5073. LDC RMS15 SET TO BYPASS TRACK LINK SEARCH
  5074. STM RMSA
  5075. RJM SMA SET *MSAL* PARAMETER
  5076. RJM RTC REQUEST TRACK CHAIN
  5077. STD FS+1 SET FIRST TRACK
  5078. LDD CM+1 SET EQUIPMENT
  5079. STD FS
  5080. RMS2 RJM CBD CHECK FOR BUFFERED DEVICE
  5081. ZJN RMS3 IF NOT BUFFERED DEVICE
  5082. LDD FC CHECK TERMINATION CONDITION
  5083. LPN 14
  5084. ZJN RMS3 IF *WPHR*
  5085. LDM RCRF SET BUFFERED DEVICE FUNCTION FLAG
  5086. LPC 7577
  5087. LMC 200
  5088. STM RCRF
  5089. RMS3 LDM RCRF
  5090. SHN 21-7
  5091. PJN RMS4 IF NOT BUFFERED DEVICE FUNCTION
  5092. LDC WMS2 PREVENT DATA AND EOF WRITE
  5093. STM WMSA
  5094. LDC 4000 SET TO RESTART *CPUCIO*
  5095. STM COCA
  5096. LDN 2 SET SYSTEM SECTOR AND EOI SECTOR COUNT
  5097. STD SC
  5098. RMS4 LDC LJMI SET UP FOR FIRST WRITE OF NEW FILE
  5099. STM RMSB
  5100. LDC RMS12
  5101. STM RMSB+1
  5102. LDD FS+1 SET CURRENT TRACK TO FIRST TRACK
  5103. RMS5 STD T6
  5104. LDD FS SET EQUIPMENT
  5105. STD T5
  5106. LDD FC
  5107. SHN 21-12
  5108. PJN RMS6 IF NOT REWRITE
  5109. SETMS IO,RW,WDSB
  5110. UJN RMS7 BUILD TRACK TABLE
  5111.  
  5112. RMS6 SETMS IO,NF,WDSB
  5113. RMS7 LDM SLM
  5114. STM WTBZ
  5115. LDD T6
  5116. LJM RMS8 BUILD TRACK TABLE
  5117. * LJM RMS15 (BYPASS TRACK LINK SEARCH)
  5118. RMSA EQU *-1
  5119. SMA SPACE 4,10
  5120. ** SMA - SET MASS STORAGE ALLOCATION (*MSAL*) PARAMETER.
  5121. *
  5122. * ENTRY (BS - BS+4) = FET+0.
  5123. *
  5124. * EXIT (A) = *MSAL* PARAMETER.
  5125. *
  5126. * USES T1.
  5127.  
  5128.  
  5129. SMA2 MJN SMA1 IF SEARCH NAME IS BEYOND CURRENT ENTRY
  5130. LDN LOCS RETURN *MSAL* SELECTION
  5131.  
  5132. SMA SUBR ENTRY/EXIT
  5133. LDC TSFN-TSFNL
  5134. STD T1
  5135. SMA1 LDN TSFNL
  5136. RAD T1
  5137. LDI T1
  5138. SBD BS
  5139. NJN SMA2 IF NO MATCH ON FIRST TWO CHARACTERS
  5140. LDM 1,T1
  5141. LMD BS+1
  5142. NJN SMA1 IF NAMES DO NOT MATCH
  5143. LDM 2,T1
  5144. LMD BS+2
  5145. NJN SMA1 IF NAMES DO NOT MATCH
  5146. LDM 3,T1
  5147. LMD BS+3
  5148. SCN 77
  5149. NJN SMA1 IF NAMES DO NOT MATCH
  5150. LDM 3,T1
  5151. LPN 77
  5152. UJN SMAX RETURN *MSAL* SELECTION
  5153. TSFN SPACE 4,10
  5154. ** TSFN - TABLE OF SPECIAL FILE NAMES.
  5155. * TABLE MUST BE ARRANGED IN ASCENDING ORDER.
  5156. *
  5157. * ONE CM WORD PER ENTRY -
  5158. *T 42/ FN,6/ MP
  5159. * FN FILE NAME.
  5160. * MP *MSAL* PARAMETER.
  5161.  
  5162.  
  5163. TSFN BSS 0
  5164. TSFNL EQU 4
  5165. VFD 42/0LLGO,6/LGOS
  5166. VFD 42/0LOUTPUT,6/OUTS
  5167. VFD 42/0LPUNCH,6/OUTS
  5168. VFD 42/0LPUNCHB,6/OUTS
  5169. VFD 42/0LP8,6/OUTS
  5170. CON 7777 TERMINATE TABLE
  5171. SPACE 4,10
  5172. SPACE 4,10
  5173. ** COMMON DECKS.
  5174.  
  5175.  
  5176. *CALL COMPRJC
  5177. EJT$ EQU 1 DEFINE EJT ACCESS
  5178. *CALL COMPGFP
  5179. OVERFLOW MSDO,BFMS
  5180. PMS OVERLAY (POSITION MASS STORAGE.),MSDO
  5181. PMS SPACE 4,10
  5182. ** DIRECT LOCATION ASSIGNMENTS.
  5183.  
  5184.  
  5185. BI EQU 35 BACKSPACE INDEX
  5186. RI EQU 36 - 37 RANDOM INDEX (2 LOCATIONS)
  5187. PMS SPACE 4,10
  5188. ** PMS - POSITION MASS STORAGE MAIN ROUTINE.
  5189.  
  5190.  
  5191. PMS SUBR ENTRY/EXIT
  5192. LJM PRS PRESET
  5193. MSR SPACE 4,10
  5194. ** MSR - PROCESS MASS STORAGE ERROR FROM *COMPRNS*.
  5195.  
  5196.  
  5197. MSR SUBR
  5198. LDD T6 SET CURRENT TRACK
  5199. STD FS+2
  5200. LDD T7 SET CURRENT SECTOR
  5201. STD FS+3
  5202. RJM CDA CHECK DEVICE (ERROR PROCESSOR RETURNS)
  5203. UJN MSRX RETURN
  5204. SRC SPACE 4,10
  5205. ** SRC - SET RECALL CONDITIONS.
  5206. *
  5207. * EXIT (FS+2) = UPDATED CURRENT TRACK.
  5208. * (FS+3) = UPDATED CURRENT SECTOR.
  5209. * TO *PMSX* TO ENTER RECALL STACK.
  5210. * TO *ERR* IF ERROR FLAG TERMINATION.
  5211. *
  5212. * CALLS CET.
  5213. *
  5214. * MACROS ENDMS.
  5215.  
  5216.  
  5217. SRC BSS 0 ENTRY
  5218. ENDMS END MASS STORAGE OPERATION
  5219. LDD T6 SET CURRENT TRACK
  5220. STD FS+2
  5221. LDD T7 SET CURRENT SECTOR
  5222. STD FS+3
  5223. RJM CET CHECK ERROR FLAG TERMINATION
  5224. AOM COCA SET RECALL STACK FLAG
  5225. SRC1 UJN PMSX RETURN
  5226. SFP SPACE 4,20
  5227. ** SFP - SET FILE POSITION.
  5228. *
  5229. * ENTRY (FC) = INTERNAL *CIO* FUNCTION CODE.
  5230. * (FO) = FET OPTIONS.
  5231. * (T6) = CURRENT TRACK.
  5232. * (T7) = CURRENT SECTOR.
  5233. * (FS - FS+4) = FST ENTRY.
  5234. * (RI - RI+1) = RANDOM ADDRESS IF *SFPA* SET AND
  5235. * RANDOM FET.
  5236. *
  5237. * EXIT (FS - FS+4) = ADVANCED FST ENTRY.
  5238. * TO *PMSX*.
  5239. *
  5240. * USES DP - DP+4.
  5241. *
  5242. * CALLS SRA.
  5243. *
  5244. * MACROS CFET.
  5245.  
  5246.  
  5247. SFP BSS 0 ENTRY
  5248. LDD T6 SET CURRENT TRACK
  5249. STD FS+2
  5250. LDD T7 SET CURRENT SECTOR
  5251. STD FS+3
  5252. LDN ZERL
  5253. CRD DP
  5254. LDD FO CHECK FET STATUS
  5255. SHN 6
  5256. PJN SRC1 IF NOT RANDOM FET
  5257. SFPA LDN 0
  5258. NJN SFP1 IF RANDOM ADDRESS IS PRESET
  5259. LDD FS+2 CHECK FILE
  5260. ZJN SFP1 IF FILE NOT USED
  5261. LDD FS+1 SET RANDOM ADDRESS
  5262. RJM SRA
  5263. SFP1 LDM ERRA CHECK MS ERROR OCCURRED
  5264. ZJN SFP2 IF NO ERROR
  5265. CFET 6 MERGE RANDOM ADDRESS
  5266. CRD DP
  5267. SFP2 LDD RI+1 ENTER CURRENT RANDOM ADDRESS
  5268. SHN 6
  5269. STD DP+2
  5270. SHN -14
  5271. STD DP+1
  5272. LDD RI
  5273. SHN 6
  5274. RAD DP+1
  5275. SHN -14
  5276. STD DP
  5277. CFET 6 STORE RANDOM ACCESS WORD
  5278. CWD DP
  5279. LJM PMSX EXIT
  5280. TITLE SKIP/OPEN FUNCTION PROCESSORS.
  5281. BKS SPACE 4,15
  5282. ** BKS - BACKSPACE SECTOR.
  5283. *
  5284. * ENTRY (T6) = CURRENT TRACK.
  5285. * (T7) = CURRENT SECTOR.
  5286. * (FS - FS+4) = FST ENTRY.
  5287. *
  5288. * EXIT (T6) = UPDATED CURRENT TRACK.
  5289. * (T7) = UPDATED CURRENT SECTOR.
  5290. * TO *SFS* IF BOI ENCOUNTERED.
  5291. * TO *SFS2* IF PRU BACKSPACE COMPLETE.
  5292. *
  5293. * CALLS BOT, DSC.
  5294.  
  5295.  
  5296. BKS BSS 0 ENTRY
  5297. LDD T6 CHECK CURRENT TRACK
  5298. LMD FS+1
  5299. NJN BKS1 IF NOT FIRST TRACK
  5300. LDD T7 CHECK CURRENT SECTOR
  5301. LMN FSMS
  5302. ZJN SFS IF FIRST SECTOR
  5303. BKS1 SOD T7 DECREMENT SECTOR
  5304. PJN BKS2 IF SAME TRACK
  5305. RJM BOT BACK UP ONE TRACK
  5306. SBN 1 SET LAST SECTOR
  5307. STD T7
  5308. BKS2 RJM DSC DECREMENT SKIP COUNT
  5309. NJN BKS IF SKIP NOT COMPLETE
  5310. UJN SFS2 SET FST STATUS
  5311. SFS SPACE 4,10
  5312. ** SFS - SET FILE STATUS.
  5313. *
  5314. * ENTRY (A) = FST STATUS IF ENTRY AT *SFS2*.
  5315. * AT *SFS* TO SET BOI STATUS IN FET.
  5316. * AT *SFS1* TO SET EOR FST STATUS.
  5317. * AT *SFS2* TO STORE FST STATUS.
  5318. *
  5319. * EXIT (FS+4) = FST STATUS.
  5320. * TO *SFP*.
  5321.  
  5322.  
  5323. SFS BSS 0 ENTRY
  5324. LDD BS+4 SET REWIND FUNCTION STATUS
  5325. LPN 2
  5326. ADN 50
  5327. STD BS+4
  5328. LDC LDNI DISABLE FET STATUS UPDATE
  5329. STM UFSA
  5330.  
  5331. * SET EOR STATUS IN FST.
  5332.  
  5333. SFS1 LDN /CIO/EOR SET EOR FST STATUS
  5334.  
  5335. * SET STATUS IN FST.
  5336.  
  5337. SFS2 STD FS+4 STORE FST STATUS
  5338. LJM SFP EXIT
  5339. SKB SPACE 4,15
  5340. ** SKB - SKIP RECORD/FILE BACKWARD.
  5341. *
  5342. * ENTRY (T6) = CURRENT TRACK.
  5343. * (T7) = CURRENT SECTOR.
  5344. * (FC) = INTERNAL *CIO* FUNCTION CODE.
  5345. * (FS - FS+4) = FST ENTRY.
  5346. *
  5347. * EXIT (T6) = UPDATED CURRENT TRACK.
  5348. * (T7) = UPDATED CURRENT SECTOR.
  5349. * TO *SFS* IF BOI ENCOUNTERED.
  5350. * TO *SFS1* OR *SFS2* IF SKIP COMPLETE.
  5351. *
  5352. * CALLS BKR, DSC, SMS.
  5353.  
  5354.  
  5355. SKB BSS 0 ENTRY
  5356. RJM SMS LOAD MASS STORAGE DRIVER
  5357. SKB0 LDD T6 CHECK CURRENT TRACK
  5358. LMD FS+1
  5359. NJN SKB1 IF NOT FIRST TRACK
  5360. LDD T7 CHECK CURRENT SECTOR
  5361. LMN FSMS
  5362. ZJN SFS IF FIRST SECTOR
  5363. SKB1 RJM BKR BACKSPACE RECORD
  5364. LDD FC
  5365. LPN 14
  5366. LMN /CIO/EOF
  5367. NJN SKB2 IF NOT SKIP TO EOF
  5368. LDD T1
  5369. SHN 21-13
  5370. PJN SKB0 IF NOT EOF
  5371. SKB2 RJM DSC DECREMENT SKIP COUNT
  5372. NJN SKB0 IF SKIP NOT COMPLETE
  5373. LDD T1 GET EOF INDICATOR
  5374. SHN 0-13
  5375. ZJN SFS1 IF NOT EOF
  5376. LDN /CIO/EOF
  5377. UJN SFS2 SET FST STATUS
  5378. SKF SPACE 4,15
  5379. ** SKF - SKIP RECORD/FILE FORWARD.
  5380. *
  5381. * ENTRY (T6) = CURRENT TRACK.
  5382. * (T7) = CURRENT SECTOR.
  5383. * (FC) = INTERNAL *CIO* FUNCTION CODE.
  5384. *
  5385. * EXIT (PC) = PRU COUNT.
  5386. * TO *SFP* IF SKIP COMPLETE.
  5387. * TO *SRC* TO ENTER RECALL STACK.
  5388. *
  5389. * CALLS CRT, DSC, RNS, SMS.
  5390. *
  5391. * MACROS ENDMS.
  5392.  
  5393.  
  5394. SKF5 LCN 0 RESET PRU COUNT
  5395. STD PC
  5396. LJM SRC SET RECALL CONDITIONS
  5397.  
  5398. SKF BSS 0 ENTRY
  5399. RJM SMS LOAD MASS STORAGE DRIVER
  5400. SKF0 LDD T7 CHECK FOR NEW ENTRY
  5401. SKFA EQU *-1
  5402. * LJM SFP (MASS STORAGE ERROR)
  5403. NJN SKF1 IF NOT NEW TRACK
  5404. RJM CRT CHECK RECALL TIME
  5405. SKF1 AOD PC INCREMENT PRU COUNT
  5406. SHN -14
  5407. NJN SKF5 IF PRU COUNT EXCEEDS 12 BITS
  5408. LDC BFMS+DTSF READ NEXT SECTOR HEADER WORD
  5409. RJM RNS
  5410. SHN -6
  5411. NJN SKF0 IF NOT EOR
  5412. LDM BFMS
  5413. ADM BFMS+1
  5414. ZJN SKF4 IF EOI
  5415. LDD FC
  5416. LPN 14
  5417. LMN /CIO/EOF
  5418. NJN SKF2 IF NOT SKIP TO EOF
  5419. LDM BFMS
  5420. NJN SKF0 IF NOT EOF
  5421. SKF2 RJM DSC DECREMENT SKIP COUNT
  5422. NJN SKF0 IF SKIP NOT COMPLETE
  5423. LDM BFMS
  5424. ZJN SKF3 IF EOF
  5425. LDN /CIO/EOR&/CIO/EOF
  5426. SKF3 LMN /CIO/EOF&/CIO/EOI
  5427. SKF4 LMN /CIO/EOI
  5428. STD FS+4 SET FST STATUS
  5429. ENDMS END MASS STORAGE OPERATION
  5430. LJM SFP EXIT
  5431. SKP SPACE 4,20
  5432. ** SKP - SKIP PROCESSOR.
  5433. *
  5434. * ENTRY (FC) = INTERNAL *CIO* FUNCTION CODE.
  5435. * (T6) = CURRENT TRACK.
  5436. * (T7) = CURRENT SECTOR.
  5437. * (BS - BS+4) = (FET+0).
  5438. * (FS - FS+4) = FST ENTRY.
  5439. *
  5440. * EXIT (BS+4) = REWIND STATUS IF BOI ENCOUNTERED ON
  5441. * BACKWARD SKIP.
  5442. * (FS - FS+4) = UPDATED FST ENTRY.
  5443. * TO *BKS* IF BACKSPACE PRU FUNCTION.
  5444. * TO *SKB* IF BACKSPACE RECORD/FILE FUNCTION.
  5445. * TO *SKF* IF SKIP RECORD/FILE FORWARD.
  5446. * TO *SFP* IF FORWARD SKIP ON NULL FILE OR *SKIPEI*.
  5447. * TO *SFS* IF BACKWARD SKIP ON NULL FILE.
  5448. *
  5449. * USES T1.
  5450. *
  5451. * CALLS CET, SEI.
  5452.  
  5453.  
  5454. SKP BSS 0 ENTRY
  5455. LDD T6 CHECK CURRENT TRACK
  5456. NJN SKP1 IF FILE USED
  5457. LDD FC
  5458. SHN -13
  5459. ZJN SKP3 IF FORWARD SKIP
  5460. LJM SFS SET BOI STATUS
  5461.  
  5462. SKP1 RJM CET CHECK ERROR TERMINATION
  5463. LDD FC
  5464. SHN -13
  5465. STD T1 0 = SKIP FORWARD, 1 = SKIP BACKWARD
  5466. NJN SKP4 IF BACKWARD SKIP
  5467. LDD FC CHECK FOR *SKIPEI*
  5468. LPN 14
  5469. LMN /CIO/EOI
  5470. NJN SKP5 IF NOT SKIP TO EOI
  5471. LDD FO
  5472. SHN 6
  5473. PJN SKP2 IF NOT RANDOM FET
  5474. LDD FS+1 START AT FIRST TRACK TO GET FILE LENGTH
  5475. STD T6
  5476. AOM SFPA INDICATE THAT *RI* IS PRESET
  5477. SKP2 RJM SEI SKIP TO END OF INFORMATION
  5478. LDD T2 SET RELATIVE SECTOR ADDRESS
  5479. STD RI
  5480. LDD T3
  5481. STD RI+1
  5482. SKP3 LDN /CIO/EOI
  5483. STD FS+4 SET EOI FST STATUS
  5484. LJM SFP EXIT
  5485.  
  5486. SKP4 LDD FC CHECK TERMINATION CONDITION
  5487. LPN 14
  5488. ZJN SKP5 IF BACKSPACE PRU
  5489. AOD T1 2 = SKIP RECORD/FILE BACKWARD
  5490. LDD FS+3 INITIALIZE BACKSPACE SECTOR
  5491. STM BKRA
  5492. LDD FS+2 INITIALIZE BACKSPACE TRACK
  5493. STM BKRB
  5494. SKP5 LDM TSPA,T1
  5495. STD T1
  5496. LJM 0,T1 PROCESS SKIP FUNCTION
  5497.  
  5498.  
  5499. TSPA BSS 0 TABLE OF SKIP PROCESSOR ADDRESSES
  5500. LOC 0
  5501. CON SKF SKIP FORWARD
  5502. CON BKS BACKSPACE PRU
  5503. CON SKB SKIP RECORD/FILE BACKWARD
  5504. LOC *O
  5505. OPE SPACE 4,15
  5506. ** OPE - OPEN FILE.
  5507. *
  5508. * ENTRY (FC) = INTERNAL *CIO* FUNCTION CODE.
  5509. * (FO) = FET OPTIONS.
  5510. *
  5511. * EXIT TO *REW* IF OPEN/REWIND.
  5512. * TO *SFP* IF OPEN/NO REWIND.
  5513. *
  5514. * USES CM - CM+4.
  5515. *
  5516. * CALLS LRI.
  5517. *
  5518. * MACROS CFET.
  5519.  
  5520.  
  5521. OPE BSS 0 ENTRY
  5522. LDD FO CHECK SPECIAL PROCESSING
  5523. SHN 6
  5524. PJN OPE1 IF NOT RANDOM FILE
  5525. LDM FETL CHECK FET LENGTH
  5526. SBN 3
  5527. MJN OPE1 IF NO INDEX WORD IN FET
  5528. RJM LRI LOAD RANDOM INDEX
  5529. OPE1 CFET 4 READ LIMIT
  5530. CRD CM
  5531. LDN 1 SET PRU SIZE
  5532. STD CM+2
  5533. LDD CM+3
  5534. LPN 37
  5535. STD CM+3
  5536. CFET 4 STORE LIMIT
  5537. CWD CM
  5538. LDM CFNB CLEAR FILE OPENED AND WRITTEN BITS
  5539. LPN 71
  5540. LMN 04 SET FILE OPENED STATUS
  5541. STM CFNB
  5542. LDD FC CHECK FOR OPEN/REWIND OPERATION
  5543. SHN 21-13
  5544. PJN OPE2 IF NO REWIND
  5545. LJM REW REWIND FILE
  5546.  
  5547. OPE2 LJM SFP RETURN
  5548. TITLE SKIP/OPEN SUBROUTINES.
  5549. BKR SPACE 4,20
  5550. ** BKR - BACKSPACE RECORD.
  5551. *
  5552. * ENTRY (T4 - T7) = MS PARAMETERS.
  5553. * (BI) = BACKSPACE INDEX.
  5554. * (FS - FS+4) = FST ENTRY.
  5555. * DRIVER PRESET.
  5556. *
  5557. * EXIT (BIT 13B OF T1) = 1 IF EOF.
  5558. * (T6 - T7) UPDATED.
  5559. * (BI) = ADVANCED BACKSPACE INDEX.
  5560. * (PC) = ACCUMULATED PRUS TRANSFERRED COUNT.
  5561. * (FS - FS+4) = UPDATED FST ENTRY.
  5562. * TO *SRC* IF PRU TRANSFER LIMIT.
  5563. * TO *CDA*, IF MASS STORAGE ERROR.
  5564. *
  5565. * USES T1.
  5566. *
  5567. * CALLS BOT, CET, CRT, RNS.
  5568. *
  5569. * MACROS ENDMS.
  5570.  
  5571.  
  5572. BKR SUBR ENTRY/EXIT
  5573.  
  5574. * SET PREVIOUS END OF RECORD POSITION FROM BUFFER IF POSSIBLE.
  5575.  
  5576. LDD BI
  5577. ZJN BKR5 IF BACKSPACE INDEX EMPTY
  5578. LDD T7 SET CURRENT SECTOR
  5579. STD FS+3
  5580. BKR1 SOD BI DECREMENT INDEX
  5581. LDM BKRB SET TRACK
  5582. STD T6
  5583. LDM BBUF,BI SET EOF STATUS
  5584. STD T1
  5585. LPC 3777 SET SECTOR
  5586. STD T7
  5587. NJN BKR2 IF NOT FIRST SECTOR OF NEXT TRACK
  5588. LDD FS+2 SET NEXT TRACK
  5589. STD T6
  5590. BKR2 LDD FS+3 COUNT PRUS TRANSFERRED
  5591. NJN BKR3 IF NOT NEXT TRACK
  5592. LDM SLM SECTORS PER TRACK
  5593. BKR3 SBD T7
  5594. RAD PC
  5595. UJN BKRX RETURN
  5596.  
  5597. BKR4 LJM SRC ENTER RECALL STACK
  5598.  
  5599. * BACKSPACE UP TO *MPTB* SECTORS OR BEGINNING OF TRACK.
  5600.  
  5601. BKR5 LDC 0 SET PRIOR TRACK/SECTOR POSITION
  5602. BKRA EQU *-1
  5603. STD T7
  5604. STD FS+3
  5605. LDC 0
  5606. BKRB EQU *-1
  5607. STD T6
  5608. STD FS+2
  5609. RJM CET CHECK ERROR TERMINATION
  5610. RJM CRT CHECK RECALL TIME
  5611. LDD PC
  5612. ADC MPTB
  5613. SHN -14
  5614. NJN BKR4 IF PRU TRANSFER LIMIT
  5615. LDD T7 CHECK SECTOR
  5616. NJN BKR6 IF NOT FIRST SECTOR
  5617. RJM BOT BACK UP ONE TRACK
  5618. BKR6 ADC -MPTB CHECK NUMBER OF SECTORS
  5619. PJN BKR7 IF NUMBER OF SECTORS .GT. BUFFER SIZE
  5620. LDN 0 POSITION TO FIRST SECTOR
  5621. BKR7 STD T7 SET SECTOR
  5622. STM BKRA
  5623. LDD T6 SAVE CURRENT TRACK
  5624. STM BKRB
  5625. LMD FS+1
  5626. NJN BKR8 IF NOT FIRST TRACK
  5627. LDD T7
  5628. NJN BKR8 IF NOT FIRST SECTOR
  5629. LDN FSMS SET FIRST SECTOR
  5630. STD T7
  5631. STM BKRA
  5632. STM BBUF,BI
  5633. AOD BI
  5634. UJN BKR10 CONTINUE PROCESSING AT BOI
  5635.  
  5636. * SCAN TRACK AND SET END OF RECORD POSITIONS.
  5637.  
  5638. BKR8 LDC BFMS+DTSF READ NEXT SECTOR HEADER WORDS
  5639. RJM RNS
  5640. SHN -6 CHECK WORD COUNT
  5641. NJN BKR10 IF FULL SECTOR
  5642. LDD T7 SET SECTOR
  5643. STM BBUF,BI
  5644. LDM BFMS CHECK CONTROL BYTE
  5645. NJN BKR9 IF EOR
  5646. LDM BFMS+1 CHECK FOR EOI
  5647. ZJN BKR11 IF EOI ENCOUNTERED
  5648. LDC 4000 SET EOF STATUS
  5649. RAM BBUF,BI
  5650. BKR9 AOD BI ADVANCE BACKSPACE INDEX
  5651. BKR10 LDD T7 CHECK CURRENT POSITION
  5652. LMD FS+3
  5653. NJN BKR8 IF CURRENT POSITION NOT REACHED
  5654. LDD T6
  5655. LMD FS+2
  5656. NJN BKR8 IF CURRENT POSITION NOT REACHED
  5657. LDM RCRF
  5658. SHN 21-11
  5659. MJN BKR11 IF NOT AT ORIGINAL POSITION
  5660.  
  5661. * IGNORE END OF RECORD IF CURRENT POSITION REACHED
  5662.  
  5663. LDD T1 CHECK WORD COUNT OF SECTOR
  5664. SHN -6
  5665. NJN BKR11 IF NOT END OF RECORD
  5666. SOD BI DECREMENT INDEX
  5667. BKR11 ENDMS END MASS STORAGE OPERATION
  5668. LDM RCRF SET POSITION CHANGED FLAG
  5669. LPC 6777
  5670. LMD TH
  5671. STM RCRF
  5672. LDD BI
  5673. ZJN BKR12 IF BACKSPACE INDEX EMPTY
  5674. LJM BKR1 RETURN NEXT RECORD LOCATION
  5675.  
  5676. BKR12 LDD FS+3 COUNT PRUS TRANSFERRED
  5677. NJN BKR13 IF NOT NEXT TRACK
  5678. LDM SLM SECTORS PER TRACK
  5679. BKR13 SBM BKRA
  5680. RAD PC
  5681. LJM BKR5 CONTINUE BACKSPACE
  5682. BOT SPACE 4,15
  5683. ** BOT - BACK ONE TRACK.
  5684. *
  5685. * ENTRY (T6) = CURRENT TRACK.
  5686. * (FS+1) = FIRST TRACK.
  5687. *
  5688. * EXIT (T6) = PREVIOUS TRACK.
  5689. * (A) = SECTOR LIMIT FOR TRACK.
  5690. *
  5691. * USES T3.
  5692. *
  5693. * CALLS SNT.
  5694.  
  5695.  
  5696. BOT1 LMD T3 SET NEXT TRACK
  5697. BOT2 STD T6
  5698. RJM SNT
  5699. LMD T3
  5700. NJN BOT1 IF NEXT TRACK NOT EQUAL TO CURRENT TRACK
  5701. LDM SLM
  5702.  
  5703. BOT SUBR ENTRY/EXIT
  5704. LDD T6 SAVE CURRENT TRACK
  5705. STD T3
  5706. LDD FS+1 SET FIRST TRACK
  5707. UJN BOT2 ENTER LOOP
  5708. CET SPACE 4,10
  5709. ** CET - CHECK ERROR TERMINATION.
  5710. *
  5711. * EXIT TO *ERR* IF ERROR FLAG TERMINATION.
  5712. *
  5713. * USES CM - CM+4.
  5714.  
  5715.  
  5716. CET SUBR ENTRY/EXIT
  5717. LDD CP CHECK ERROR FLAG
  5718. ADN STSW
  5719. CRD CM
  5720. LDD CM+1
  5721. SBN SPET
  5722. MJN CETX IF NOT SPECIAL ERROR
  5723. ERROR EFT *ERROR FLAG TERMINATION*
  5724. CRT SPACE 4,10
  5725. ** CRT - CHECK RECALL TIME.
  5726. *
  5727. * ENTRY FIRST CALL STARTS TIMING. ELAPSED TIME OF EACH
  5728. * INTERVAL IS KEPT TO MINIMIZE CLOCK OVERFLOW.
  5729. *
  5730. * EXIT TO *SRC* IF PROCESSING TIME EXCEEDED.
  5731. *
  5732. * USES CM - CM+4.
  5733.  
  5734.  
  5735. CRT2 AOM CRTA INDICATE TIME ACCUMULATION STARTED
  5736. CRT3 LDD CM+4 SAVE CURRENT CLOCK VALUE
  5737. STM CRTB
  5738.  
  5739. CRT SUBR ENTRY/EXIT
  5740. LDC RTCL READ REAL TIME CLOCK
  5741. CRD CM
  5742. LDC 0 ELAPSED TIME
  5743. CRTA EQU *-1
  5744. ZJN CRT2 IF FIRST CALL
  5745. LDD CM+4 CALCULATE TIME SINCE LAST CALL
  5746. SBM CRTB
  5747. PJN CRT1 IF NO OVERFLOW
  5748. ADC 10000
  5749. CRT1 RAM CRTA ACCUMULATED PROCESSING TIME
  5750. ADC -RSPT
  5751. MJN CRT3 IF TIME NOT EXCEEDED
  5752. LJM SRC SET RECALL CONDITIONS
  5753.  
  5754.  
  5755. CRTB CON 0 PREVIOUS CLOCK VALUE
  5756. DSC SPACE 4,10
  5757. ** DSC - DECREMENT SKIP COUNT.
  5758. *
  5759. * EXIT (A) = 0, IF SKIP COMPLETE.
  5760. * SKIP COUNT IN (IR+2 - IR+3) DECREMENTED BY ONE.
  5761. *
  5762. * USES T0.
  5763.  
  5764.  
  5765. DSC SUBR ENTRY/EXIT
  5766. LDD IR+3 GET SKIP COUNT
  5767. SCN 77
  5768. STD T0
  5769. SHN 6
  5770. LMD IR+2
  5771. SHN 6
  5772. SBN 1
  5773. ZJN DSCX IF SKIP COMPLETE
  5774. SHN 14 RESET SKIP COUNT
  5775. STD IR+2
  5776. SHN -6
  5777. SCN 77
  5778. LMD T0
  5779. LMD IR+3
  5780. STD IR+3
  5781. LDN 1 INDICATE SKIP NOT COMPLETE
  5782. UJN DSCX RETURN
  5783. LRI SPACE 4,15
  5784. ** LRI - LOAD RANDOM INDEX.
  5785. *
  5786. * ENTRY (FS - FS+4) = FST ENTRY.
  5787. *
  5788. * EXIT (FS - FS+4) UPDATED.
  5789. * (PC) = ACCUMULATED PRU COUNT TRANSFERRED.
  5790. * TO *CDA*, IF MASS STORAGE ERROR.
  5791. *
  5792. * USES PC, T1, T2, T6, T7, CM - CM+4, LM - LM+1, IN - IN+1.
  5793. *
  5794. * CALLS BKR, DDT, MSR, RNS, SEI, SMS, VAL.
  5795. *
  5796. * MACROS CFET, ENDMS, ERROR, NFA, SFA.
  5797.  
  5798.  
  5799. LRI SUBR ENTRY/EXIT
  5800. CFET 7 READ (FET+7)
  5801. CRD CM
  5802. LDD CM+3 CHECK INDEX LENGTH
  5803. SCN 77
  5804. SHN 6
  5805. LMD CM+2
  5806. ZJN LRIX IF INDEX LENGTH = 0
  5807. SHN 6
  5808. STD LM+1
  5809. SHN -14
  5810. LPN 37
  5811. STD LM
  5812. LDD CM+3 CHECK FWA
  5813. LPN 37
  5814. STD IN
  5815. SHN 14
  5816. LMD CM+4
  5817. STD IN+1
  5818. SBN 2
  5819. PJN LRI2 IF INDEX ADDRESS .GE. 2
  5820. LRI1 ERROR FPE *FET PARAMETER ERROR*
  5821.  
  5822. LRI2 ADN 2
  5823. SHN 6
  5824. ADD LM
  5825. SHN 14
  5826. ADD LM+1
  5827. SHN -6
  5828. SBD FL
  5829. PJN LRI1 IF INDEX BUFFER LWA+1 .GE. FL
  5830. LDM RCRF
  5831. SHN 21-6
  5832. MJN LRI6 IF CONTINUATION OF BACKSPACE
  5833. LDN ZERL
  5834. CRD CM
  5835. LDN 0
  5836. STD T1
  5837. STD T2
  5838.  
  5839. * ZERO INDEX AREA.
  5840.  
  5841. LRI3 LDD IN CLEAR INDEX AREA
  5842. ADD T1
  5843. SHN 6
  5844. ADD RA
  5845. SHN 6
  5846. ADD IN+1
  5847. ADD T2
  5848. CWD CM
  5849. AOD T2
  5850. SHN -14
  5851. RAD T1
  5852. LMD LM
  5853. NJN LRI3 IF NOT END OF INDEX AREA
  5854. LDD T2
  5855. LMD LM+1
  5856. NJN LRI3 IF NOT END OF INDEX AREA
  5857. LDD T6 CHECK TRACK
  5858. NJN LRI5 IF FILE USED
  5859. LRI4 LJM LRIX RETURN
  5860.  
  5861. LRI5 RJM SEI SKIP FROM CURRENT POSITION TO EOI
  5862. LDD T6
  5863. LMD FS+1
  5864. LRI6 NJN LRI7 IF MORE THAN ONE TRACK ON FILE
  5865. LDD T7
  5866. LMN FSMS
  5867. ZJN LRI4 IF FILE CONTAINS ONLY AN EOI
  5868. LRI7 LDN 0 CHECK READ SECURITY
  5869. RJM VAL VALIDATE FILE ACCESS LEVEL
  5870. LDD T7 INITIALIZE BACKSPACE SECTOR
  5871. STM BKRA
  5872. LDD T6 INITIALIZE BACKSPACE TRACK
  5873. STM BKRB
  5874. RJM SMS LOAD MASS STORAGE DRIVER
  5875. RJM BKR BACKSPACE RECORD
  5876. LDD PC CHARGE FOR PRUS TRANSFERRED
  5877. SHN IMPT
  5878. RAM CFNH+1
  5879. SHN -14
  5880. RAM CFNH
  5881. LDN 0 CLEAR PRU COUNT
  5882. STD PC
  5883. SFA EST,T5 CHECK IF DEVICE BUFFERED IN ECS
  5884. ADK EQDE
  5885. CRD CM
  5886. LDD CM+4
  5887. SHN 3
  5888. ADN DILL
  5889. CRD CM
  5890. LDD CM+3
  5891. SHN 21-13
  5892. PJN LRI8 IF DEVICE NOT BUFFERED IN ECS
  5893. LJM LRI11 PROCESS DIRECT TRANSFER
  5894.  
  5895. * READ RANDOM INDEX AND STORE INTO BUFFER.
  5896.  
  5897. LRI8 LDC BFMS READ NEXT SECTOR
  5898. RJM RNS
  5899. ZJN LRI9 IF ZERO LENGTH SECTOR
  5900. AOD PC ADVANCE SECTOR COUNT
  5901. LDD LM
  5902. SHN 14
  5903. ADD LM+1
  5904. SBD T1
  5905. PJN LRI10 IF ROOM FOR SECTOR
  5906. AOM LRIB SET INDEX TOO LARGE FLAG
  5907. LDD LM+1
  5908. STD T1
  5909. NJN LRI10 IF ROOM LEFT IN INDEX AREA
  5910. LRI9 LJM LRI14 COMPLETE PROCESSING
  5911.  
  5912. LRI10 LDD IN STORE SECTOR
  5913. SHN 6
  5914. ADD RA
  5915. SHN 6
  5916. ADD IN+1
  5917. CWM BFMS+2,T1
  5918. LDD T1 ADVANCE ADDRESS
  5919. RAD IN+1
  5920. SHN -14
  5921. RAD IN
  5922. LDD LM DECREMENT LENGTH
  5923. SHN 14
  5924. ADD LM+1
  5925. SBD T1
  5926. STD LM+1
  5927. SHN -14
  5928. STD LM
  5929. LDD T1
  5930. SHN -6
  5931. LRIA ZJN LRI9 IF EOR
  5932. * UJN LRI9 (AFTER MS ERROR)
  5933. LJM LRI8 LOOP TO EOR
  5934.  
  5935. * DIRECT TRANSFER RANDOM INDEX FOR ECS BUFFERED DEVICE.
  5936.  
  5937. LRI11 LDD IN SET FWA INDEX AREA
  5938. STD CM+3
  5939. SHN 14
  5940. ADD IN+1
  5941. STD CM+4
  5942. RAD LM+1 SET LWA INDEX AREA
  5943. SHN -14
  5944. RAD LM
  5945. SHN 14
  5946. ADD LM+1
  5947. SHN 14
  5948. STD CM+2
  5949. SHN -14
  5950. SHN 6
  5951. RAD CM+3
  5952. LDC RDDS*10000+7777 DIRECT READ TO EOR
  5953. RJM DDT
  5954. PJN LRI13 IF NO ERROR
  5955. SHN 21-20
  5956. MJN LRI12 IF TRANSFER TRUNCATED
  5957. RJM CDA CHECK DEVICE
  5958.  
  5959. LRI12 AOM LRIB SET INDEX TOO LARGE FLAG
  5960. LRI13 LDD T4 SET PRU TRANSFERRED COUNT
  5961. STD PC
  5962.  
  5963. * COMPLETE PROCESSING.
  5964.  
  5965. LRI14 ENDMS END MASS STORAGE OPERATION
  5966. LDD PC CHECK SECTOR COUNT
  5967. NJN LRI16 IF INDEX TRANSFERRED
  5968. LDD FC CHECK FOR REWIND REQUEST
  5969. SHN 21-13
  5970. MJN LRI15 IF REWIND REQUESTED
  5971. NFA FA,R RETAIN ORIGINAL POSITION AND STATUS
  5972. ADN FSTL
  5973. CRD FS
  5974. LDD FS+2 RESET CURRENT POSITION
  5975. STD T6
  5976. LDD FS+3
  5977. STD T7
  5978.  
  5979. * CLEAR RANDOM FILE BIT.
  5980.  
  5981. LRI15 CFET 1 READ FIRST
  5982. CRD CM
  5983. LDD CM+1 CLEAR RANDOM BIT
  5984. LPC 3777
  5985. STD CM+1
  5986. CFET 1 STORE FIRST
  5987. CWD CM
  5988. LJM LRIX RETURN
  5989.  
  5990. * PROCESS INDEX TOO LARGE.
  5991.  
  5992. LRI16 LDM BFMS+1 SET FET STATUS
  5993. SHN 2-6
  5994. LPN 4
  5995. LMN 4
  5996. STD FS+4
  5997. LRIB LDN 0
  5998. * LDN 1 (INDEX TRUNCATED)
  5999. ZJN LRI18 IF INDEX NOT TRUNCATED
  6000. LDM ERRA CHECK FOR MASS STORAGE ERROR
  6001. NJN LRI18 IF MASS STORAGE ERROR
  6002. LDD FO CHECK ERROR PROCESSING SELECTED
  6003. SHN 21-10
  6004. MJN LRI17 IF ERROR PROCESSING SELECTED
  6005. ERROR ITL *INDEX TOO LARGE ON OPEN*
  6006.  
  6007. LRI17 LDC 23S9 SET STATUS = 23B
  6008. RAD BS+4
  6009. SHN -14
  6010. RAD BS+3
  6011. LDM FETL CHECK FET LENGTH
  6012. SBN 2
  6013. MJN LRI18 IF NO DETAILED STATUS FIELD
  6014. CFET 6 CLEAR DETAILED STATUS FIELD
  6015. CRD CM
  6016. LDN 0
  6017. STD CM+3
  6018. STD CM+4
  6019. CFET 6
  6020. CWD CM
  6021. LRI18 LJM LRIX RETURN
  6022. SPACE 4,10
  6023. ** COMMON DECKS.
  6024.  
  6025.  
  6026. IRA$ EQU 1 SET INITIALIZATION
  6027. *CALL COMPCRA
  6028. LIST X
  6029. *CALL COMPDDT
  6030. LIST -X
  6031.  
  6032. MSR$ EQU 1 DEFINE ERROR PROCESSING
  6033. *CALL COMPRNS
  6034. *CALL COMPSEI
  6035. *CALL COMPSNT
  6036. *CALL COMPSRA
  6037. SPACE 4,10
  6038. BBUF BSS 0 BACKSPACE BUFFER
  6039.  
  6040. ERRNG BFMS-BBUF-MPTB CHECK FOR BACKSPACE BUFFER OVERFLOW
  6041.  
  6042. QUAL
  6043. EPSO EQU *+5 END OF POSITION OVERLAY
  6044. .ERPO MAX EWTO,ERDO,EPSO CALCULATE MAXIMUM OVERLAY SIZE
  6045. ERPO EQU .ERPO ERROR PROCESSING OVERLAY ORIGIN
  6046. QUAL *
  6047. TITLE RANDOM ACCESS PROCESSORS.
  6048. RRD SPACE 4,15
  6049. ** RRD - PROCESS RANDOM READ.
  6050. *
  6051. * ENTRY (FC) = INTERNAL *CIO* FUNCTION CODE.
  6052. * (DP - DP+4) = (FET+6).
  6053. * (FS - FS+4) = FST ENTRY.
  6054. *
  6055. * EXIT (FS - FS+4) = ADVANCED FST ENTRY.
  6056. * (RI - RI+1) = RANDOM ADDRESS.
  6057. * TO *SFP* TO COMPLETE PROCESSING.
  6058. *
  6059. * ERROR TO *ERR* IF RANDOM ADDRESS ERROR.
  6060. *
  6061. * CALLS CRA.
  6062. *
  6063. * MACROS ERROR.
  6064.  
  6065.  
  6066. RRD2 LDD FC
  6067. LPC 1700
  6068. ZJN RRD3 IF READ
  6069. LDD FS+4 SET LAST OPERATION COMPLETE WRITE
  6070. SCN 16
  6071. LMN 6
  6072. STD FS+4
  6073. RRD3 LDD DP+3 RESET RANDOM ADDRESS
  6074. STD RI
  6075. LDD DP+4
  6076. STD RI+1
  6077. AOM SFPA INDICATE *RI* IS PRESET
  6078. LJM SFP PROCESS EXIT
  6079.  
  6080. RRD BSS 0 ENTRY
  6081. LDD DP+3 SET RANDOM ADDRESS
  6082. STD RI
  6083. LDD DP+4
  6084. STD RI+1
  6085. LDD FS+2
  6086. ZJN RRD1 IF FILE NOT WRITTEN ON
  6087. LDD FS+1 SET FIRST TRACK
  6088. STD T6
  6089. RJM CRA CONVERT RANDOM ADDRESS
  6090. PJN RRD2 IF SECTOR ON FILE
  6091. RRD1 ERROR RAD *RANDOM ADDRESS NOT ON FILE*
  6092. RWT SPACE 4,20
  6093. ** RWT - PROCESS RANDOM WRITE.
  6094. *
  6095. * ENTRY (FC) = INTERNAL *CIO* FUNCTION CODE.
  6096. * (DP - DP+4) = (FET+6).
  6097. * (FS - FS+4) = FST ENTRY.
  6098. *
  6099. * EXIT (FC) = UPDATED INTERNAL *CIO* FUNCTION CODE.
  6100. * (RI - RI+1) = RANDOM ADDRESS.
  6101. * TO *RRD* IF REWRITE OPERATION.
  6102. * TO *SFP* IF RANDOM WRITE AT EOI.
  6103. *
  6104. * USES T2, T3, T6, CM - CM+4.
  6105. *
  6106. * CALLS SEI.
  6107. *
  6108. * MACROS ERROR.
  6109.  
  6110.  
  6111. RWT BSS 0 ENTRY
  6112. LDD FC
  6113. SHN 21-12
  6114. MJN RRD IF REWRITE FUNCTION
  6115. LDD DP+2 CHECK FOR REWRITE
  6116. LPN 40
  6117. ZJN RWT1 IF NOT REWRITE IN PLACE
  6118. LDC 2000 SET REWRITE FLAG IN FUNCTION CODE
  6119. RAD FC
  6120. STM ICFC
  6121. UJN RRD CONVERT RANDOM ADDRESS
  6122.  
  6123. * RANDOM WRITE AT END OF INFORMATION.
  6124.  
  6125. RWT1 LDD DP+3 CHECK RETURN ADDRESS
  6126. LPN 37
  6127. STD DP+3
  6128. SHN 14
  6129. LMD DP+4
  6130. SBN 2
  6131. MJN RWT2 IF .LT. 2
  6132. ADN 2
  6133. SHN -6
  6134. SBD FL
  6135. MJN RWT3 IF .LT. FL
  6136. RWT2 ERROR RWT *INDEX ADDRESS OUT OF RANGE*
  6137.  
  6138. RWT3 LDD FS+2 CHECK CURRENT TRACK
  6139. NJN RWT4 IF FILE USED
  6140. STD T2 SET FIRST SECTOR
  6141. LDN FSMS
  6142. STD T3
  6143. UJN RWT5 UPDATE RESPONSE WORD
  6144.  
  6145. * SKIP FROM BEGINNING OF FILE TO EOI AND CALCULATE LENGTH.
  6146.  
  6147. RWT4 LDD FS+1
  6148. STD T6
  6149. RJM SEI SEARCH FOR EOI
  6150. RWT5 LDD DP+3 READ RESPONSE WORD
  6151. SHN 6
  6152. ADD RA
  6153. SHN 6
  6154. ADD DP+4
  6155. CRD CM
  6156. LDD T2 SET RANDOM INDEX
  6157. STD CM+3
  6158. STD RI
  6159. LDD T3
  6160. STD CM+4
  6161. STD RI+1
  6162. LDD DP+3 STORE RESPONSE WORD
  6163. SHN 6
  6164. ADD RA
  6165. SHN 6
  6166. ADD DP+4
  6167. CWD CM
  6168. AOM SFPA INDICATE *RI* IS PRESET
  6169. LJM SFP EXIT
  6170. TITLE POSITION MASS STORAGE PRESET.
  6171. PRS SPACE 4,15
  6172. ** PRS - POSITION MASS STORAGE PRESET ROUTINE.
  6173. *
  6174. * ENTRY (FC) = INTERNAL *CIO* FUNCTION CODE.
  6175. * (FS - FS+4) = FST ENTRY.
  6176. *
  6177. * EXIT (T5) = EST ORDINAL.
  6178. * (T6) = CURRENT TRACK.
  6179. * (T7) = CURRENT SECTOR.
  6180. * (BI) = 0.
  6181. * (RI - RI+1) = 1.
  6182. * TO *CFN* IF INCORRECT *CIO* FUNCTION CODE.
  6183. *
  6184. * USES T1, CM - CM+4.
  6185. *
  6186. * CALLS CHG, IRA.
  6187.  
  6188.  
  6189. PRS BSS 0 ENTRY
  6190. LDN 0 CLEAR BACKSPACE INDEX
  6191. STD BI
  6192. LDD FS SET EST ORDINAL
  6193. STD T5
  6194. LDD FS+2 SET TRACK
  6195. STD T6
  6196. ZJN PRS1 IF FILE NOT USED
  6197. RJM IRA INITIALIZE RANDOM ACCESS
  6198.  
  6199. * IDENTIFY FUNCTION.
  6200.  
  6201. PRS1 LDD FS+3 SET SECTOR
  6202. STD T7
  6203. LDN 0
  6204. STD RI PRESET RANDOM INDEX
  6205. LDN FSMS
  6206. STD RI+1
  6207. LDD FC SET FUNCTION INDEX
  6208. SHN -6
  6209. LPN 17
  6210. STD T1
  6211. SBN TFPAL
  6212. PJN PRS2 IF FUNCTION NOT IN TABLE
  6213. LDM TFPA,T1 SET PROCESSING ADDRESS
  6214. ZJN PRS2 IF FUNCTION PROCESSOR NOT DEFINED
  6215. STD T1
  6216. LJM 0,T1 JUMP TO PROCESSOR
  6217.  
  6218. PRS2 LDK SWET SET SYSTEM SOFTWARE ERROR
  6219. RJM CHG CONDITIONALLY HANG PP
  6220. LJM CFN COMPLETE FUNCTION
  6221.  
  6222.  
  6223. TFPA INDEX TABLE OF FUNCTION PROCESSOR ADDRESSES
  6224.  
  6225. TFPAL1 MAX /CIO/RDF,/CIO/WTF,/CIO/SKP,/CIO/OPE
  6226. TFPAL EQU TFPAL1+1 TABLE LENGTH
  6227.  
  6228. INDEX /CIO/RDF,RRD RANDOM READ
  6229. INDEX /CIO/WTF,RWT RANDOM WRITE
  6230. INDEX /CIO/SKP,SKP SKIP
  6231. INDEX /CIO/OPE,OPE OPEN
  6232. INDEX TFPAL END OF TABLE
  6233. SMS SPACE 4,10
  6234. ** SMS - SET MASS STORAGE DRIVER.
  6235. *
  6236. * ENTRY (T5) = EQUIPMENT ORDINAL.
  6237. * (FS+1) = FIRST TRACK OF LOCAL FILE.
  6238. *
  6239. * EXIT DRIVER LOADED.
  6240. * SYSTEM ACCESS SET IF FILE IS SYSTEM FILE.
  6241. *
  6242. * USES CM - CM+4.
  6243. *
  6244. * MACROS SETMS.
  6245.  
  6246.  
  6247. SMS1 SETMS IO
  6248.  
  6249. SMS SUBR
  6250. SFA EST,T5 CHECK FOR SYSTEM DEVICE
  6251. CRD CM
  6252. LDD CM
  6253. SHN 21-12
  6254. PJN SMS1 IF NOT SYSTEM DEVICE
  6255. LDN FNTP READ FNT POINTER
  6256. CRD CM
  6257. LDD CM
  6258. SHN 14
  6259. ADD CM+1
  6260. ERRNZ SYFO CHECK SYSTEM FILE POSITION IN FNT
  6261. ADK FSTG
  6262. CRD CM
  6263. LDD CM+1
  6264. LMD FS+1
  6265. NJN SMS1 IF NOT SYSTEM FILE
  6266.  
  6267. * *CIO* IS USED TO ACCESS THE SYSTEM FILE FOR THE LOADER, CCL,
  6268. * ETC. THE READSYS OPTION CAUSES THE DRIVER TO SELECT THE
  6269. * SYSTEM DEVICE WITH THE LEAST ACTIVITY. IT ALSO CAUSES THE
  6270. * DRIVER ERROR PROCESSOR TO AUTOMATICALLY TRY A DIFFERENT
  6271. * SYSTEM DEVICE WHEN AN ERROR IS ENCOUNTERED.
  6272.  
  6273. SETMS READSYS
  6274. UJN SMSX RETURN
  6275. SPACE 4,10
  6276. ** COMMON DECKS.
  6277.  
  6278.  
  6279. *CALL COMPIRA
  6280. SPACE 4,10
  6281. OVERFLOW MSDO
  6282. CMS OVERLAY (CLOSE MASS STORAGE.),MSDO
  6283. CMS SPACE 4,10
  6284. ** DIRECT LOCATION ASSIGNMENTS.
  6285.  
  6286.  
  6287. RI EQU 36 - 37 RANDOM INDEX (2 LOCATIONS)
  6288. CMS SPACE 4,10
  6289. ORG *+2
  6290. CLO SPACE 4,15
  6291. ** CLO - CLOSE FILE.
  6292. *
  6293. * ENTRY (FO) = FET OPTIONS.
  6294. * (BS - BS+4) = (FET+0).
  6295. * (FS - FS+4) = FST ENTRY.
  6296. *
  6297. * EXIT TO *CLS*.
  6298. *
  6299. * USES T5, T6.
  6300. *
  6301. * CALLS DRI.
  6302.  
  6303.  
  6304. CLO BSS 0 ENTRY
  6305. LDD BS+4 GET CLOSE FUNCTION
  6306. SHN -3
  6307. LPN 7
  6308. LMN 5
  6309. ZJN CLO2 IF REWIND
  6310. LMN 3&5
  6311. ZJN CLO1 IF NO REWIND
  6312. LDD BS+4 SET RETURN/UNLOAD FLAG FOR *0DF*
  6313. SHN -2
  6314. LPN 1
  6315. LMN 1
  6316. RAM CLSA
  6317. LDN IMRU CHARGE FOR RETURN/UNLOAD
  6318. RAM TACC+/CIO/CLO
  6319. LDC DRF&CFN SET COMPLETION ADDRESS
  6320. CLO1 LMC CFN
  6321. STM CLSB
  6322. CLO2 LDM MSFF GET MASS STORAGE FILE FLAG
  6323. NJN CLO3 IF NOT MASS STORAGE FILE
  6324. LDD FS+2
  6325. ZJN CLO3 IF FILE NOT USED
  6326. STD T6 SET CURRENT TRACK
  6327. LDD FS SET EST ORDINAL
  6328. STD T5
  6329. LDD FO CHECK SPECIAL PROCESSING
  6330. SHN 6
  6331. PJN CLO3 IF NOT RANDOM FILE
  6332. LDM FETL
  6333. SBN 3
  6334. MJN CLO3 IF NO INDEX WORD IN FET
  6335. LDD FS+4 CHECK WRITE STATUS
  6336. SHN 21-7
  6337. PJN CLO3 IF NOT WRITTEN SINCE LAST OPEN
  6338. LDM FACF CHECK WRITE LOCKOUT SET
  6339. LPN 1
  6340. NJN CLO3 IF WRITE LOCKOUT SET
  6341. RJM DRI DUMP RANDOM INDEX
  6342. CLO3 LJM CLS COMPLETE CLOSE PROCESSING
  6343. DRI SPACE 4,15
  6344. ** DRI - DUMP RANDOM INDEX.
  6345. *
  6346. * EXIT TO *WMS* OVERLAY IF RANDOM INDEX TO BE WRITTEN.
  6347. * (FS+2) = EOI TRACK.
  6348. * (FS+3) = EOI SECTOR.
  6349. * (FS+4) = COMPLETE WRITE FST STATUS.
  6350. * (IN - IN+1) = LWA+1 INDEX AREA.
  6351. * (LM - LM+1) = LWA+2 INDEX AREA.
  6352. * (OT - OT+1) = FWA INDEX AREA.
  6353. *
  6354. * USES T1, T2, CM - CM+4.
  6355. *
  6356. * CALLS EXR, SEI, VAL.
  6357. *
  6358. * MACROS ERROR.
  6359.  
  6360.  
  6361. DRI SUBR ENTRY/EXIT
  6362. CFET 7 READ (FET+7)
  6363. CRD CM
  6364. LDD CM+3 CHECK INDEX LENGTH
  6365. SCN 77
  6366. SHN 6
  6367. LMD CM+2
  6368. ZJN DRIX IF INDEX LENGTH=0 - RETURN
  6369. SHN 6
  6370. STD T2
  6371. SHN -14
  6372. LPN 37
  6373. STD T1
  6374. LDD CM+3 OUT = FWA
  6375. LPN 37
  6376. STD OT
  6377. SHN 14
  6378. LMD CM+4
  6379. STD OT+1
  6380. SBN 2
  6381. PJN DRI2 IF INDEX BUFFER ADDRESS .GE. 2
  6382. DRI1 ERROR FPE *FET PARAMETER ERROR*
  6383.  
  6384. DRI2 ADN 2
  6385. SHN 6
  6386. ADD T1
  6387. SHN 14
  6388. ADD T2
  6389. STD IN+1 IN = FWA+LENGTH = LWA+1
  6390. SHN -6
  6391. SBD FL
  6392. PJN DRI1 IF INDEX BUFFER LWA+1 .GE. FL
  6393. ADD FL
  6394. SHN -6
  6395. STD IN
  6396. LDN 1 CHECK WRITE SECURITY
  6397. RJM VAL VALIDATE FILE ACCESS LEVEL
  6398. RJM SEI SEARCH FOR END OF INFORMATION
  6399. LDD T6 SET TRACK
  6400. STD FS+2
  6401. LDD T7 SET SECTOR
  6402. STD FS+3
  6403. LDN 6 SET COMPLETE WRITE FST STATUS
  6404. STD FS+4
  6405. LDD IN LIMIT = IN + 1
  6406. SHN 14
  6407. ADD IN+1
  6408. ADN 1
  6409. STD LM+1
  6410. SHN -14
  6411. STD LM
  6412. LDC 1L4+WMS SET WRITE OVERLAY NAME
  6413. RJM EXR EXECUTE ROUTINE
  6414. SPACE 4,10
  6415. ** COMMON DECKS.
  6416.  
  6417.  
  6418. *CALL COMPSEI
  6419. SPACE 4,10
  6420. OVERFLOW MSDO
  6421. OMS OVERLAY (OVERWRITE MASS STORAGE.),MSDO
  6422. SPACE 4,10
  6423. ** DIRECT LOCATION ASSIGNMENTS.
  6424.  
  6425.  
  6426. NT EQU 36 EOI/NEXT TRACK LINK
  6427. TC EQU 37 TRACK COUNT BEFORE PP RELEASE
  6428. SPACE 4,10
  6429. ORG *+2
  6430. OVW SPACE 4,15
  6431. ** OVW - OVERWRITE FILE.
  6432. *
  6433. * ENTRY (BS - BS+4) = (FET+0).
  6434. * (FA) = FNT ENTRY NFL RELATIVE ADDRESS.
  6435. * (FS - FS+4) = FST ENTRY.
  6436. * (PC) = 0.
  6437. *
  6438. * EXIT TO *COC* IF TO ENTER RECALL STACK.
  6439. * TO *DRF* IF TO DROP FILE AFTER OVERWRITE.
  6440. * TO *REW* IF TO REWIND FILE AFTER OVERWRITE.
  6441. * TO *CDA*, IF RECOVERABLE MASS STORAGE ERROR.
  6442. *
  6443. * CALLS GNT, IBP, WDS, WEI.
  6444. *
  6445. * MACROS ENDMS, SETMS.
  6446.  
  6447.  
  6448. OVW BSS 0 ENTRY
  6449. LDD FA
  6450. ZJN OVW2 IF NO FNT ENTRY
  6451. LDM FACF CHECK FILE MODE
  6452. LPN 30
  6453. ZJN OVW1 IF NO RESTRICTIONS
  6454. ERROR IFM *INCORRECT MODIFICATION*
  6455.  
  6456. OVW1 LDM RCRF CHECK FOR CONTINUATION OF FUNCTION
  6457. SHN 21-6
  6458. MJN OVW4 IF FUNCTION PREVIOUSLY INITIALIZED
  6459. LDD FS+2
  6460. NJN OVW3 IF FILE USED
  6461. OVW2 LJM OVW11 REWIND OR DROP FILE
  6462.  
  6463. OVW3 LDN FSMS SET CURRENT SECTOR = FIRST SECTOR
  6464. STD FS+3
  6465. LDD FS+1 SET CURRENT TRACK = FIRST TRACK
  6466. STD FS+2
  6467. RJM GNT GET NEXT TRACK
  6468. SBN FSMS
  6469. ZJN OVW2 IF EOI ONLY ON FILE
  6470. OVW4 RJM IBP INITIALIZE BUFFER WITH PATTERN
  6471. LDD FS+3 SET CURRENT SECTOR
  6472. STD T7
  6473. LDD FS+2 SET CURRENT TRACK
  6474. STD T6
  6475. RJM GNT GET EOI/NEXT TRACK LINK
  6476. SETMS IO,,WDSB
  6477. LDN 0
  6478. STD TC CLEAR TRACK COUNT
  6479. LDD PC
  6480. STD T1
  6481. OVW5 AOD TC CALCULATE TRACK COUNT BEFORE PP RELEASE
  6482. LDM SLM
  6483. RAD T1
  6484. SBK RWPC
  6485. MJN OVW5 IF ALLOWED TO WRITE MORE TRACKS
  6486. OVW6 LDD T7 SET NEXT SECTOR LINKAGE
  6487. ADN 1
  6488. STM BFMS
  6489. STD FS+3
  6490. SBM SLM
  6491. NJN OVW7 IF NOT AT END OF TRACK
  6492. STD FS+3 RESET TO FIRST SECTOR
  6493. LDD NT SET NEXT TRACK LINK
  6494. STM BFMS
  6495. STD FS+2
  6496. RJM GNT GET NEXT TRACK LINK
  6497. ZJN OVW7 IF EOI IN FIRST SECTOR OF NEXT TRACK
  6498. SOD TC
  6499. NJN OVW7 IF NOT TRACK COUNT LIMIT
  6500. AOM COCA SET TO ENTER RECALL STACK
  6501. LDC LDCI+WLSF/10000
  6502. STM OVWA
  6503. OVW7 LDD FS+3
  6504. SBD NT
  6505. NJN OVW7.1 IF NOT LAST SECTOR BEFORE EOI
  6506. LDN 77 SET EOR ON LAST SECTOR BEFORE EOI
  6507. STM BFMS+1
  6508. OVW7.1 LDC BFMS+WCSF WRITE SECTOR
  6509. * LDC BFMS+WLSF (ENTER RECALL STACK)
  6510. OVWA EQU *-2
  6511. RJM WDS
  6512. PJN OVW7.2 IF NO ERROR
  6513. LPN 77
  6514. LMN PARE
  6515. ZJN OVW7.2 IF MEDIA ERROR CONTINUE
  6516. RJM CDA CHECK DEVICE
  6517.  
  6518. OVW7.2 AOD PC INCREMENT PRU COUNT
  6519. LDD FS+2
  6520. STD T6
  6521. LDD FS+3
  6522. STD T7
  6523. SBD NT
  6524. ZJN OVW9 IF EOI ENCOUNTERED
  6525. LDM COCA
  6526. NJN OVW8 IF TRACK COUNT LIMIT
  6527. LJM OVW6 WRITE NEXT SECTOR
  6528.  
  6529. OVW8 ENDMS
  6530. AOM COCA
  6531. LDN 2 SET WRITE MODE FLAG
  6532. STD FS+4
  6533. LJM COC ENTER RECALL STACK
  6534.  
  6535. OVW9 RJM WEI WRITE EOI
  6536. LDD IR+3
  6537. SHN -6
  6538. SBN 2
  6539. MJN OVW10 IF FUNCTION COMPLETE
  6540. LDC -100
  6541. RAD IR+3
  6542. LDD FS+1 SET CURRENT TRACK = FIRST TRACK
  6543. STD FS+2
  6544. LDN FSMS SET CURRENT SECTOR = FIRST SECTOR
  6545. STD FS+3
  6546. SOD TC
  6547. ZJN OVW8 IF TRACK COUNT LIMIT
  6548. LJM OVW4 PROCESS NEXT DATA PATTERN
  6549.  
  6550. OVW10 ENDMS
  6551. LDM CFNB SET FILE WRITTEN FLAGS
  6552. LPN 74
  6553. LMN 03
  6554. STM CFNB
  6555. OVW11 LDD BS+4 CHECK OVERWRITE FUNCTION CODE
  6556. LPN 10
  6557. ZJP REW IF TO REWIND FILE
  6558. LDN 0 SELECT *0DF* RETURN FUNCTION
  6559. LJM DRF DROP FILE
  6560. GNT SPACE 4,10
  6561. ** GNT - GET NEXT TRACK POINTER.
  6562. *
  6563. * ENTRY (A) = CURRENT TRACK POINTER.
  6564. * (FS - FS+4) = FST ENTRY.
  6565. *
  6566. * EXIT (A) = (NT) = NEXT TRACK POINTER.
  6567. * (T2) = CURRENT TRACK POINTER.
  6568. * (T5) = EQUIPMENT IF INITIAL CALL.
  6569. *
  6570. * USES NT, T2, CM - CM+4.
  6571. *
  6572. * MACROS SFA.
  6573.  
  6574.  
  6575. GNT2 SHN -2 READ TRT WORD
  6576. GNTB ADC ** ADD TRT BASE ADDRESS
  6577. CRD CM
  6578. LDD T2 SET BYTE INDEX
  6579. LPN 3
  6580. STD NT
  6581. LDM CM,NT GET NEXT TRACK POINTER
  6582. STD NT
  6583.  
  6584. GNT SUBR ENTRY/EXIT
  6585. STD T2 SAVE CURRENT TRACK POINTER
  6586. GNT1 LDD FS SET EQUIPMENT
  6587. * UJN GNT2 (TRT ADDRESS PRESET)
  6588. GNTA EQU *-1
  6589. STD T5
  6590. SFA EST GET EST ENTRY
  6591. ADK EQDE
  6592. CRD CM
  6593. LDD CM+4 MST ADDDRESS / 10
  6594. SHN 3
  6595. ADN TRLL READ TRT POINTER
  6596. CRD CM
  6597. LDD CM+3 EXTRACT TRT ADDRESS
  6598. LPN 77
  6599. SHN 14
  6600. LMD CM+4
  6601. SBD TH COMPENSATE FOR TRACK LINK FLAG (4000/4)
  6602. STM GNTB+1 SET TRT BASE ADDRESS
  6603. SHN -14
  6604. RAM GNTB
  6605. ISTORE GNTA,(UJN GNT2)
  6606. LDD T2
  6607. UJN GNT1 GET NEXT TRACK POINTER
  6608. IBP SPACE 4,10
  6609. ** IBP - INITIALIZE BUFFER WITH PATTERN SELECTION.
  6610. *
  6611. * EXIT (BFMS+1 - BFMS+501) INITIALIZED.
  6612. *
  6613. * USES T1, T2.
  6614.  
  6615.  
  6616. IBP SUBR ENTRY/EXIT
  6617. LDC BFMS+2
  6618. STD T1
  6619. LDD IR+3 GET PATTERN SELECTION
  6620. LPC 377
  6621. STD IR+3
  6622. SHN -6
  6623. STD T2
  6624. LDM TWPS,T2
  6625. STD T2
  6626. IBP1 LDD T2 INITIALIZE BUFFER
  6627. STI T1
  6628. AOD T1
  6629. LMC BFMS+502
  6630. NJN IBP1 IF MORE WORDS TO INITIALIZE
  6631. LDD HN SET BUFFER WORD COUNT
  6632. STM BFMS+1
  6633. UJN IBPX RETURN
  6634.  
  6635.  
  6636. TWPS BSS 0 TABLE OF WORD PATTERN SELECTIONS
  6637. LOC 0
  6638. CON 0
  6639. CON 5252
  6640. CON 7777
  6641. CON 0
  6642. LOC *O
  6643. SPACE 4,10
  6644. ** COMMON DECKS.
  6645.  
  6646.  
  6647. *CALL COMPWEI
  6648. WDSB SPACE 4,10
  6649. ** WDSB - WRITE ERROR PROCESSING BUFFER.
  6650. * THIS BUFFER IS USED STRICTLY BY THE DRIVER ERROR PROCESSOR
  6651. * WHEN A WRITE ERROR IS ENCOUNTERED ON THE SECTOR PREVIOUS TO
  6652. * A SECTOR CURRENTLY BEING WRITTEN. THIS SPACE MAY BE
  6653. * OVERLAYED BY THE ERROR PROCESSING OVERLAY.
  6654.  
  6655. WDSB EQU *
  6656. ERRNG BFMS-WDSB-502 WDSB EXTENDS INTO BFMS
  6657. SPACE 4,10
  6658. OVERFLOW MSDO,BFMS
  6659. ERP OVERLAY (ERROR PROCESSOR.),ERPO
  6660. ERP SPACE 4,10
  6661. ORG *+2
  6662. UJN ERP ENTER ERROR PROCESSOR
  6663. SPACE 4,35
  6664. *** RETURN OF UNRECOVERABLE MASS STORAGE ERROR STATUS.
  6665. *
  6666. * WHENEVER A MASS STORAGE DEVICE RETURNS AN ERROR STATUS OR THE
  6667. * DEVICE DRIVER DETECTS AN ERROR, AN ERROR STATUS IS PLACED IN
  6668. * THE STATUS FIELD OF THE FET. IF THE USER ERROR PROCESSING BIT
  6669. * IS SET IN THE FET *SP* FIELD, FURTHER *DETAIL* STATUS IS
  6670. * RETURNED TO THE USER ; IF NOT SET, A MESSAGE IS ISSUED TO THE
  6671. * DAYFILE AND THE JOB IS ABORTED.
  6672. *
  6673. * ERROR STATUS (STATUS FIELD)
  6674. * 002 END OF DEVICE (TRACK LIMIT).
  6675. * 004 PARITY ERROR.
  6676. * 023 RANDOM INDEX TOO LARGE FOR INDEX BUFFER.
  6677. * 022 OTHER ERROR.
  6678. *
  6679. * DETAIL ERROR STATUS (DEC FIELD) (ONLY IF *EPR* SET)
  6680. * X001 PARITY ERROR.
  6681. * X002 ADDRESS ERROR.
  6682. * X003 DEVICE STATUS ERROR.
  6683. * X004 6681 FUNCTION REJECT.
  6684. * X005 DEVICE RESERVED.
  6685. * X006 DEVICE NOT READY.
  6686. * 4007 TRACK LIMIT. (DEVICE FULL)
  6687. * 0000 OTHER ERROR.
  6688. *
  6689. * IF, AFTER A READ ERROR (WITH *EPR* SET), THE SYSTEM
  6690. * DETERMINES THAT THE PROPER PRU WAS READ (ALTHOUGH IT
  6691. * PROBABLY CONTAINS BAD DATA) THEN *X* ABOVE IS ZERO, THE
  6692. * DATA IS PLACED IN THE BUFFER, AND THE FILE IS POSITIONED
  6693. * TO THE NEXT PRU OF THE FILE. IF THE PROPER PRU WAS NOT
  6694. * READ THEN *X* IS 4, NO DATA IS PLACED IN THE BUFFER, AND
  6695. * THE FILE IS LEFT POSITIONED AT THE OFFENDING PRU. *CRI*
  6696. * IS SET AS USUAL.
  6697. IMR SPACE 4,10
  6698. ** IMR - ISSUE MESSAGE AND RETURN TO MAIN PROGRAM.
  6699. *
  6700. * ENTRY (A) = ADDRESS TO RETURN TO.
  6701. * AT *IMR* TO SET RETURN ADDRESS.
  6702. * AT *IMR1* IF TO USE DEFAULT RETURN ADDRESS (*CFN*).
  6703. * AT *IMR2* TO SET PP HANG.
  6704. *
  6705. * CALLS IDM.
  6706.  
  6707.  
  6708. * ENTRY TO SET PP HANG.
  6709.  
  6710. IMR2 LDC CHP SET HANG PP ADDRESS
  6711.  
  6712.  
  6713. IMR BSS 0 ENTRY
  6714. ZJN IMR1 IF NO EXIT ADDRESS SPECIFIED
  6715. STM IMRA SAVE RETURN ADDRESS
  6716.  
  6717. * ENTRY IF TO USE DEFAULT RETURN ADDRESS (*CFN*).
  6718.  
  6719. IMR1 RJM IDM ISSUE DAYFILE MESSAGE
  6720. LDD MA RESTORE T3 - T7
  6721. CWM DCSA,ON
  6722. SBN 1
  6723. CRD T3
  6724. LJM CFN COMPLETE FUNCTION AND DROP PPU
  6725. * LJM MSP (PROCESS WRITE OPERATION)
  6726. * LJM /PMS/SFP (PROCESS POSITION ERROR)
  6727. * LJM /PMS/LRIX (PROCESS OPEN ERROR - NOT CORRECT SECTOR)
  6728. * LJM /PMS/LRIX (USER PROCESSING INDEX TOO LARGE ON OPEN)
  6729. * LJM MSRX (PROCESS SKIP FORWARD - CORRECT SECTOR)
  6730. * LJM MSRX (PROCESS OPEN ERROR - CORRECT SECTOR)
  6731. * LJM MSRX (COMPLETE READ - CORRECT SECTOR)
  6732. * LJM /RMS/CPR (COMPLETE READ - NOT CORRECT SECTOR)
  6733. * LJM CHP (HANG MESSAGE)
  6734. IMRA EQU *-1
  6735. ERP SPACE 4,20
  6736. ** ERP - MAIN ROUTINE.
  6737. *
  6738. * ENTRY (ERRA) = ERROR NUMBER
  6739. * (FC) = INTERNAL *CIO* FUNCTION CODE.
  6740. * (FO) = FET OPTIONS.
  6741. * (BS - BS+4) = (FET+0).
  6742. *
  6743. * EXIT (BS - BS+4) = UPDATED WITH ERROR STATUS.
  6744. * TO *ABJ* IF FATAL ERROR.
  6745. * TO *IMR* IF ERROR PROCESSING SELECTED FOR INDEX
  6746. * TOO LARGE ERROR.
  6747. * TO *IMR1* IF WARNING MESSAGE.
  6748. * TO *IMR2* IF HANG CONDITION.
  6749. * TO *RES* IF DEVICE ERROR.
  6750. *
  6751. * USES EN, T1, T4 - T4+4.
  6752. *
  6753. * CALLS PTL, WEI.
  6754.  
  6755.  
  6756. ERP BSS 0 ENTRY
  6757. LDM ERRA SET ERROR NUMBER
  6758. STD EN
  6759. SBN /CIOERR/HMSL
  6760. MJN IMR2 IF HANG CONDITION
  6761. SBN /CIOERR/WMSL-/CIOERR/HMSL
  6762. PJN ERP1 IF ERROR MESSAGE
  6763. LDM TMSG+/CIOERR/UCF SET EXTERNAL FUNCTION IN MESSAGE
  6764. ADN 10D
  6765. STD T1
  6766. LDD BS+4
  6767. SHN -6
  6768. LPN 7
  6769. RAI T1
  6770. AOD T1
  6771. LDD BS+4
  6772. LPN 4
  6773. RAI T1
  6774. LDD BS+4
  6775. LPN 70
  6776. SHN 3
  6777. RAI T1
  6778. LJM IMR1 ISSUE WARNING MESSAGE
  6779.  
  6780. ERP1 LDN 0 CLEAR RECALL STACK FLAG
  6781. STM COCA
  6782.  
  6783. * CHECK FOR EOI NEEDED.
  6784.  
  6785. LDD EN
  6786. LMN /CIOERR/DRE
  6787. NJN ERP3 IF NOT DEVICE ERROR
  6788. LDD MA RESTORE T3 - T7
  6789. CWM DCSA,ON
  6790. SBN 1
  6791. CRD T3
  6792. LDM ERSD
  6793. NJN ERP2.1 IF NO ERROR ON THE FILE
  6794. LDD FC
  6795. SHN -6
  6796. LPN 17
  6797. LMN /CIO/WTF
  6798. ZJN ERP2 IF WRITE
  6799. LMN /CIO/CLO&/CIO/WTF
  6800. NJN ERP2.1 IF NOT CLOSE
  6801.  
  6802. * WRITE EOI IF FILE WRITTEN ON.
  6803.  
  6804. ERP2 LDD EN SAVE THE ERROR CODE
  6805. STM ERPA
  6806. RJM WEI WRITE AN EOI SECTOR
  6807. LDC **
  6808. ERPA EQU *-1
  6809. STD EN
  6810. ERP2.1 UJP RES RETURN ERROR STATUS
  6811.  
  6812. * CHECK FOR TRACK LIMIT.
  6813.  
  6814. ERP3 LDD EN
  6815. LMN /CIOERR/TKL
  6816. NJN ERP4 IF NOT TRACK LIMIT
  6817. RJM PTL PROCESS TRACK LIMIT ERROR
  6818.  
  6819. * CHECK USER PROCESSING OF ERRORS.
  6820.  
  6821. ERP4 LDC 22S9 SET STATUS = 22
  6822. RAD BS+4
  6823. SHN -14
  6824. RAD BS+3
  6825. LDD EN
  6826. LMN /CIOERR/ITL
  6827. NJN ERP6 IF NOT INDEX TOO LARGE ERROR
  6828. STM ERRA CLEAR ERROR CODE
  6829. LDD TH SET STATUS = 23B
  6830. RAD BS+4
  6831. ERP5 LJM ABJ ABORT JOB
  6832.  
  6833. ERP6 LMN /CIOERR/FTL&/CIOERR/ITL
  6834. ZJN ERP7 IF FILE TOO LONG ERROR
  6835. LMN /CIOERR/LFL&/CIOERR/FTL
  6836. ZJN ERP7 IF LOCAL FILE LIMIT ERROR
  6837. LMN /CIOERR/PRL&/CIOERR/LFL
  6838. ZJN ERP7 IF PRU LIMIT ERROR
  6839. LMN /CIOERR/RAD&/CIOERR/PRL
  6840. ZJN ERP7 IF RANDOM ADDRESS ERROR
  6841. LMN /CIOERR/BLE&/CIOERR/RAD
  6842. NJN ERP5 IF NOT BUFFER CONTROL WORD ERROR
  6843. ERP7 LDD CP CHECK IF SUBSYSTEM
  6844. ADK JCIW
  6845. CRD CM
  6846. LDD CM+2
  6847. SBK LSSI
  6848. MJN ERP5 IF NOT SUBSYSTEM
  6849. LJM IMR1 TREAT ERROR AS WARNING
  6850. RES SPACE 4,10
  6851. ** RES - RETURN ERROR STATUS.
  6852. *
  6853. * ENTRY (T4) = (RDCT) AT THE TIME OF THE ERROR.
  6854. *
  6855. * EXIT TO *ERP5* IF ERROR PROCESSING NOT SELECTED.
  6856. * TO *IMR* TO ISSUE DAYFILE MESSAGE.
  6857. *
  6858. * CALLS MDE, SES.
  6859.  
  6860.  
  6861. * PROCESS DRIVER DETECTED DEVICE ERROR.
  6862.  
  6863. RES BSS 0 ENTRY
  6864. LDD T4 GET ERROR STATUS
  6865. RJM MDE MAP DISK ERROR
  6866. RJM SES
  6867. ZJN ERP5 IF ERROR PROCESSING NOT SELECTED
  6868. LDD FC GET PROCESSOR ADDRESS
  6869. SHN -6
  6870. LPN 17
  6871. STD T1
  6872. LDM RESB,T1
  6873. STM RESA
  6874. LJM * ENTER PROCESSOR
  6875. RESA EQU *-1
  6876.  
  6877. * PROCESS SKIP ERROR.
  6878.  
  6879. RES1 LDN 0
  6880. STD FS+4 CLEAR FST STATUS
  6881. LDD FC
  6882. SHN -13
  6883. NJN RES2 IF BACKWARD SKIP
  6884. LDD T4 CHECK IF CORRECT SECTOR READ
  6885. SHN -13
  6886. NJN RES2 IF INCORRECT DATA
  6887. LDD HN+LJMI* SET TERMINATOR
  6888. STM /PMS/SKFA
  6889. LDC /PMS/SFP
  6890. STM /PMS/SKFA+1
  6891. UJN RES5 RETURN TO CALLER
  6892.  
  6893. * PROCESS WRITE/REWIND/RETURN/UNLOAD/EVICT ERRORS.
  6894.  
  6895. RES2 LDM RESC,T1 GET CONTINUATION PROCESSOR
  6896. RES3 LJM IMR ISSUE DAYFILE MESSAGE
  6897.  
  6898. * PROCESS OPEN ERROR.
  6899.  
  6900. RES4 LDD T4
  6901. SHN 21-11D
  6902. PJN RES2 IF WRONG SECTOR READ
  6903. LDC UJNI-ZJNI SET STOP AFTER SECTOR WRITE
  6904. RAM /PMS/LRIA
  6905. RES5 LDM CDA GET RETURN ADDRESS
  6906. UJN RES3 ISSUE DAYFILE MESSAGE
  6907.  
  6908. * PROCESS CLOSE/OVERWRITE ERROR.
  6909.  
  6910. RES6 LDM ERSD
  6911. ZJP RES2 IF NO ERROR ON THE FILE
  6912. LDC RRF EXIT TO RESET POINTERS
  6913. UJP RES3 ISSUE DAYFILE MESSAGE AND RETURN
  6914.  
  6915. * PROCESS READ ERROR.
  6916.  
  6917. RES7 LDC 4000 SET ERROR FLAG IN CONTROL WORD
  6918. RAM BFMS+2-5
  6919. LDN 0 SET STOP FOR CONTROL WORD READ LOOP
  6920. STM /RMS/CRDB
  6921. UJP RES5 RETURN TO CALLER
  6922.  
  6923. RES8 LDD T4
  6924. SHN 21-11D
  6925. MJN RES2 IF WRONG SECTOR READ
  6926. LDD FC CHECK READ FUNCTION
  6927. SHN 21-5
  6928. MJN RES7 IF *READCW*
  6929. SHN 21-12-21+5+22
  6930. PJN RES9 IF NOT *READSKP*
  6931. LDC LDNI+0
  6932. STM /SMR/RSKB
  6933. LDD HN+LJMI* SET TERMINATION
  6934. STM /SMR/RSKC
  6935. LDC /SMR/RSK13
  6936. STM /SMR/RSKC+1
  6937. RES9 LDC /RMS/CPR SET STOPS FOR BUFFER READ LOOP
  6938. STM /RMS/BRDE
  6939. STM /RMS/BRDF
  6940. STM /RMS/EOFA
  6941. LDD HN+LJMI* SET TERMINATION
  6942. STM /RMS/BRDT
  6943. LDC /RMS/BRD2
  6944. STM /RMS/BRDT+1
  6945. LJM RES5 ISSUE DAYFILE MESSAGE
  6946.  
  6947.  
  6948. RESB INDEX TABLE OF ERROR COMPLETION PROCESSORS
  6949.  
  6950. INDEX /CIO/RDF,RES8 READ
  6951. INDEX /CIO/WTF,RES2 WRITE
  6952. INDEX /CIO/SKP,RES1 SKIP
  6953. INDEX /CIO/OPE,RES4 OPEN
  6954. INDEX /CIO/CLO,RES6 CLOSE
  6955. INDEX /CIO/REW,RES2 REWIND
  6956. INDEX /CIO/RET,RES2 RETURN/UNLOAD
  6957. INDEX /CIO/EVI,RES2 EVICT
  6958. INDEX /CIO/OVW,RES6 OVERWRITE
  6959.  
  6960. INDEX /CIO/MFC
  6961.  
  6962. RESC INDEX TABLE OF FUNCTION CONTINUATION ROUTINES
  6963.  
  6964. INDEX /CIO/RDF,/RMS/CPR READ
  6965. INDEX /CIO/WTF,/WMS/WMS3 WRITE
  6966. INDEX /CIO/SKP,/PMS/SFP SKIP
  6967. INDEX /CIO/OPE,/PMS/LRIX OPEN
  6968. INDEX /CIO/CLO,/WMS/WMS3 CLOSE
  6969. INDEX /CIO/REW,RRF REWIND
  6970. INDEX /CIO/RET,RRF RETURN/UNLOAD
  6971. INDEX /CIO/EVI,RRF EVICT
  6972. INDEX /CIO/OVW,/OMS/OVW10 OVERWRITE
  6973.  
  6974. INDEX /CIO/MFC
  6975. ABJ SPACE 4,15
  6976. ** ABJ - ABORT JOB.
  6977. *
  6978. * ENTRY (EN) = ERROR NUMBER.
  6979. * (FC) = INTERNAL *CIO* FUNCTION CODE.
  6980. * (BS - BS+4) = (FET+0).
  6981. *
  6982. * EXIT TO *IMR1* FOR EXIT TO *CFN*.
  6983. *
  6984. * USES T1, CM - CM+4.
  6985. *
  6986. * CALLS CTI.
  6987. *
  6988. * MACROS MONITOR.
  6989.  
  6990.  
  6991. * SET CONTROL POINT ERROR FLAG.
  6992.  
  6993. ABJ BSS 0 ENTRY
  6994. LDM TEPO,EN SET CONTROL POINT ERROR FLAG
  6995. SHN -6
  6996. ZJN ABJ1 IF NO ERROR FLAG
  6997. STD CM+1 SET ERROR FLAG
  6998. MONITOR CEFM
  6999. ABJ1 LDD EN
  7000. LMN /CIOERR/ARG
  7001. NJN ABJ2 IF NOT ARGUMENT ERROR
  7002. STD BS CLEAR FILE NAME
  7003. STM CFND PREVENT WRITE OF FET+0
  7004. UJN ABJ3 COMPLETE ABORT PROCESSING
  7005.  
  7006. ABJ2 LDD FO CHECK FET OPTIONS
  7007. SHN 21-10
  7008. PJN ABJ3 IF ERROR PROCESSING NOT SELECTED
  7009. LDN 0 CLEAR DETAILED STATUS FIELD IN FET
  7010. STD T1
  7011. RJM SDS
  7012. ABJ3 LDD FC
  7013. NJN ABJ4 IF INTERNAL FUNCTION DEFINED
  7014. STM TACC PREVENT ACCOUNTING FUNCTION CHARGE
  7015.  
  7016. * SET UP FET DUMP REQUEST.
  7017.  
  7018. ABJ4 LDM TEPO,EN CHECK ERROR CONTROL
  7019. LPN 1
  7020. ZJN ABJ5 IF FET DUMP NOT NEEDED
  7021. LDD CP READ PPDW
  7022. ADC PPDW
  7023. STD T1
  7024. CRD CM
  7025. LDD IR+3 SET DUMP LENGTH AND FET ADDRESS
  7026. LPN 77
  7027. SHN 14
  7028. LMM FETL
  7029. ADN 5
  7030. SHN 6
  7031. STD CM+3
  7032. LDD IR+4
  7033. STD CM+4
  7034. LDD T1 REWRITE PPDW
  7035. CWD CM
  7036. ABJ5 LJM IMR1 ISSUE MESSAGE
  7037. TMSG SPACE 4,10
  7038. ** TMSG - TABLE OF MESSAGE ADDRESSES.
  7039. * INDEXED BY ERROR CODE.
  7040. *
  7041. *T, 12/ ADDR
  7042. * ADDR ADDRESS OF MESSAGE
  7043.  
  7044.  
  7045. TMSG EQU *-1
  7046. LOC TMSG+/CIOERR/MEC
  7047. TEPO SPACE 4,10
  7048. ** TEPO - TABLE OF ERROR PROCESSING OPTIONS.
  7049. * INDEXED BY ERROR CODE.
  7050. *
  7051. *T, 6/ EF, 5/ 0, 1/F
  7052. *
  7053. * EF ERROR FLAG.
  7054. * F = 1 IF FET DUMP NEEDED.
  7055.  
  7056.  
  7057. TEPO EQU *-1
  7058.  
  7059. ARG MSG (FET ADDRESS OUT OF RANGE),PPET,0
  7060. ASD MSG (ASSIGNED FOR DIAGNOSTICS, FILE ),PPET,0
  7061. BLE MSG (BUFFER CONTROL WORD ERROR ON ),PPET,0
  7062. BUF MSG (BUFFER ARGUMENT ERROR ON ),PPET,1
  7063. DRE MSG (DEVICE ERROR ON FILE ),PPET,0
  7064. EFT MSG (ERROR FLAG TERMINATION, FILE ),0,0
  7065. EXO MSG (I/O ON EXECUTE-ONLY FILE ),PPET,0
  7066. FLN MSG (INCORRECT FILE NAME ),PPET,0
  7067. FPE MSG (FET PARAMETER ERROR ON ),PPET,1
  7068. FSQ MSG (I/O SEQUENCE ERROR ON FILE ),PPET,0
  7069. FTL MSG (FILE TOO LONG, FILE ),PPET,0
  7070. IEQ MSG (INCORRECT EQUIPMENT ON FILE ),0,0
  7071. IFM MSG (INCORRECT MODIFICATION OF ),PPET,0
  7072. IRQ MSG (INCORRECT I/O REQUEST ON FILE ),PPET,1
  7073. ITL MSG (INDEX TOO LARGE ON OPEN, FILE ),PPET,1
  7074. IWR MSG (WRITE ON READ-ONLY FILE ),PPET,0
  7075. LFL MSG ,FLET,0
  7076. LNF MSG (FILE ACCESS LEVEL CONFLICT, ),SVET,0
  7077. LNJ MSG (JOB ACCESS LEVEL CONFLICT, ),SVET,0
  7078. PRL MSG (PRU LIMIT, FILE ),TKET,0
  7079. RAD MSG (RANDOM ADDRESS NOT ON FILE ),PPET,1
  7080. RUD MSG (REQUEST UNDEFINED ON DEVICE, ),PPET,1
  7081. RWT MSG (INDEX ADDRESS OUT OF RANGE FOR ),PPET,1
  7082. TKL MSG ,0,1
  7083. TNA MSG (M.T. NOT AVAILABLE ON FILE ),PPET,0
  7084. UCF MSG (UNNECESSARY CIO FCT. 000 ON ),0,0
  7085. WDP MSG (WRITEDOWN PROHIBITED ON ),SVET,0
  7086. MEC MSG
  7087. BOS SPACE 4,10
  7088. ** BOS - BACKUP ONE SECTOR.
  7089. *
  7090.  
  7091. BOS1 LMD T3 SAVE TRACK NUMBER
  7092. BOS2 STD T6
  7093. RJM SNT GET NEXT TRACK
  7094. LMD T3
  7095. NJN BOS1 IF NOT EQUAL TO CURRENT TRACK
  7096. LDM SLM SET SECTOR TO END OF TRACK
  7097. SBN 1
  7098. STD T7
  7099.  
  7100. BOS SUBR
  7101. SOD T7 DECREMENT SECTOR
  7102. PJN BOSX IF SAME TRACK
  7103. LDD T6 SAVE CURRENT TRACK
  7104. STD T3
  7105. LDD FS+1 START WITH FIRST TRACK
  7106. UJN BOS2 ENTER LOOP
  7107. CHP SPACE 4,10
  7108. ** CHP - CONDITIONALLY HANG PP.
  7109. *
  7110. * EXIT TO *CFN*.
  7111. *
  7112. * CALLS CHG.
  7113.  
  7114.  
  7115. CHP LDK SWET SET SYSTEM SOFTWARE ERROR FLAG
  7116. RJM CHG CONDITIONALLY HANG PP
  7117. LJM CFN COMPLETE FUNCTION
  7118. TITLE ERROR PROCESSOR SUBROUTINES.
  7119. MDE SPACE 4,15
  7120. ** MDE - MAP DISK ERROR.
  7121. *
  7122. * ENTRY (A) = DETAILED ERROR CODE FROM DRIVER.
  7123. * 6/, 8/, 4/DC
  7124. * DC = DRIVER ERROR CODE.
  7125. *
  7126. * EXIT (A) = 6/0,8/NC,4/CC
  7127. * NC = NOT CHANGED FROM INPUT.
  7128. * CC = CPU ERROR CODE EQUIVALENT TO *DC* IF *DC*
  7129. * IN EQUIVALENCE TABLE, OTHERWISE *DC*.
  7130. *
  7131. * USES T0, T1.
  7132.  
  7133.  
  7134. MDE1 LDD T0 RESTORE ORIGINAL ERROR CODE
  7135.  
  7136. MDE SUBR ENTRY/EXIT
  7137. STD T0 SAVE ORIGINAL ERROR CODE
  7138. LPN 77 GET DRIVER ERROR CODE
  7139. STD T1
  7140. SBN MXDE
  7141. PJN MDE1 IF CODE NOT IN TABLE
  7142. LDM MDEA,T1 GET EQUIVALENT CPU ERROR CODE
  7143. SBD T1 MAP DRIVER CODE TO CPU CODE
  7144. ADD T0
  7145. UJN MDEX EXIT
  7146.  
  7147.  
  7148. LIST G
  7149. MDEA CON CEC.LN ISHARED RETURN-ON-INACCESSIBLE DEVICE
  7150. ECHO 1,ERRCODE=("DREC")
  7151. CON CEC._ERRCODE "TXT._ERRCODE"
  7152. LIST *
  7153. PTL SPACE 4,20
  7154. ** PTL - PROCESS TRACK LIMIT.
  7155. *
  7156. * ENTRY (EN) = ERROR NUMBER.
  7157. * (FO) = FET OPTIONS.
  7158. *
  7159. * EXIT (EN) = */ERR/EFT* IF SPECIAL ERROR FLAG SET ON CP.
  7160. * TRACK LIMIT SYSTEM EVENT ISSUED.
  7161. * TO *MSP* IF USER PROCESSING OF TRACK LIMIT REQUESTED
  7162. * (AND NO SPECIAL ERROR FLAG SET ON CP).
  7163. * TO *COC* IF NOT USER PROCESSING OF TRACK LIMIT
  7164. * (AND NO SPECIAL ERROR FLAG SET ON CP).
  7165. *
  7166. * USES CM - CM+4.
  7167. *
  7168. * CALLS SES.
  7169. *
  7170. * MACROS MONITOR.
  7171.  
  7172.  
  7173. PTL3 LDN /CIOERR/EFT *ERROR FLAG TERMINATION*
  7174. STD EN
  7175. STM ERRA
  7176.  
  7177. PTL SUBR ENTRY/EXIT
  7178. LDN ZERL SET TRACK LIMIT EVENT
  7179. CRD CM
  7180. LDN TKLE
  7181. STD CM+4
  7182. MONITOR EATM
  7183. LDD CP CHECK ERROR FLAG
  7184. ADN STSW
  7185. CRD CM
  7186. LDD CM+1
  7187. SBN SPET
  7188. PJN PTL3 IF SPECIAL ERROR TYPE
  7189. ADN SPET-ODET
  7190. ZJN PTL3 IF OPERATOR DROP ERROR FLAG
  7191. ADN ODET-FSET
  7192. ZJN PTL3 IF FORCED ERROR
  7193. ADN FSET-TAET
  7194. ZJN PTL3 IF USER BREAK TWO
  7195. ADN TAET-TIET
  7196. ZJN PTL3 IF USER BREAK ONE
  7197. LDD FO CHECK USER PROCESSING
  7198. SHN 21-11
  7199. PJN PTL1 IF NOT USER PROCESSING
  7200. LDC TLME SET TRACK LIMIT ERROR STATUS
  7201. RJM SES SET ERROR STATUS
  7202. LJM /WMS/WMS3 COMPLETE WRITE FUNCTION
  7203.  
  7204. PTL0 LDM OSSM
  7205. ZJN PTL0.1 IF UNSECURED SYSTEM
  7206. LDC PTLB+12 SET ACCESS LEVEL MESSAGE ADDRESS
  7207. STD T1
  7208. LDM FSAL GET FILE ACCESS LEVEL
  7209. SHN 2
  7210. ADC TALV
  7211. RJM ACS MOVE ACCESS LEVEL NAME TO MESSAGE
  7212. LDC =Z*.*
  7213. RJM ACS
  7214. LDC 2R,
  7215. STM PTLB+11
  7216. LDN 0
  7217. PTL0.1 UJN PTL2 WRITE CONSOLE MESSAGE
  7218.  
  7219. PTL1 LDD FS CONVERT UPPER TWO DIGITS OF EST ORDINAL
  7220. ZJN PTL0 IF NO EQUIPMENT ASSIGNED
  7221. SHN -3
  7222. STD T0
  7223. SHN 3
  7224. LMD T0
  7225. SCN 70
  7226. RAM PTLB+1
  7227. LDD FS CONVERT LOWER DIGIT OF EST ORDINAL
  7228. LPN 7
  7229. SHN 6
  7230. RAM PTLB+2
  7231. LCN 3
  7232. PTL2 ADC PTLB+3 SET MESSAGE ADDRESS
  7233. STM PTLA
  7234. LDD CP WRITE CONSOLE *TRACK LIMIT* MESSAGE
  7235. ADN MS2W
  7236. CWM *,TR
  7237. PTLA EQU *-1 ADDRESS OF MESSAGE
  7238. AOM COCA SET RECALL STACK FLAG
  7239. LDN TRLR-PTLR SET TRACK LIMIT REASON CODE
  7240. RAM ERSA
  7241. LDC TLRT SET TRACK LIMIT RECALL TIME PERIOD
  7242. STM ERSB
  7243. LJM COC SET UP TO ENTER RECALL STACK
  7244.  
  7245.  
  7246. PTLB DATA C*EQ000, TRACK LIMIT.*
  7247. BSSZ 4 ACCESS LEVEL NAME
  7248. SDS SPACE 4,10
  7249. ** SDS - SET DETAILED STATUS FIELD IN FET.
  7250. *
  7251. * ENTRY (T1) = DETAILED STATUS.
  7252. *
  7253. * USES CM - CM+4.
  7254. *
  7255. * MACROS CFET.
  7256.  
  7257.  
  7258. SDS SUBR ENTRY/EXIT
  7259. LDM FETL CHECK FET LENGTH
  7260. SBN 2
  7261. MJN SDSX IF NO DETAILED STATUS FIELD IN FET
  7262. CFET 6 SET DETAILED STATUS
  7263. CRD CM
  7264. LDN 0
  7265. STD CM+3
  7266. LDD T1
  7267. STD CM+4
  7268. CFET 6
  7269. CWD CM
  7270. UJN SDSX RETURN
  7271. SES SPACE 4,15
  7272. ** SES - SET ERROR STATUS.
  7273. *
  7274. * ENTRY (A)= DETAIL STATUS CODE.
  7275. * (FC) = INTERNAL *CIO* FUNCTION CODE.
  7276. * (FO) = FET OPTIONS.
  7277. * (BS - BS+4) = (FET+0).
  7278. * (DP - DP+4) = *IN* POINTER FOR READ FUNCTION.
  7279. *
  7280. * EXIT (A) = 0 IF ERROR PROCESSING (EP) NOT SELECTED.
  7281. * (BS+3 - BS+4)= ERROR STATUS.
  7282. * DETAIL STATUS SET IN BITS 0-12 OF FET+6.
  7283. *
  7284. * USES T0, T1, CM - CM+4.
  7285. *
  7286. * MACROS CFET.
  7287.  
  7288.  
  7289. SES4 LDN 0 SET ERROR PROCESSING NOT SELECTED
  7290.  
  7291. SES SUBR ENTRY/EXIT
  7292. LPC 6077 PRESERVE DATA TO BE RETURNED TO FET
  7293. STD T1 SAVE STATUS CODE
  7294. LPN 77
  7295. LMN PTYE CHECK STATUS CODE
  7296. STD T0 SET/CLEAR PARITY ERROR FLAG
  7297. ZJN SES1 IF PARITY ERROR
  7298. LDD T1
  7299. LMC TLME
  7300. ZJN SES2 IF TRACK LIMIT
  7301. LDN 22-4 STATUS = 22
  7302. SES1 ADN 2 STATUS = 4
  7303. SES2 ADN 2 STATUS = 2
  7304. SHN 11
  7305. LMD BS+4
  7306. STD BS+4
  7307. SHN -11-3
  7308. LMD BS+3
  7309. STD BS+3
  7310. LDD FO CHECK ERROR PROCESSING SELECTED
  7311. SHN 21-8D
  7312. PJN SES4 IF NOT SELECTED
  7313. LDD FC GET FUNCTION CODE
  7314. LPC 1700
  7315. ADD T0
  7316. NJN SES3 IF NOT READ PARITY ERROR
  7317. LDD DP+3 SAVE *IN* POINTER
  7318. RAM /RMS/CPRA
  7319. LDD DP+4
  7320. STM /RMS/CPRA+1
  7321. SES3 RJM SDS SET DETAILED STATUS
  7322. LJM SESX RETURN
  7323. WEI SPACE 4,15
  7324. ** WEI - WRITE EOI SECTOR.
  7325. *
  7326. * ENTRY (T5) = EST ORDINAL.
  7327. * (T6) = TRACK WHERE ERROR OCCURED.
  7328. * (T7) = SECTOR WHERE ERROR OCCURED.
  7329. * (FS+1) = FIRST TRACK OF FILE.
  7330. *
  7331. * EXIT (FS+2) = CURRENT TRACK.
  7332. * (FS+3) = CURRENT SECTOR.
  7333. *
  7334. * USES RC, T6, T7, CM - CM+4.
  7335. *
  7336. * CALLS FWB, SCF, SNT, /WEI/WEI.
  7337. *
  7338. * MACROS ENDMS, MONITOR, SETMS.
  7339.  
  7340.  
  7341. WEI SUBR ENTRY/EXIT
  7342. LDD FC CHECK FOR REWRITE
  7343. SHN 21-12
  7344. PJN WEI1 IF NOT REWRITE
  7345. LDM /WMS/WEIA CHECK TRACK TABLE
  7346. STD RC
  7347. SBD /WMS/NT
  7348. MJP WEI3 IF TRACK BEYOND EOI USED
  7349. NJN WEI2 IF NOT AT EOI TRACK
  7350. LDD T7 CHECK OLD EOI SECTOR
  7351. SBM /WMS/WEIB
  7352. WEI1 PJN WEI3 IF EOI NOT INTACT
  7353. WEI2 LDD T6 SET CURRENT TRACK IN FST
  7354. STD FS+2
  7355. LDD T7 SET CURRENT SECTOR IN FST
  7356. STD FS+3
  7357. LDN 76 ONLY SET FILE WRITTEN IN FST IF REWRITE
  7358. STM /WMS/WMSB
  7359. LDN 1 SET FILE WRITTEN
  7360. STM /WMS/WMSC
  7361. RJM SCF SET CONTROL BUFFER INDEX INTO FNT
  7362. RJM FWB FLUSH WRITE DATA FOR BUFFERED DEVICE
  7363. LDM /WMS/WEIC CHECK TRT MODIFIED
  7364. LPN 77
  7365. ZJP WEIX IF NO TRT UPDATE NEEDED
  7366. LDM /WMS/WEIB RESET OLD EOI SECTOR
  7367. STD CM+3
  7368. LDI RC RESET OLD EOI TRACK
  7369. LJM WEI10 RESET EOI IN TRT
  7370.  
  7371. * BACK UP AND WRITE AN EOI.
  7372.  
  7373. WEI3 LDD FS+2
  7374. NJN WEI3.1 IF SYSTEM SECTOR NOT WRITTEN THIS TIME
  7375.  
  7376. * SINCE THIS IS THE BEGINNING OF THE FILE, TRY TO START THE
  7377. * OPERATION OVER AGAIN USING A DIFFERENT TRACK OR DEVICE.
  7378.  
  7379. RJM /WMS/RWF REWRITE FILE
  7380. LJM WEIX RETURN
  7381.  
  7382. WEI3.1 SETMS IO,NS RESET TO CORRECT DRIVER
  7383. LDM DCSA+1
  7384. SHN 21-10
  7385. MJN WEI6 IF SECTORS BUFFERED IN THE HARDWARE
  7386.  
  7387. * SINCE, FOR FULL TRACK DEVICES, THE ERROR COULD HAVE OCCURED
  7388. * IN THE CURRENT SECTOR OR THE PREVIOUS SECTOR, BACK UP TWO
  7389. * SECTORS AND WRITE THE EOI.
  7390.  
  7391. LDD T6
  7392. LMD FS+1
  7393. NJN WEI4 IF NOT FIRST TRACK
  7394. LDD T7
  7395. SBN FSMS
  7396. ZJN WEI9 IF FIRST SECTOR
  7397. SBN 1
  7398. ZJN WEI5 IF CAN ONLY BACKUP ONE SECTOR
  7399. WEI4 RJM BOS BACKUP ONE SECTOR
  7400. WEI5 RJM BOS BACKUP ONE SECTOR
  7401. UJN WEI9 WRITE EOI SECTOR
  7402.  
  7403. * FOR DEVICES THAT HAVE HARDWARE BUFFERING, THE EXACT POINT
  7404. * AT WHICH THE ERROR OCCURED CANNOT BE DETERMINED. THE EOI
  7405. * IS WRITTEN AT THE POSITION AT WHICH THE OPERATION STARTED.
  7406.  
  7407. WEI6 LDD FS+2 RESET POSITION
  7408. STD T6
  7409. LDD FS+3
  7410. WEI8 STD T7
  7411. WEI9 RJM /WEI/WEI WRITE EOI SECTOR
  7412. ENDMS END MASS STORAGE OPERATION
  7413. RJM SCF SET CONTROL BUFFER INDEX INTO FNT
  7414. RJM FWB FLUSH WRITE DATA FOR BUFFERED DEVICE
  7415. LDD T7 DROP UNUSED TRACKS
  7416. STD FS+3 SET CURRENT SECTOR IN FST
  7417. STD CM+3
  7418. LDD T6
  7419. STD FS+2 SET CURRENT TRACK IN FST
  7420. WEI10 LPC 3777
  7421. STD CM+2
  7422. LDD T5
  7423. STD CM+1
  7424. LDM PMFF CHECK FILE TYPE
  7425. NJN WEI11 IF NOT DIRECT ACCESS PERMANENT FILE
  7426. LDC 4000 SET DEVICE CHECKPOINT
  7427. RAD CM+1
  7428. WEI11 MONITOR DTKM RESET EOI
  7429. LDM CFNJ COMPUTE NET STORAGE
  7430. SBD CM+3
  7431. SHN 14
  7432. ADM CFNJ+1
  7433. SBD CM+4
  7434. PJN WEI12 IF MORE SECTOR ALLOCATED THAN RETURNED
  7435. LDN CICS CHANGE TO INCREMENT FUNCTION
  7436. STM CFNI
  7437. LDD CM+3
  7438. SBM CFNJ
  7439. SHN 14
  7440. ADD CM+4
  7441. SBM CFNJ+1
  7442. WEI12 STM CFNJ+1 SET SECTOR COUNT
  7443. SHN -14
  7444. STM CFNJ
  7445. LJM WEIX RETURN
  7446. IDM SPACE 4,10
  7447. ** IDM - ISSUE DAYFILE MESSAGE.
  7448. *
  7449. * ENTRY (ERRA) = (EN) = ERROR NUMBER.
  7450. * (BS - BS+4) = (FET+0).
  7451. *
  7452. * USES T1.
  7453. *
  7454. * CALLS ALS, DFM.
  7455.  
  7456.  
  7457. IDM SUBR ENTRY/EXIT
  7458. LDC BUFA SET BUFFER ADDRESS
  7459. STD T1
  7460. LDC 1R *100
  7461. STI T1
  7462. LDM TMSG,EN MOVE MESSAGE
  7463. ZJN IDMX IF NO MESSAGE
  7464. RJM ACS
  7465. LDD BS+3 CLEAR 8TH CHARACTER
  7466. STM IDMA
  7467. SCN 77
  7468. STD BS+3
  7469. LDN BS MOVE NAME
  7470. RJM ACS
  7471. LDC =Z* AT * ADD * AT *
  7472. RJM ACS
  7473. LDD IR+3 ADD FET ADDRESS
  7474. LPN 77
  7475. SHN 14
  7476. ADD IR+4
  7477. RJM ANS
  7478. LDC =Z*.* ADD PERIOD
  7479. RJM ACS
  7480. LDC BUFA ISSUE MESSAGE
  7481. RJM DFM
  7482. LDD EN
  7483. LMN /CIOERR/LNF
  7484. NJN IDM1 IF FILE ACCESS LEVEL COULD BE ADVANCED
  7485.  
  7486. * ISSUE *MFFI* ACCOUNT FILE MESSAGE IF THE FILE ACCESS LEVEL
  7487. * COULD NOT BE ADVANCED TO THE THE JOB ACCESS LEVEL.
  7488.  
  7489. LDC SVAM+3 SET MESSAGE ADDRESS
  7490. STD T1
  7491. LDN BS MOVE FILE NAME
  7492. RJM ACS
  7493. LDC =Z*, *
  7494. RJM ACS
  7495. LDM JSAL GET NAME OF JOB ACCESS LEVEL
  7496. SHN 2
  7497. ADC TALV
  7498. RJM ACS MOVE ACCESS LEVEL NAME
  7499. LDC =Z*.*
  7500. RJM ACS
  7501. LDC SVAM+ACFN ISSUE ACCOUNT FILE MESSAGE
  7502. RJM DFM
  7503. IDM1 LDC * RESTORE STATUS FIELD
  7504. IDMA EQU *-1
  7505. STD BS+3
  7506. LJM IDMX RETURN
  7507.  
  7508.  
  7509. SVAM DATA 6HMFFI,
  7510. BSSZ 12
  7511. SPACE 4,10
  7512. ** COMMON DECKS.
  7513.  
  7514.  
  7515. *CALL COMPACS
  7516. *CALL COMPANS
  7517. *CALL COMPSNT
  7518. VAL$ SET 1
  7519. *CALL COMPVLC
  7520. SPACE 4,10
  7521. USE LITERALS
  7522. BUFA BSS 0
  7523. SPACE 4,10
  7524. OVERFLOW ERPO,BFMS
  7525.  
  7526. ERRNG BFMS-BUFA-26D
  7527. TTL 1MS - MASS STORAGE INPUT/OUTPUT.
  7528. TITLE 1MS - MASS STORAGE INPUT/OUTPUT.
  7529. END
cdc/nos2.source/opl871/1ms.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator