Table of Contents

DMSTIO Source

References

Source Listing

DMSTIO.ASSEMBLE.txt
  1. TIO TITLE 'DMSTIO (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00004000
  4. * MODULE NAME: 00005000
  5. * 00006000
  6. * DMSTIO (TAPEIO) 00007000
  7. * 00008000
  8. * FUNCTION: 00009000
  9. * 00010000
  10. * TO READ OR WRITE A TAPE RECORD OR TO CONTROL TAPE 00011000
  11. * POSITIONING. 00012000
  12. * 00013000
  13. * ENTRY POINTS: 00014000
  14. * 00015000
  15. * 1. DMSTIO, TAPEIO 00016000
  16. * 00017000
  17. * ATTRIBUTES: 00018000
  18. * 00019000
  19. * | NUCLEUS RESIDENT, REENTRANT, CALLED VIA SVC 202. 00020100
  20. * 00021000
  21. * ENTRY CONDITIONS: 00022000
  22. * 00023000
  23. * LA 1,PLIST 00024000
  24. * SVC 202 00025000
  25. * DC A(ERROR) 00026000
  26. * 00027000
  27. * PLIST DC CL8'TAPEIO' 00028000
  28. * DC CL8'FUNCTION' OPERATION TO BE PERFORMED 00029000
  29. * DC CL4'DEVICE ID' TAPE DRIVE IDENTIFICATION 00030000
  30. * DC XL1'MODE' MODE OF OPERATION 00031000
  31. * DC AL3(BUFFER) BUFFER ADDRESS 00032000
  32. * DC F'LENGTH' BUFFER LENGTH (MAX 65535) 00033100
  33. * DC F'0' NUMBER OF BYTES READ 00034000
  34. * 00035000
  35. * FUNCTION MUST BE ONE OF THE FOLLOWING: 00036000
  36. * 00037000
  37. * READ - READ ONE RECORD 00038000
  38. * WRITE - WRITE ONE RECORD 00039000
  39. * READBK - READ ONE RECORD BACKWARD 00040000
  40. * SENSE - SENSE THE TAPE CONTROL UNIT 00041000
  41. * REW - REWIND THE TAPE 00042000
  42. * RUN - REWIND AND UNLOAD THE TAPE 00043000
  43. * ERG - ERASE A GAP 00044000
  44. * WTM - WRITE A TAPE MARK 00045000
  45. * BSR - BACKSPACE ONE RECORD 00046000
  46. * BSF - BACKSPACE ONE FILE 00047000
  47. * FSR - FORWARD SPACE ONE RECORD 00048000
  48. * FSF - FORWARD SPACE ONE FILE 00049000
  49. * 00050000
  50. * THE DEVICE ID MAY BE EITHER A SYMBOLIC TAPE NUMBER 00051000
  51. * (TAP1 - TAP7, TAP8 - TAPF) OR THE CORRESPONDING UNIT HRC002DS 00052590
  52. * ADDRESS (0181 - 0187, 0288 - 028F). HRC002DS 00053180
  53. * 00054000
  54. * THE MODE BYTE IDENTIFITES THE NUMBER OF TRACKS, 00055000
  55. * DENSITY, AND TRANSLATION OPTIONS. IT MUST BE IN THE 00056000
  56. * FORM DDMMM011 WHERE: 00057000
  57. * 00058000
  58. * DD | TRACKS AND DENSITY 00059000
  59. * _____|__________________________________________ 00060000
  60. * _ 00061000
  61. * | 00062000
  62. * 00 | 7 TRACK, 200 BPI 00063000
  63. * 01 | 7 TRACK, 556 BPI 00064000
  64. * 10 | 7 TRACK, 800 BPI 00065000
  65. * 11 | 9 TRACK, SEE MMM 00066000
  66. * 00067000
  67. * 00068000
  68. * MMM | MODE 00069000
  69. * _____|_______________________________________________ 00070000
  70. * _ 00071000
  71. * | 00072000
  72. * 000 | 1600 BPI (9 TRACK ONLY) 00073000
  73. * 001 | 800 BPI (9 TRACK ONLY) 00074000
  74. * 010 | ODD PARITY, DATA CONVERT ON, TRANSLATOR OFF 00075000
  75. * 011 | READ TRACK IN ERROR (9 TRACK ONLY) 00076000
  76. * 100 | EVEN PARITY, DATA CONVERT OFF, TRANSLATOR OFF 00077000
  77. * 101 | EVEN PARITY, DATA CONVERT OFF, TRANSLATOR ON 00078000
  78. * 110 | ODD PARITY, DATA CONVERT OFF, TRANSLATOR OFF 00079000
  79. * 111 | ODD PARITY, DATA CONVERT OFF, TRANSLATOR ON 00080000
  80. * 00081000
  81. * 00082000
  82. * EXIT CONDITIONS: 00083000
  83. * 00084000
  84. * NORMAL RETURN 00085000
  85. * 00086000
  86. * R15 = 0 SUCCESSFUL COMPLETION 00087000
  87. * 00088000
  88. * ERROR RETURN 00089000
  89. * 00090000
  90. * R15 = 1 INVALID FUNCTION OR PARAMETER LIST 00091000
  91. * R15 = 2 END-OF-FILE OR END-OF-TAPE ENCOUNTERED 00092000
  92. * R15 = 3 PERMANENT I/O ERROR 00093000
  93. * R15 = 4 ILLEGAL DEVICE ID SPECIFIED 00094000
  94. * R15 = 5 TAPE NOT ATTACHED 00095000
  95. * R15 = 6 TAPE IS FILE PROTECTED 00096000
  96. * R15 = 8 INCORRECT LENGTH 00096650
  97. * 00097300
  98. * CALLS TO OTHER ROUTINES: 00098000
  99. * 00099000
  100. * NONE 00100000
  101. * 00101000
  102. * EXTERNAL REFERENCES: 00102000
  103. * 00103000
  104. * NUCON - NUCLEUS AREA CONSTANTS 00104000
  105. * DEVTAB - DEVICE TABLE 00105000
  106. * 00106000
  107. * TABLES/WORKAREAS: 00107000
  108. * 00108000
  109. * COMTAB - TABLE OF TAPE FUNCTIONS 00109000
  110. * 00110000
  111. * REGISTER USAGE: 00111000
  112. * 00112000
  113. * GPR2 = BASE REGISTER 00113000
  114. * GPR1, GPR3 = PLIST 00114000
  115. * 00115000
  116. * NOTES: 00116000
  117. * 00117000
  118. * USES CP DIAGNOSE FOR I/O 00118000
  119. * 00118100
  120. * FOR 'READBK' OPERATION, THE BUFFER ADDRESS IN THE 00118200
  121. * PLIST MUST POINT TO THE LAST BYTE OF THE BUFFER. 00118300
  122. * 00118400
  123. * | "TAPEIO" IS TREATED AS A "COMMAND" OR A "FUNCTION" 00118500
  124. * | ACCORDING TO THE HIGH-ORDER BYTE OF R1 AT INPUT, VIZ: 00118600
  125. * | IF = X'0C', IT WAS ISSUED AS A COMMAND FROM DMSINT. 00118700
  126. * | IF = X'0D', IT WAS ISSUED FROM AN EXEC FILE (DMSEXT), 00118800
  127. * | WITH "&CONTROL" SET TO EITHER "CMS" OR "ALL". 00118900
  128. * | IF = X'0E', IT WAS ISSUED FROM AN EXEC FILE (DMSEXT), 00119000
  129. * | WITH "&CONTROL OFF" IN EFFECT. 00119100
  130. * | IF < X'0C' OR > X'0E', IT IS ASSUMED TO BE A FUNCTION, 00119200
  131. * | I.E. CALLED FROM ANOTHER PROGRAM. 00119300
  132. * 00119400
  133. * | TAPEIO MUST BE CALLED AS A FUNCTION; 00119500
  134. * | IF CALLED AS A COMMAND, AN ERROR 1 IS RETURNED. 00119600
  135. * 00119700
  136. * OPERATION: 00120000
  137. * 00121000
  138. * DMSTIO FIRST VERIFIES THAT THE DEVICE ID IS VALID. 00122000
  139. * IF THE FUNCTION IS A READ, WRITE, READBK, OR SENSE, A 00123000
  140. * CONTROL CCW IS BUILT TO SET THE MODE. IF THE MODE IS 00124000
  141. * OMITTED FROM THE PARAMETER LIST, THE MODE IS TAKEN @VA13323 00124500
  142. * FROM THE FIRST BYTE OF THE DEVMISC FIELD OF THE DEVTAB@VA13323 00125000
  143. * IN THE NUCLEUS. IF THERE IS NO MODE STORED IN THE @VA13323 00125500
  144. * DEVICE TABLE, THE DEFAULT MODE IS 1600 BPI FOR DUAL @VA13323 00126000
  145. * DENSITY TAPES, ODD PARITY CONVERTER OFF AND @VA13323 00126500
  146. * TRANSLATOR OFF FOR 7-TRACK TAPES. @VA13323 00127000
  147. * THE BUFFER ADDRESS AND BYTE COUNT ARE FILLED 00128000
  148. * INTO A READ, WRITE, READBK, OR SENSE CCW AND IT IS 00129000
  149. * COMMAND CHAINED TO THE CONTROL CCW. A DIAGNOSE 00130000
  150. * INSTRUCTION IS EXECUTED TO CAUSE CP TO INITIATE THE 00131000
  151. * I/O OPERATION. WHEN CONTROL IS RETURNED, THE 00132000
  152. * OPERATION IS COMPLETE AND NECESSARY RETRY OPERATIONS 00133000
  153. * HAVE ALREADY BEEN EXECUTED BY CP. IF THE FUNCTION IS 00134000
  154. * A CONTROL OPERATION, THE CCW STRING IS BUILT IN THE SAME 00135000
  155. * WAY. A 00136000
  156. * DIAGNOSE INSTRUCTION IS EXECUTED TO CAUSE THE I/O 00137000
  157. * OPERATION TO BE STARTED. CP WILL RETURN CONTROL AS 00138000
  158. * SOON AS THE OPERATION IS STARTED. CONTROL IS THEN 00139000
  159. * RETURNED TO THE CALLING PROGRAM. 00140000
  160. *. 00141000
  161. EJECT 00142000
  162. TAPEIO START 0 00143000
  163. DMSTIO EQU * 00144000
  164. ENTRY DMSTIO 00145000
  165. LR BASE,15 00146000
  166. USING TAPEIO,BASE 00147000
  167. LR PLIST,1 00148000
  168. USING PLISTX,PLIST 00149000
  169. USING NUCON,R0 ACCESS NUCLESUS CONSTANTS AREA 00150000
  170. USING SCRATCH,R13 00151000
  171. CLM R1,8,=X'0C' WAS TAPEIO CALLED AS A COMMAND? @VA01154 00152100
  172. BL OKFUN NO - OK (CALLED AS A FUNCTION). @VA01154 00152200
  173. CLM R1,8,=X'0E' CHECK FURTHER (0C/0D/0E) @VA01154 00152300
  174. BNH ERR01 ERROR IF CALLED FROM TERMINAL @VA01154 00152400
  175. * OR FROM AN EXEC FILE. 00152500
  176. OKFUN L TAPE,PTAPE OK - GET SYMBOLIC TAPE NAME, @VA01154 00152600
  177. CLI PTAPE,X'FF' IS THERE A 'FENCE' THERE INSTEAD ? LL 00155000
  178. BNE TPOK BNE IF NOT, TAPE NO. SHOULD BE OK. JS 00156000
  179. L TAPE,=CL4'TAP1' IF FENCE THERE, USE 'TAP1' INSTEAD. 00157000
  180. B TPOK2 SEE IF THE DEVICE IS ATTACHED 00159000
  181. * GET INDICES FOR DEVICE ADDRESS TABLE 00160000
  182. * 00161000
  183. TPOK EQU * 00162000
  184. LA XR1,PTAPE SEE IF THE DEVICE IS ALL NUMERIC 00163000
  185. LA XR2,4 COMPARE ALL FOUR CHARACTERS 00164000
  186. LOOP EQU * 00165000
  187. TM 0(XR1),X'F0' IS THIS CHARACTER NUMERIC 00166000
  188. BNO TPOK2 NO, COMPARE SYMBOLIC DEVICE 00167000
  189. LA XR1,1(,XR1) COMPARE THE NEXT CHARACTER 00168000
  190. BCT XR2,LOOP IF HAVEN'T COMPARED ALL 4 00169000
  191. XC DBLWRD1(L'DBLWRD1+L'DBLWRD2),DBLWRD1 00170000
  192. MVC DBLWRD1+4(4),PTAPE MOVE THE FIELD TO A DOUBLE WORD 00171000
  193. PACK DBLWRD2,DBLWRD1 FOR CONVERSION 00172000
  194. L TAPE,DBLWRD2+4 GET THE NUMBER 00173000
  195. SRL TAPE,4 SHIFT OFF THE SIGN 00174000
  196. TPOK2 EQU * COMPARE THE DEVADDR IN DEVICE TABLE 00175000
  197. L XR1,ADEVTAB XR1 = A(DEVICE TABLE) 00176000
  198. USING DEVSECT,XR1 ACCESS THE DEVICE TABLE SYMBOLLICALLY 00177000
  199. L XR3,ATABEND XR3 = A(END OF DEVICE TABLE) 00178000
  200. LA XR2,DEVSIZE XR2 = SIZE OF AN ENTRY IN THE DEVICE TBL. 00179000
  201. * 00180000
  202. * (XR1, XR2, & XR3 ALL SET FOR BXLE-LOOP NOW ...) JS 00181000
  203. * 00182000
  204. TLOP EQU * 00183000
  205. CL TAPE,DEVNAME COMPARE THE DEVICE NAMES 00184000
  206. BE FOUND 00185000
  207. CH TAPE,DEVADDR COMPARE THE DEVICE ADDRESSES 00186000
  208. BE FOUND 00187000
  209. BXLE XR1,XR2,TLOP 00188000
  210. B ERR04 00189000
  211. FOUND EQU * 00191000
  212. LR R0,R5 SAVE XR1 @VA11365 00191010
  213. LH R5,DEVADDR GET THE DEVICE CUU @VA11365 00191020
  214. DROP XR1 @VA11365 00191030
  215. DIAG R5,R6,X'24' DIAGNOSE FOR DEVICE INFO @VA11365 00191040
  216. BNE ERR05 DEVICE NOT ATTACHED @VA11365 00191050
  217. MVC MODECCW(16),DEFLTCCW SET CCW STRING FROM DEFAULT@V305032 00191100
  218. LR R5,R0 RESTORE XR1 @VA13323 00191102
  219. USING DEVSECT,R5 EST. ADDRESSABILITY TO DEVTAB @VA13323 00191104
  220. CLI DEVMISC,ZEROMODE IS THERE NO MODE IN DEVTAB @VA13323 00191106
  221. BE SKIPMODE NO MODE, USE DEFAULT @VA13323 00191108
  222. MVC MODECCW(1),DEVMISC GET THE MODE FROM THE DEVTAB @VA13323 00191110
  223. SKIPMODE EQU * @VA13323 00191112
  224. DROP R5 RELEASE REGISTER @VA13323 00191114
  225. ICM R15,B'1000',PBUFF PLIST MODESET @VA11365 00191120
  226. BZ PMODEOK OK IF NONE @VA11365 00191140
  227. CLM R7,B'0100',TYP3420 IS IT 3420 MODEL .? @VA11365 00191160
  228. BNE PMODEOK IF NOT, NO CHECK DONE..ELSE IS IT@VA11365 00191180
  229. CLM R7,B'0010',MODEL3 MODEL 3 OR LESS? @VA11365 00191200
  230. BNH TST34208 GO CHECK 800 BPI @VA11365 00191220
  231. CLM R7,B'0010',MODEL5 MODEL 5? @VA11365 00191240
  232. BE TST34208 GO CHECK 800 BPI @VA11365 00191260
  233. CLM R7,B'0010',MODEL7 MODEL 7? @VA11365 00191280
  234. BE TST34208 GO CHECK 800 BPI @VA11365 00191300
  235. TM PBUFF,D8009TRK 800 BPI? @VA11365 00191320
  236. BO ERR01 YES, ERROR 800 BPI NOT SUPPORTED @VA11365 00191340
  237. SLDL R6,25 NOW.. THIS IS SOME STRANGE WAY @VA11365 00191360
  238. * TO STRIP OFF THE DUAL DENSITY 00191380
  239. * FEATURE FROM R7, BUT THAT'S LIFE..!! 00191400
  240. LTR R7,R7 IS THE X'40' BIT ON.? @VA11365 00191420
  241. SRDL R6,25 MAKE R7 PRESENTABLE AGAIN @VA11365 00191440
  242. BM PMODEOK YES, 1600 SUPPORTED FOR 4,6,8 @VA11365 00191460
  243. TM PBUFF,TRK96250 DID HE ASK FOR 6250.? @VA11365 00191480
  244. BO PMODEOK LOOKS GOOD. 6250 IS THE DEFAULT @VA11365 00191500
  245. B ERR01 ELSE HE (SHE) IS WET..!! @VA11365 00191520
  246. TST34208 DS 0H @VA11365 00191540
  247. TM PBUFF,D8009TRK IS THIS 800 BPI ? @VA11365 00191560
  248. BNO TEST6250 BRANCH IF NOT TO CHECK 6250BPI @VA11365 00191580
  249. * HERE WE GO AGAIN TESTING FOR DUAL FTR 00191600
  250. SLDL R6,25 NOW.. THIS IS SOME STRANGE WAY @VA11365 00191620
  251. * TO STRIP OFF THE DUAL DENSITY 00191640
  252. * FEATURE FROM R7, BUT THAT'S LIFE.. 00191660
  253. LTR R7,R7 IS THE X'40' BIT ON.? @VA11365 00191680
  254. SRDL R6,25 MAKE R7 PRESENTABLE AGAIN @VA11365 00191700
  255. BNM ERR01 800 BPI NOT SUPPORTED @VA11365 00191720
  256. B PMODEOK ELSE ALL SET. @VA11365 00191740
  257. TEST6250 DS 0H @VA11365 00191760
  258. TM PBUFF,TRK96250 IS IT 6250.? @VA11365 00191780
  259. BO ERR01 YES, CAN'T HAVE IT.! @VA11365 00191800
  260. PMODEOK EQU * @VA11365 00191820
  261. LR R5,R0 RESTORE XR1 @VA11365 00191840
  262. LR R11,XR1 SAVE LOCATION OF DEVICE TABLE ENTRY 00192000
  263. USING DEVSECT,R11 ACCESS IN FUTURE FROM R11 00193000
  264. LH TAPE,DEVADDR GET THE DEVICE ADDRESS 00194000
  265. * 00195000
  266. * SEE IF THE TAPEIO FUNCTION IS VALID 00196000
  267. * 00197000
  268. LM XR1,XR3,COMTABX SEARCH FOR COMMAND 00198000
  269. LA R12,CONTRL1 SET BRANCH POINT FOR CONTROL COMMAND 00199000
  270. LA R15,RDBKSNS SET BRANCH POINT FOR READBK OR SENSE 00200000
  271. TLIP CLC PCOMM2(8),0(XR1) 00201000
  272. BE 8(,XR1) 00202000
  273. BXLE XR1,XR2,TLIP 00203000
  274. B ERR01 00204000
  275. EJECT 00205000
  276. * 00206000
  277. * SENSE AND READBK CONTROL COMMANDS 00207000
  278. * 00208000
  279. SPACE 2 00209000
  280. RDBKSNS EQU * 00210000
  281. MVC RDWRCCW(2),10(XR1) MOVE IN THE CONTROL CODE 00211000
  282. B READ10 FILL IN THE REST OF THE READ INFORMATION 00212000
  283. SPACE 2 00213000
  284. * 00214000
  285. * READ CONTROL COMMAND 00215000
  286. * 00216000
  287. SPACE 2 00217000
  288. READ05 EQU * 00218000
  289. MVI RDWRCCW,X'02' SET FOR READ @VM08813 00218100
  290. READ10 EQU * @VM08813 00218200
  291. MVI RDWRCCW+4,X'00' SET FLAGS 00225000
  292. B RDWR @VA01538 00227100
  293. SPACE 2 00229000
  294. * 00230000
  295. * WRITE CONTROL COMMAND 00231000
  296. * 00232000
  297. SPACE 2 00233000
  298. WRITE05 EQU * 00234000
  299. MVI RDWRCCW,X'01' SET THE MODE FOR WRITE 00235000
  300. * NOTE: SILI FLAG IS ALREADY SET 00236100
  301. SPACE 2 00243000
  302. * 00244000
  303. * READ / WRITE / READBK / SENSE 00245000
  304. * 00246000
  305. SPACE 2 00247000
  306. RDWR EQU * 00248000
  307. CLC PBUFF+1(3),=F'0' BUFFER ADDR ZERO ? @VA01538 00248125
  308. BE ERR01 YES, ERROR @VA01538 00248250
  309. CLC PBUFFSZ(4),=F'0' BUFFER LENGTH ZERO ? @VA01538 00248375
  310. BE ERR01 YES, ERROR @VA01538 00248500
  311. CLC PBUFFSZ(4),=F'65535' BUFF LEN EXCEEDS MAX ? @VA01538 00248625
  312. BH ERR01 YES, ERROR @VA01538 00248750
  313. MVC RDWRCCW+1(3),PBUFF+1 SET BUFFER ADDRESS 00249000
  314. MVC RDWRCCW+6(2),PBUFFSZ+2 SET BUFFER SIZE 00250000
  315. BAL LINK,TAPWAIT START THE TAPE AND WAIT 00251000
  316. L TEMP,PBUFFSZ GET BUFFER SIZE 00252000
  317. ST TEMP,PRECSZ SET RECORD READ SIZE 00253000
  318. B RETURN 00254000
  319. EJECT 00255000
  320. ******************************************************************* 00256000
  321. * 00257000
  322. * CONTROL MODES 00258000
  323. * 00259000
  324. ******************************************************************* 00260000
  325. SPACE 2 00261000
  326. CONTRL1 EQU * 00262000
  327. MVC RDWRCCW(2),10(XR1) MOVE IN THE CONTROL FUNCTION 00263000
  328. * NOTE: SILI FLAG IS SET & BYTE COUNT = 1 00264100
  329. BAL LINK,TAPWAIT 00266000
  330. B RETURN 00267000
  331. EJECT 00268000
  332. TAPWAIT EQU * 00269000
  333. * NOTE: DEFAULT MODE ALREADY SET @VA13323 00269400
  334. * TO THE MODE IN THE DEVTAB @VA13323 00269800
  335. * OR X'B3' IF THERE WAS NO @VA13323 00270200
  336. * MODE IN THE DEVTAB @VA13323 00270600
  337. ICM R15,8,PBUFF GET MODE-SET SPECIFIED BY CALLER @V305032 00271100
  338. BZ NOMODSET IF NONEXISTENT, KEEP THE DEFAULT @V305032 00272100
  339. STCM R15,8,MODECCW OTHERWISE USE CALLER'S MODE-SET. @V305032 00273100
  340. NOMODSET EQU * 00274000
  341. LA CAWADR,MODECCW SET THE A(CCW STRING) 00275000
  342. DIAG20 DC X'839A0020' DIAGNOSE TAPE I/O @VA03458 00276100
  343. BCR 8,LINK RETURN IF NO ERRORS 00277000
  344. BC 4,CKBUSY SEE IF BUSY OR NOT ATTACHED @VA03458 00278100
  345. BC 2,TEST2 BRANCH IF UNIT EXCEPTION OR INCOR LENGTH 00279000
  346. STH CAWADR,DEVMISC+2 SAVE THE SENSE INFO. FROM CP 00280000
  347. TM DEVMISC+2,X'80' COMMAND REJECT (WRITE)? V0033 00280100
  348. BNO ERR3A NOT A PROTECT ERR V0033 00280200
  349. TM DEVMISC+3,X'02' FILE PROTECTED ? 00281000
  350. BO FILEPRO BRANCH IF YES 00282000
  351. ERR3A EQU * @VA08542 00283100
  352. CH R15,DEC13 TEST RETCOD FOR PERM ERR @VA08542 00283110
  353. BE ERR03 SET RETCOD3 @VA08542 00283120
  354. XR XR3,XR3 SIGNAL UNIT CHECK @VA08542 00283130
  355. B TEST2A V0033 00283200
  356. SPACE 00284000
  357. CKBUSY CH R15,=H'5' WAS DEVICE BUSY? @VA03458 00284100
  358. BNE ERR05 NO - DEVICE NOT ATTACHED @VA03458 00284200
  359. B DIAG20 YES - TRY AGAIN @VA03458 00284300
  360. TEST2 CH R15,=H'2' IS IT A UNIT EXCEPTION 00285000
  361. BE UNITEXCP BRANCH IF YES 00286000
  362. TEST2A EQU * V0033 00286100
  363. LH R15,CSW+6 GET RESIDUAL COUNT 00287000
  364. N R15,=X'0000FFFF' CLEAR SIGN IF NEGATIVE 00288000
  365. L TEMP,PBUFFSZ LOAD BUFFER LENGTH 00289000
  366. SR TEMP,R15 SUBTRACT RESIDUAL COUNT 00290000
  367. ST TEMP,PRECSZ STORE NUMBER OF BYTES READ 00291000
  368. LTR R15,R15 IS THERE A RESIDUAL COUNT? @VA03457 00291025
  369. BZ INCLEN NO, THEN GIVE ERROR 8 @VA03457 00291050
  370. LTR XR3,XR3 WAS THERE A UNIT CHECK? V0033 00291100
  371. BZ ERR03 ERR RETURN WITH NO.BYTES READ V0033 00291200
  372. * OTHERWISE CONTINUE TO 'RETURN' ... 00292100
  373. RETURN SR 15,15 NORMAL RETURN 00294000
  374. BR 14 00295000
  375. ERR01 LA 15,1 INVALID COMMAND 00296000
  376. BR 14 00297000
  377. UNITEXCP LA 15,2 EOF 00298000
  378. BR 14 00299000
  379. ERR03 LA 15,3 PERM I/O ERROR 00300000
  380. BR 14 00301000
  381. ERR04 LA 15,4 ILLEGAL SYMBOLIC UNIT 00302000
  382. BR 14 00303000
  383. ERR05 LA R15,5 TAPE NOT ATTACHED 00304000
  384. BR R14 AND EXIT. 00305000
  385. * 00306000
  386. FILEPRO EQU * FILE-PROTECTED ON A 'WRITE' ... 00307000
  387. LA R15,6 ERROR NO. 6, 00308000
  388. BR R14 EXIT. 00309000
  389. INCLEN LA R15,8 INCORRECT LENGTH ERROR @VA03457 00309100
  390. BR R14 @VA03457 00309200
  391. DEC13 DC H'13' RETCOD FROM DIAG 20 @VA08542 00309210
  392. EJECT 00310000
  393. PLISTX DSECT 00311000
  394. PCOMM1 DC CL8'TAPEIO' 00312000
  395. PCOMM2 DC CL8' ' 00313000
  396. PTAPE DC CL4'TAPX' SYMBOLIC TAPE ADDRESS 00314000
  397. PBUFF DC A(0) BUFFER ADDRESS 00315000
  398. PBUFFSZ DC F'0' BUFFER SIZE 00316000
  399. PRECSZ DC F'0' ACTUAL NO. OF BYTES READ 00317000
  400. SPACE 00317100
  401. SCRATCH DSECT 00318000
  402. DBLWRD1 DS 1D 00319000
  403. DBLWRD2 DS 1D 00320000
  404. * FILLED-IN CCW-STRING .. 00320100
  405. MODECCW CCW X'B3',0,SILI+CC,1 800,ODD,CONV-OFF,TRANS-OFF @V305032 00320200
  406. RDWRCCW CCW *-*,*-*,SILI,*-* READ, WRITE, CONTROL @V305032 00320300
  407. SPACE 00320400
  408. TAPEIO CSECT 00321000
  409. EJECT 00322000
  410. * 00323000
  411. * CONSTANTS 00324000
  412. BASE EQU 2 00325000
  413. PLIST EQU 3 00326000
  414. LINK EQU 4 00327000
  415. XR1 EQU 5 00328000
  416. XR2 EQU 6 00329000
  417. XR3 EQU 7 00330000
  418. TAPE EQU 9 00331000
  419. TEMP EQU 8 00332000
  420. CAWADR EQU 10 00333000
  421. * 00334000
  422. * 00335000
  423. COMTAB DS 0F 00336000
  424. DC CL8'READ' 00337000
  425. B READ05 00338000
  426. DC CL8'WRITE' 00339000
  427. B WRITE05 00340000
  428. DC CL8'REW' REWIND 00341000
  429. BR R12 00342000
  430. DC X'0700' 00343000
  431. DC CL8'WTM' 00344000
  432. BR R12 00345000
  433. DC X'1F00' 00346000
  434. DC CL8'RUN' 00347000
  435. BR R12 00348000
  436. DC X'0F00' 00349000
  437. DC CL8'BSR' 00350000
  438. BR R12 00351000
  439. DC X'2700' 00352000
  440. DC CL8'FSR' 00353000
  441. BR R12 00354000
  442. DC X'3700' 00355000
  443. DC CL8'FSF' 00356000
  444. BR R12 00357000
  445. DC X'3F00' 00358000
  446. DC CL8'BSF' 00359000
  447. BR R12 00360000
  448. DC X'2F00' 00361000
  449. DC CL8'ERG' JS 00362000
  450. BR R12 JS 00363000
  451. DC X'1700' JS 00364000
  452. DC CL8'SENSE' SENSE 00365000
  453. BR R15 00366000
  454. DC X'0400' 00367000
  455. DC CL8'READBK' READBK 00368000
  456. BR R15 00369000
  457. DC X'0C00' 00370000
  458. COMTABN EQU * 00371000
  459. COMTABX DC A(COMTAB,12,COMTABN-12) 00372000
  460. * 00373000
  461. * 00374000
  462. * DEFAULT (INITIAL) VALUES FOR MODECCW AND RDWRCCW .. 00375100
  463. DEFLTCCW CCW X'B3',0,SILI+CC,1 800,ODD,CONV-OFF,TRANS-OFF @V305032 00375600
  464. CCW *-*,*-*,SILI,1 READ, WRITE, CONTROL @V305032 00376100
  465. * 00376200
  466. MODEL3 DC X'03' 3420 MODEL 3 @VA11365 00376300
  467. MODEL5 DC X'05' 3420 MODEL 5 @VA11365 00376400
  468. MODEL7 DC X'07' 3420 MODEL 7 @VA11365 00376500
  469. TYP3420 DC X'10' 3420 TAPE DRIVE..!! @VA11365 00376600
  470. D8009TRK EQU X'CB' MODESET - 9 TRACK, 800 BPI @VA11365 00376700
  471. TRK96250 EQU X'D3' MODESET - 9 TRACK, 6250 BPI @VA11365 00376800
  472. * 00377000
  473. ZEROMODE EQU X'00' INDICATES DEVTAB HAS NO MODE @VA13323 00377500
  474. LTORG 00378000
  475. EJECT 00379000
  476. NUCON 00380000
  477. DEVSECT 00381000
  478. REGEQU 00382000
  479. EQUATES 00383000
  480. END 00384000