User Tools

Site Tools


ibm:vm370-lib:cms:dmsseb.assemble_src

DMSSEB Source

References

Source Listing

DMSSEB.ASSEMBLE.txt
  1. SEB TITLE 'DMSSEB (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00003000
  4. * 00004000
  5. * 00005000
  6. * 00006000
  7. * 00007000
  8. * MODULE NAME: 00008000
  9. * 00009000
  10. * DMSSEB (SOEOB - END OF BLOCK) 00010000
  11. * 00011000
  12. * FUNCTION: 00012000
  13. * 00013000
  14. * CALLS DEVICE I/O ROUTINES TO DO I/O AND SETUP ECB 00014000
  15. * AND IOB RETURN CODES. 00015000
  16. * 00016000
  17. * ATTRIBUTES: 00017000
  18. * 00018000
  19. * REENTRANT, SEGMENT RESIDENT 00019000
  20. * 00020000
  21. * ENTRY POINTS: 00021000
  22. * 00022000
  23. * DMSSEB, DMSSEBOS 00023000
  24. * 00024000
  25. * ENTRY CONDITIONS: 00025000
  26. * 00026000
  27. * R2 - A(DCB) 00027000
  28. * R11 - A(FCB) 00028000
  29. * R14 - RETURN ADDRESS 00029000
  30. * R15 - A(DMSSEB) 00030000
  31. * 00031000
  32. * EXIT CONDITIONS: 00032000
  33. * 00033000
  34. * NORMAL - 00034000
  35. * RETURN TO CALLER WITH CODE IN DECB AND FCB. 00035000
  36. * THE 1ST BYTE OF CODE IN THE ECB IS X'42'(ERROR) OR X'7F'(NO 00036000
  37. * ERROR), THE NEXT TWO BYTES ARE ZERO AND THE LAST BYTE IS THE 00037000
  38. * RETURN CODE FROM THE ROUTINE CALLED TO DO THE I/O. 00038000
  39. * 00039000
  40. * ERROR - 00040000
  41. * NONE. 00041000
  42. * 00042000
  43. * CALLS TO OTHER ROUTINES: 00043000
  44. * 00044000
  45. * DMSFNS, GETMAIN, DMSBRD, DMSBWR, DMSROS 00045000
  46. * DMSCIO, DMSCRD, DMSCWR, DMSPIO, DMSTIO, AND THE FCBPROC 00046000
  47. * ROUTINE IF ONE IS SPECIFIED. 00047000
  48. * 00048000
  49. * EXTERNAL REFERENCES: 00049000
  50. * 00050000
  51. * OPSECT, NUCON, FCBSECT, IHADCB, IHADECB. 00051000
  52. * 00052000
  53. * TABLES/WORKAREAS: 00053000
  54. * 00054000
  55. * NONE. 00055000
  56. * 00056000
  57. * REGISTER USAGE: 00057000
  58. * 00058000
  59. * R0 - WORK 00059000
  60. * R1 - DECB 00060000
  61. * R2 - DCB 00061000
  62. * R3 - BASE 00062000
  63. * R8 - OPSECT DSECT 00063000
  64. * R11 - FCB DSECT 00064000
  65. * R13 - SAVE AREA 00065000
  66. * R14, R15 - WORK 00066000
  67. * R2, R4 - R7, R9 - R13 - MUST NOT BE CHANGED BY DMSSEB 00067000
  68. * 00068000
  69. * OPERATION: 00069000
  70. * 00070000
  71. * EOBROUTN: IF THE FCB OS BIT IS ON, CONTROL IS PASSED 00071000
  72. * TO OSREAD. OTHERWISE, IF NO SPECIAL I/O ROUTINE IS 00072000
  73. * SPECIFIED IN FCBPROC, CONTROL PASSES TO EOB2. IF THE 00073000
  74. * BATCH BIT IS NOT ON AND AN FCBPROC ROUTINE IS SPECIFIED, 00074000
  75. * CONTROL IS PASSED TO THE ADDRESS IN FCBPROC. ON RETURN FROM 00075000
  76. * FCBPROC, IF THE I/O WAS DONE, CONTROL IS PASSED TO EOBRETRN. 00076000
  77. * IF THE I/O WAS NOT DONE, CONTROL IS PASSED TO EOB2. 00077000
  78. * 00078000
  79. * OSREAD: DMSROS IS CALLED TO PERFORM A READ OR WRITE 00079000
  80. * AND THEN CONTROL IS PASSED TO EOBRETRN. 00080000
  81. * 00081000
  82. * EOB2: IF I/O IS TO BE PERFORMED OR IF THERE WAS NO 00082000
  83. * ADDRESS IN FCBPROC, FCBDEV IS PICKED UP AND 00083000
  84. * CONTROL PASSED TO THE APPROPRIATE DEVICE DEPENDENT 00084000
  85. * CODE. IN ALL CASES, WHEN DEVICE DEPENDENT PROCESSING 00085000
  86. * IS COMPLETED, RETURN IS VIA EOBRETRN. 00086000
  87. * 00087000
  88. * EOBRETRN: A COMPLETION CODE OF X'42'(ERROR) OR X'7F' 00088000
  89. * (NO ERROR) IS STORED IN THE ECB AND IOBECBCC FIELDS 00089000
  90. * ALONG WITH A CMS ERROR CODE; THE RESIDUAL COUNT, IF ANY, 00090000
  91. * IS STORED IN IOBCSW+6 AND RETURN IS MADE TO THE CALLER. 00091000
  92. * 00092000
  93. * CONSOLE: IF A READ IS SPECIFIED, DMSCRD IS CALLED TO 00093000
  94. * READ A RECORD FROM THE CONSOLE, THE RECORD IS MOVED TO THE 00094000
  95. * USERS BUFFER AND CONTROL IS PASSED TO EOBRETRN. IF WRITE 00095000
  96. * IS SPECIFIED, DCBRECFM IS CHECKED FOR THE ASA BIT. IF IT 00096000
  97. * IS ON, THE FIRST BYTE OF THE RECORD IS USED AS A CHARIAGE 00097000
  98. * CONTROL CHARACTER. DMSCWR IS THEN CALLED TO TYPE THE RECORD 00098000
  99. * AND CONTROL IS PASSED TO EOBRETRN. 00099000
  100. * 00100000
  101. * DISK: A CHECK IS MADE TO DETERMINE IF DCBRECFM IS 00101000
  102. * VARIABLE AND IF THE FILE MODE IS OTHER THAN 4. IF NOT, 00102000
  103. * CONTROL IS PASSED TO CKRDWR. OTHERWISE, VARIABLE 00103000
  104. * RECORDS ARE READ INTO OR WRITTEN OUT OF A BUFFER 00104000
  105. * ONE AT A TIME BY CALLS TO CKRDWR UNTIL THE BUFFER 00105000
  106. * IS ENTIRELY READ OR WRITTEN. CONTROL IS THEN PASSED 00106000
  107. * TO EOBRETRN. 00107000
  108. * 00108000
  109. * CKRDWR: DMSBRD OR DMSBWR IS CALLED TO READ OR WRITE 00109000
  110. * A RECORD. IF AN ERROR CODE OF 9 IS RETURNED, DMSFNS IS 00110000
  111. * CALLED TO CLOSE THE FILE AND DMSBRD OR DMSBWR IS CALLED 00111000
  112. * AGAIN. IF WRITE WAS SPECIFIED, CONTROL IS PASSED 00112000
  113. * TO EITHER THE VARIABLE BLOCKING ROUTINE, IF IT WAS THE 00113000
  114. * CALLER, OR EOBRETRN. IF READ WAS SPECIFIED AND IF ANY 00114000
  115. * ERRORS WERE ENCOUNTERED, CONTROL IS RETURNED TO EITHER 00115000
  116. * THE VARIABLE BLOCKING ROUTINE, IF IT WAS THE CALLER, 00116000
  117. * OR EOBRETRN. IF READ WAS SPECIFIED AND NO ERRORS WERE 00117000
  118. * ENCOUNTERED, A CHECK IS MADE OF THE BUFFER TO SEE IF 00118000
  119. * A SHORT BLOCK OR EOF RECORD (X'61FFFF61') WAS READ. 00119000
  120. * IF AN EOF RECORD WAS READ, AN ERROR CODE IS SET. IF 00120000
  121. * A SHORT BLOCK WAS READ, AN INDICATOR IS SET IN 00121000
  122. * DCBFDAD TO INSURE THAT ANOTHER READ TO THIS DATA 00122000
  123. * SET WILL CAUSE AN EOF ERROR. CONTROL IS THEN RETURNED 00123000
  124. * TO EITHER THE VARIABLE BLOCKING ROUTINE, IF IT WAS THE 00124000
  125. * CALLER, OR EOBRETRN. 00125000
  126. * 00126000
  127. * READR: DMSCIO IS CALLED WITH THE ADDRESS 00127000
  128. * OF THE IOAREA IN THE PLIST. 00128000
  129. * AFTER THE RECORD IS READ IN, CONTROL IS PASSED TO EOBRETRN. 00129000
  130. * 00130000
  131. * PUNCH AND PRINT: RECORDS ARE WRITTEN OUT OF A BUFFER 00131000
  132. * ONE AT A TIME BY CALLS TO DMSCIO OR DMSPIO UNTIL THE BUFFER 00132000
  133. * IS EMPTY. CONTROL IS THEN RETURNED TO EOBRETRN. IF PRINT 00133000
  134. * IS SPECIFIED AND NO CONTROL CHARACTERS ARE SPECIFIED IN 00134000
  135. * DCBRECFM, A BLANK IS ADDED TO THE FRONT OF THE RECORD 00135000
  136. * BEFORE CALLING DMSPIO. 00136000
  137. * 00137000
  138. * TAPE: A PLIST IS BUILT FROM INFORMATION IN THE FCB AND 00138000
  139. * TAPEIO IS CALLED TO READ OR WRITE A BLOCK OF DATA. CONTROL 00139000
  140. * IS THEN PASSED TO EOBRETRN. 00140000
  141. * 00141000
  142. * 00142000
  143. *. 00143000
  144. EJECT 00144000
  145. * 00145000
  146. DMSSEB START 0 00146000
  147. USING DMSSEB,R3 00147000
  148. LR R3,R15 SET BASE REG 00148000
  149. USING OPSECT,R8 00149000
  150. USING NUCON,R0 00150000
  151. USING FCBSECT,R11 00151000
  152. USING IHADCB,R2 00152000
  153. USING IHADECB,R1 00153000
  154. FS EQU X'08' FIXED STANDARD INDICATOR 00154000
  155. ASA EQU X'04' ASA CNTRL SPECIFICATION 00155000
  156. MCH EQU X'02' MACHINE CNTRL SPECIFICATION 00156000
  157. L R8,AOPSECT GET V(OPSECT) BASE 00157000
  158. STM R14,R1,SAVER14 SAVE SOME REGS 00158000
  159. ST R14,SEBSAV DYNAMICALLY SAVE R14 @VA02691 00159000
  160. XC FCBBYTE(2),FCBBYTE ZERO HIGH ORDER TWO BYTES 00160000
  161. EJECT 00161000
  162. * 00162000
  163. * SET "EVENT CONTROL BLOCK" (ECB) STATUS 00163000
  164. * 00164000
  165. L R14,DCBIOBA GET IOB ADDR 00165000
  166. MVI IOBBECBC(R14),X'80' SET IOB COMPLETION CODE 00166000
  167. L R14,IOBBECBP(R14) GET ECB ADDR FROM IOB 00167000
  168. MVI 0(R14),X'80' SIGNAL: AWAITING EVENT COMPLETION 00168000
  169. ST R11,FCBIO SET A(LAST FCB REFERENCED) 00169000
  170. TM FCBINIT,FCBOS IS THIS AN OS FCB @V201122 00170000
  171. BO OSREAD YES, GO TO OS READ ROUTINE @V201122 00171000
  172. EOB1 EQU * SERIVCE COMPILER DEPENDENT DATA SETS 00172000
  173. EJECT 00173000
  174. * 00174000
  175. * DURING THE EXECUTION OF A LANGAGE PROCESSOR (ASSEMBLER, FORTRAN, 00175000
  176. * PL/I, C...L; SPECIAL I/O HANDLING OF CERTAIN DATA SETS MAY BE 00176000
  177. * DONE BY PLACING THE ADDRESSES OF THESE SPAECIAL ROUTINES INTO 00177000
  178. * "FCBPROC ". THE EOB ROUTINE WILL TRANSFER TO THE LOCATION SPECIFIED 00178000
  179. * BY "FCBPROC ". THE ROUTINE MUST SAVE ALL REGS, AND RESTORE THEM. 00179000
  180. * UPON RETURN HERE: R15=0 PERFORM I/O REQUEST; R15>0 RESIDUAL 00180000
  181. * COUNT; R15<0 ERROR CODE. 00181000
  182. L R15,FCBPROC COMPILER-DEPENDENT I/O AUXILIARY ROUT 00182000
  183. LTR R15,R15 IS IT ACTIVE? TR 00183000
  184. BZ EOB2 NO. MIND YOUR OWN BUSINESS 00184000
  185. BALR R14,R15 GO MAN. 00185000
  186. LTR R15,R15 SHOULD I/O BE PERFORMED? 00186000
  187. BZ EOB2 YES. 00187000
  188. BP EOB3 I/O WAS DONE. R15 = RESIDUAL COUNT 00188000
  189. LPR R15,R15 I/O WAS DONE. R15=ERROR CODE 00189000
  190. B ERRRTN 00190000
  191. EOB3 LR R1,R15 GET N'BYTES ACTUALLY READ 00191000
  192. B DSKRET 00192000
  193. EJECT 00193000
  194. * 00194000
  195. * EXECUTE DEVICE DEPENDENT I/O OPERATION IN CMS! 00195000
  196. * 00196000
  197. EOB2 IC R15,FCBDEV PICK UP DEVICE TYPE CODE TR 00197000
  198. B *+4(R15) GO TO DEVICE DEPENDENT ROUTINE 00198000
  199. B DUMMY 00199000
  200. B PRINT 00200000
  201. B READR 00201000
  202. B CONSOLE 00202000
  203. B TAPE 00203000
  204. B DISK 00204000
  205. B PUNCH 00205000
  206. B CRT 00206000
  207. * 00207000
  208. * RETURN TO MASTER I/O MODULES 00208000
  209. * 00209000
  210. EOBRETRN DS 0H 00210000
  211. * R1=F'RESIDUAL COUNT' R14=X'ECB CODE' R15=X'CMS CODE' 00211000
  212. LR R0,R1 SAVE REG 1 00212000
  213. L R1,DCBIOBA GET ADDR OF IOB 00213000
  214. STH R0,IOBBCSW+6(,R1) SET RESIDUAL COUNT 00214000
  215. STC R14,IOBBECBC(,R1) SET IOB ECB COMPLETION CODE 00215000
  216. L R1,IOBBECBP(,R1) GET ECB PTR FROM IOB 00216000
  217. ST R15,0(,R1) SET CMS ERROR CODE 00217000
  218. STC R14,0(,R1) SET ECB CODE 00218000
  219. ST R13,FCBR13 SAVE REG 13 00219000
  220. L R14,SEBSAV RESTORE SAVED R14 FOR RETURN @VA02691 00220000
  221. LA R14,0(0,R14) CLEAR HI ORDER BYTE @VA03023 00221000
  222. BR R14 00222000
  223. EJECT 00223000
  224. * CODE FOR CMS OS ACCESS 00224000
  225. * 00225000
  226. OSREAD LA R1,FCBOP GET ADDR OF READ PLIST @V201122 00226000
  227. LA R15,SEBOS GET ADDRESS FOR SVC 203 ROUTINE, @VM03048 00227000
  228. SVC 203 AND CALL SVC 203 TO PASS CONTROL @VM03048 00228000
  229. DC H'-16' TO SEBOS BELOW. @VM03048 00229000
  230. LTR R15,R15 ANY DMSROS ERRORS ? @VM03048 00230000
  231. BZ GETCNT NO, ALL FINE AND DANDY.. @VM03048 00231000
  232. MVC SEBSAV(1),FCBFORM+1 PRESERVE THIS BYTE @VA03023 00232000
  233. SR R14,R14 ELSE CLEAR INTERNAL RETURN, @VM03048 00233000
  234. B DSKERR AND GO HANDLE ERROR. @VM03048 00234000
  235. * 00235000
  236. * NOTE: WHEN THE SVC 203 (ABOVE) IS ISSUED, REGISTER 15 POINTS 00236000
  237. * TO SEBOS, SO THAT DMSITS GIVES CONTROL HERE. NOTE THAT 00237000
  238. * REGISTER 14 CONTAINS THE ADDRESS OF CMSRET, SO AS WHEN 00238000
  239. * DMSROS RETURNS TO DMSITS, CONTROL WILL RETURN BACK TO 00239000
  240. * THE INSTRUCTION AFTER SVC 203 + 2 BYTES OF CODE . 00240000
  241. * 00241000
  242. SEBOS L R15,ADMSROS GET ADDRESS OF DMSROS @VM03048 00242000
  243. B 8(R15) AND GO TO DMSROS READ SEQ. @VM03048 00243000
  244. EJECT 00244000
  245. *********************************************************************** 00245000
  246. * * 00246000
  247. * DEVICE DEPENDENT INPUT/OUTPUT SERVICES * 00247000
  248. * * 00248000
  249. *********************************************************************** 00249000
  250. SPACE 3 00250000
  251. * 00251000
  252. * CRT 00252000
  253. * 00253000
  254. CRT EQU * 00254000
  255. LA R15,X'FF' CMS: DEVICE NOT SUPPORTED 00255000
  256. B ERRRTN 00256000
  257. SPACE 10 00257000
  258. * 00258000
  259. * CONSOLE TYPEWRITER 00259000
  260. * 00260000
  261. CONSOLE DS 0H CONSOLE ACTIVITY 00261000
  262. TM IOBIOFLG,IOBIN INPUT? 00262000
  263. BO CONSOLRD YES. 00263000
  264. * TYPE OUTPUT 00264000
  265. CONSOLWR EQU * CONSOLE OUTPUT 00265000
  266. L R14,FCBBYTE GET BYTE COUNT 00266000
  267. L R1,FCBBUFF GET BUFFER ADDR 00267000
  268. TM DCBRECFM,FXD IS RECFM VAR 00268000
  269. BO CONWR NO, CONTINUE 00269000
  270. LA R1,8(R1) ALLOW FOR BDW AND RDW 00270000
  271. SH R14,HALF8 DO NOT PRINT BDW AND RDW 00271000
  272. CONWR ST R1,CONWRBUF FILL IN BUFFER ADDR 00272000
  273. TM DCBRECFM,ASA ARE ASA CNTRL CHARACTERS SPECIFIED 00273000
  274. BNO TYPE NO, GO DO I/O 00274000
  275. LA R15,1(,R1) DO NOT PRINT CNTRL CHARACTER 00275000
  276. ST R15,CONWRBUF FILL IN NEW BUFFER ADDR 00276000
  277. BCTR R14,R0 SUBTRACT 1 FROM BYTE COUNT 00277000
  278. CLI 0(R1),C' ' IS NORMAL SPACING SPECIFIED 00278000
  279. BE TYPE YES, GO DO I/O 00279000
  280. CLI 0(R1),C'+' IS NO SPACING SPECIFIED 00280000
  281. BNE SPACE1 NO, CONTINUE 00281000
  282. OI CONWRCOD+1,X'80' INDICATE NO SPACE V0018 00282000
  283. B TYPE GO DO I/O 00283000
  284. SPACE1 SR R15,R15 ZERO BYTE COUNT 00284000
  285. STH R15,CONWRCNT INDICATE NULL LINE 00285000
  286. CLI 0(R1),C'-' ARE 2 SPACES SPECIFIED 00286000
  287. LA R1,CONWRITE GET ADDR OF PLIST 00287000
  288. BNE SPACE2 NO, ONLY SPACE ONCE 00288000
  289. SVC 202 SPACE 1 00289000
  290. DC AL4(*+4) 00290000
  291. SPACE2 SVC 202 SPACE 1 00291000
  292. DC AL4(*+4) 00292000
  293. TYPE STH R14,CONWRCNT SET BYTE SIZE 00293000
  294. OI CONWRCOD+1,X'20' SET NO MAX TO LINE LENGTH @VA05719 00294000
  295. LA R1,CONWRITE 00295000
  296. SVC 202 00296000
  297. DC AL4(*+4) 00297000
  298. NI CONWRCOD+1,X'5F' RESET NOMAX,NORETN INDICATOR @VA05719 00298000
  299. B CONRET 00299000
  300. * TYPE INPUT 00300000
  301. CONSOLRD EQU * CONSOLE OUTPUT 00301000
  302. MVI CONRDCOD,C'U' SET FOR TRANS TO UPPER CASE 00302000
  303. TM FCBIOSW,FCBCASE IS LOWER CASE SW SET 00303000
  304. BNO RDCON NO, GO READ FROM CONSOLE 00304000
  305. MVI CONRDCOD,C'S' YES, SET FOR NO TRANSLATE @VA04103 00305000
  306. RDCON LA R1,CONREAD GET ADDR OF CONSOLE PLIST 00306000
  307. SVC 202 00307000
  308. DC AL4(*+4) 00308000
  309. TM TSOFLAGS,TSOATCNL WAS THIS READ CANCELLED P3056 00309000
  310. BO RDCON YES, THEN RETRY READ P3056 00310000
  311. LH R1,CONRDCNT GET NO. BYTES READ 00311000
  312. CKCONEOF LTR R15,R1 BYTES READ = ZERO 00312000
  313. BZ EOFERR YES, GO TO EOF ERROR RTN @VA13662 00313000
  314. L R14,FCBBUFF GET 'TO' ADDR 00314000
  315. L R0,FCBBYTE GET NO. BYTES REQUESTED 00315000
  316. TM DCBRECFM,UND IS RECFM UNDEFINED 00316000
  317. BO CKSIZE YES, CHECK SIZE OF BYTES READ 00317000
  318. TM DCBRECFM,FXD IS RECFM VAR 00318000
  319. BO CONRESID NO, CONTINUE 00319000
  320. LA R1,4(R1) ADD 4 FOR LRECL 00320000
  321. XC FCBOP(8),FCBOP CLEAR FCBOP 00321000
  322. STH R1,FCBOP+4 STORE LRECL 00322000
  323. LA R1,4(R1) ADD 4 FOR BLKSIZE 00323000
  324. STH R1,FCBOP STORE BLKSI 00324000
  325. MVC 0(8,R14),FCBOP MOVE BDW AND RDW INTO BUFFER 00325000
  326. LA R14,8(R14) ADD 8 TO BUFFER ADDR 00326000
  327. SH R0,HALF8 ALLOW FOR BDW AND RDW 00327000
  328. CKSIZE C R1,FCBBYTE NO. BYTES READ > BYTES REQUESTED 00328000
  329. BNH MOVEREC NO, THEN MOVE BYTES READ 00329000
  330. LR R1,R0 SET BYTES READ = BYTES REQUESTED 00330000
  331. B CKCONEOF RESET BDW AND RDW TO NEW COUNT 00331000
  332. CONRESID LR R15,R0 MOVE NO. BYTES ASKED FOR 00332000
  333. LR R1,R0 RESIDUAL COUNT= 0 00333000
  334. SETMOVE C R1,FCBBYTE IS MOVE MORE THAN REQUESTED 00334000
  335. BNH MOVEREC NO, THEN MOVE RECORD 00335000
  336. LR R15,R0 MOVE ONLY NO. REQUESTED 00336000
  337. L R1,FCBBYTE BYTES READ= BYTES REQUESTED 00337000
  338. MOVEREC BCTR R15,R0 SUBTRACT ONE FOR MOVE 00338000
  339. EX R15,MOVCONRD MOVE BYTES READ 00339000
  340. L R15,FCBBYTE GET NO. REQUESTED 00340000
  341. ST R1,FCBREAD SET NO. OF BYTES READ 00341000
  342. SR R15,R1 GET RESIDUAL COUNT 00342000
  343. LR R1,R15 SET FOR RETURN 00343000
  344. B CONRET RETURN 00344000
  345. MOVCONRD MVC 0(*-*,R14),CMNDLINE MOVE CONSOLE INPUT RECORD 00345000
  346. EJECT 00346000
  347. * 00347000
  348. * DISK OPERATIONS 00348000
  349. * 00349000
  350. DISK EQU * 00350000
  351. SR R14,R14 ZERO REG 14 00351000
  352. TM DCBRECFM,FXD IS RECFM FXD OR UNFORMATED 00352000
  353. BO CKRDWR YES, THEN GO DO I/O 00353000
  354. CLI FCBDSMD+1,C'4' IS THIS A P4 FILE ? 00354000
  355. BE CKRDWR YES, THEN GO DO I/O 00355000
  356. MVC FCBOP+4(2),FCBITEM SAVE FCBITEM 00356000
  357. TM IOBIOFLG,IOBIN INPUT? 00357000
  358. BNO VAROUT NO, THEN GO TO OUTPUT RTN 00358000
  359. * 00359000
  360. VARIN EQU * 00360000
  361. L R0,FCBBUFF GET BUFFER ADDR 00361000
  362. L R1,FCBBYTE GET BLKSIZE @VA01052 00362000
  363. TM DCBRECFM,BLK BLOCKING? @VA01052 00363000
  364. BNO UPFORBDW NO,READ BLKSIZE @VA01052 00364000
  365. LH R1,FCBRECL GET RECORD LENGTH 00365000
  366. UPFORBDW EQU * @VA01052 00366000
  367. SH R1,HALF4+2 SUBTRACT 4 00367000
  368. STH R1,FCBBYTE+2 STORE BYTE SIZE 00368000
  369. LR R1,R0 SET R1 00369000
  370. LA R1,4(R1) BYPASS BDW 00370000
  371. RDVAR LA R1,4(R1) BYPASS RDW 00371000
  372. ST R1,FCBBUFF SET BUFFER ADDR 00372000
  373. MVC FCBITEM(2),FCBOP+4 SET FCBITEM 00373000
  374. BAL R14,CKRDWR GO DO I/O 00374000
  375. STH R15,FCBOP+4 SAVE ITEM NO. 00375000
  376. L R1,FCBBUFF GET BUFFER ADDR 00376000
  377. LR R15,R1 SAVE BUFFER ADDR 00377000
  378. SH R1,HALF4+2 GET ADDR OF RDW 00378000
  379. L R14,FCBREAD GET NO. BYTES READ 00379000
  380. LA R14,4(R14) ADD FOUR 00380000
  381. ST R14,FCBBUFF 00381000
  382. MVC 0(2,R1),FCBBUFF+2 FILL IN RDW 00382000
  383. XC 2(2,R1),2(R1) CLEAR 2ND HALF OF RDW 00383000
  384. AH R15,FCBREAD+2 GET ADDR. OF NEXT RECORD. 00384000
  385. LR R1,R15 RESTORE REG 1 00385000
  386. SR R15,R0 GET AMT. IN BUFFER 00386000
  387. TM DCBRECFM,BLK IS BLOCKING SPECIFIED 00387000
  388. BNO VARRET NO, THEN RETURN 00388000
  389. AH R15,FCBRECL ADD LRECL 00389000
  390. CH R15,DCBBLKSI IS BUFFER FULL 00390000
  391. BNH RDVAR NO, GO READ RECORD 00391000
  392. SH R15,FCBRECL GET SIZE OF BLOCK 00392000
  393. VARRET ST R15,FCBREAD FILL IN FCBREAD 00393000
  394. MVC FCBBYTE+2(2),DCBBLKSI SET FCBBYTE TO BLKSI 00394000
  395. LR R15,R0 GET ADDR OF BDW 00395000
  396. MVC 0(2,R15),FCBREAD+2 FILL IN BDW 00396000
  397. XC 2(2,R15),2(R15) CLEAR 2ND HALF OF BDW 00397000
  398. B RESIDUAL BLOCK COMPLETE, SO RETURN 00398000
  399. VAREOF CH R15,=H'12' IS THIS AN EOF CODE 00399000
  400. BNE ERRRTN NO, GO TO ERROR RTN. 00400000
  401. TM IOBIOFLG,IOBIN WAS A READ JUST ISSUED? @VM28920 00401000
  402. BNO ERRRTN NO, THEN RETURN ERROR CODE @VM28920 00402000
  403. L R15,FCBBUFF GET ADDR OF BUFFER 00403000
  404. SH R15,HALF4+2 GET RDW ADDR 00404000
  405. SR R15,R0 GET NO. BYTES READ 00405000
  406. CH R15,HALF4+2 IS THIS START OF BUFFER 00406000
  407. BE ERR12 GO TO EOF ROUTINE 00407000
  408. B VARRET BLOCK FULL, RETURN 00408000
  409. * 00409000
  410. VAROUT EQU * 00410000
  411. L R15,FCBBUFF GET A(BDW) 00411000
  412. MVC FCBOP(2),0(R15) ALLIGN BDW 00412000
  413. LH R0,FCBOP GET BDW 00413000
  414. N R0,HALFWORD 00414000
  415. SH R0,HALF4+2 DISCOUNT L'BDW 00415000
  416. LA R15,4(,R15) PTT A(FIRST RDW) 00416000
  417. WRVAR MVC FCBOP(2),0(R15) ALLIGN RDW 00417000
  418. LH R1,FCBOP GET RDW 00418000
  419. SR R0,R1 DISCOUNT LENGTH OF RECORD 00419000
  420. SH R1,HALF4+2 DISCOUNT L'RDW 00420000
  421. ST R1,FCBBYTE SET OUTPUT BYTE COUNT 00421000
  422. LA R15,4(,R15) PTT DATA IF THIS RECORD 00422000
  423. ST R15,FCBBUFF SET OUTPUT BUFFER 00423000
  424. MVC FCBITEM(2),FCBOP+4 SET ITEM NO. 00424000
  425. BAL R14,CKRDWR GO DO I/O 00425000
  426. STH R15,FCBOP+4 SAVE ITEM NO. 00426000
  427. LTR R0,R0 HAS TOTAL BLOCK BEEN DISPOSED OF? 00427000
  428. BNP DSKRET YES 00428000
  429. L R15,FCBBUFF GET A(LAST RECORD) 00429000
  430. AH R15,FCBBYTE+2 PTT NEXT RECORD 00430000
  431. B WRVAR WRITE ANOTHER RECORD 00431000
  432. * PERFORM DISK I/O FUNCTION 00432000
  433. * 00433000
  434. CKRDWR EQU * 00434000
  435. TM DCBDSORG,PO FIRST CHECK FOR PDS. @VA05994 00435000
  436. BNO CKRDWR1 NOT PO - BRANCH @VA05994 00436000
  437. * IF MEMBER WAS NOT FOUND ON LAST FIND, DCBRELAD FIELD WILL BE ZERO. 00437000
  438. * IF IT IS ZERO, WE ASSUME THIS I/O IS TO THE FIRST RECORD OF THE 00438000
  439. * MEMBER, AND SET THE DCBRELAD FIELD TO THE ITEM NUMBER OF THIS 00439000
  440. * READ OR WRITE. 00440000
  441. OC DCBRELAD+1(2),DCBRELAD+1 WAS FIELD RESET? @VA05994 00441000
  442. BNZ CKRDWR1 NO - NOT FIRST READ AFTER MEM @VA05994 00442000
  443. * NOT FOUND 00443000
  444. MVC DCBRELAD+1(2),FCBITEM SET ITEM NUMBER IN @VA05994 00444000
  445. * DCBRELAD 00445000
  446. CKRDWR1 DS 0H LABEL @VA05994 00446000
  447. MVC FCBOP(8),=CL8'RDBUF' 00447000
  448. TM IOBIOFLG,IOBIN INPUT? 00448000
  449. BO DSKIO YES 00449000
  450. MVC FCBOP(8),=CL8'WRBUF' 00450000
  451. DSKIO LA 1,FCBOP 00451000
  452. MVC SEBSAV(1),FCBFORM+1 PRESERVE THIS BYTE @VA03023 00452000
  453. SVC X'CA' 00453000
  454. DC AL4(DSKERR) 00454000
  455. MVC FCBFORM+1(1),SEBSAV RESTORE BYTE @VA03023 00455000
  456. * RETURN FROM DISK OPERATION, DOCTOR? 00456000
  457. DSKEND EQU * 00457000
  458. STC R15,FCBOP+7 SAVE ERROR CODE IF ANY 00458000
  459. LH R15,FCBITEM GET ITEM NO. 00459000
  460. N R15,HALFWORD CLEAR FIRST HALF 00460000
  461. BZ CKR14 00461000
  462. LA R15,1(R15) ADD ONE TO ITEM NO. 00462000
  463. CKR14 EQU * 00463000
  464. LTR R14,R14 IS REG 14 ZERO 00464000
  465. BCR 7,R14 NO, THEN BRANCH 00465000
  466. TM IOBIOFLG,IOBIN INPUT? 00466000
  467. BNO DSKRET NOPE. 00467000
  468. RESIDUAL EQU * 00468000
  469. LH R15,FCBCOUT GET FCBCOUT 00469000
  470. CLI FCBDSMD+1,C'4' IS MODE 4 00470000
  471. BE MODE4 YES, COMPUTE RESIDUAL @VA09484 00470100
  472. CLI FCBDSMD,C'*' IS MODE SPECIFIED? @VA09484 00470200
  473. BNE GETBUFAD NO, GO GET BUFFER ADDR 00471000
  474. TM JFCBIND2,M4FLAG IS MODE 4 FLAG ON? @VA09484 00471100
  475. BNO GETBUFAD NO CHANCE OF MODE 4 FILE @VA09484 00471200
  476. MODE4 EQU * MODE=4, ONE WAY OR ANOTHER @VA09484 00471300
  477. TM DCBRECFM,VAR IS RECFM VAR 00472000
  478. BO GETBUFAD YES, CONTINUE 00473000
  479. LH R1,DCBLRECL GET LRECL 00474000
  480. N R1,HALFWORD CLEAR 1ST HALF 00475000
  481. BNZ CKCOUNT NOT ZERO, THEN CHECK COUNT 00476000
  482. L R1,FCBBYTE ZERO, THEN USE READ COUNT 00477000
  483. CKCOUNT L R15,FCBREAD GET NO. BYTES READ 00478000
  484. SR R14,R14 ZERO REG 14 FOR DIVIDE 00479000
  485. DR R14,R1 DIVIDE BY LRECL 00480000
  486. LA R15,1(R15) ADD 1 TO MULTIPLE COUNT 00481000
  487. LTR R14,R14 IS IT MULTIPLE OF LRECL 00482000
  488. BNZ GETBUFAD NO, THEN GET BUFFER ADDR 00483000
  489. BCTR R15,R0 SUBTRACT ONE FROM COUNT 00484000
  490. GETBUFAD L R1,FCBBUFF GET BUFFER ADDR 00485000
  491. CKEOF CLC 0(4,R1),=XL4'61FFFF61' IS THIS AN EOF INDICATOR 00486000
  492. BNE NOTEOFIN @VA05054 00487000
  493. TM FCBIOSW2,FCBMVFIL THIS COME FROM MOVE? @VA05054 00488000
  494. BNO SETEND NO, THEN LEAVE @VA05054 00489000
  495. CLI FCBMEMBR,0 MEMBER OPTION SPECIFIED? @VA05054 00490000
  496. BE CHKPDS NO, THEN CHECK PDS OPTION @VA05054 00491000
  497. B SETEND YES, THEN SETEND @VA05054 00492000
  498. CHKPDS TM FCBIOSW2,FCBMVPDS IS IT PDS? @VA05054 00493000
  499. BO SETEND @VA05054 00494000
  500. NOTEOFIN EQU * @VA05054 00495000
  501. CLC FCBDSTYP(8),=CL8'TXTLIB' IS THIS A CMS TXTLIB 00496000
  502. BNE NOTXTLIB NO 00497000
  503. CLC 0(4,R1),=X'02D3C4E3' LDT CARD 00498000
  504. BE SETEND YES, SET END OF FILE 00499000
  505. NOTXTLIB EQU * 00500000
  506. AH R1,DCBLRECL CHECK NEXT RECORD 00501000
  507. BCT R15,CKEOF CHECK AGAIN 00502000
  508. B GETCNT GET COUNT 00503000
  509. SETEND S R1,FCBBUFF GET BYTES READ 00504000
  510. LA R15,12 SET EOF CODE 00505000
  511. BZ CKERR IF GO TO EOF RTN 00506000
  512. MVI DCBFDAD,C'P' SET POINT INDICATOR 00507000
  513. MVC DCBFDAD+5(3),=XL3'00FFF8' SET ITEM NO. 00508000
  514. SETRDCNT ST R1,FCBREAD SET NO. OF BYTES READ 00509000
  515. GETCNT L R1,FCBBYTE COMPUTE RESIDUAL COUNT 00510000
  516. S R1,FCBREAD 00511000
  517. LA R15,8 BAD LENGTH ERROR CODE @V201122 00512000
  518. TM DCBRECFM,FXD FXD OR UNDEFINED RECFM? @V201122 00513000
  519. BO CKFXDSTD YES, BYPASS VAR CHECK @V201122 00514000
  520. CLC FCBREAD+2(2),=H'8' NO. BYTES < 8 @V201122 00515000
  521. BL FLAGERR YES, THEN ERROR @V201122 00516000
  522. CKFXDSTD TM DCBRECFM,VAR+BLK RECFM=VAR OR BLKED @V201122 00517000
  523. BNZ DSKRET YES, THEN RETURN 00518000
  524. TM DCBRECFM,FS IS FIXED STANDARD BIT ON 00519000
  525. BNO DSKRET NO, RETURN 00520000
  526. CLC DCBFDAD+5(3),=XL3'00FFF8' END OF FILE SET? @VA02699 00521000
  527. BE DSKRET YES, THEN RETURN WITH NO ERROR @VA02699 00522000
  528. CLC FCBREAD+2(2),FCBBYTE+2 IS NO. BYTES READ < DCBLRECL 00523000
  529. BL FLAGERR YES, RETURN WITH ERROR CODE 00524000
  530. DSKRET EQU * 00525000
  531. DUMMY EQU * 00526000
  532. CONRET EQU * 00527000
  533. SR R15,R15 ZERO REG 15 00528000
  534. IORET LA R14,X'7F' SET ECB CODE 00529000
  535. B EOBRETRN 00530000
  536. EJECT 00531000
  537. * 00532000
  538. * GENERALIZED DISK ERROR VECTOR ROUTINE 00533000
  539. * 00534000
  540. DSKERR EQU * 00535000
  541. MVC FCBFORM+1(1),SEBSAV RESTORE BYTE @VA03023 00536000
  542. TM IOBIOFLG,IOBIN IS THIS A READ 00537000
  543. BNO CKFOR9 NO, CHECK FOR ERR 9 00538000
  544. CH R15,HALF8 CMS ERROR = 8 ? 00539000
  545. BE DSKEND YES. OK FOR OS SIMULATION. 00540000
  546. CH R15,HALF1 ERR CODE = ONE 00541000
  547. BNE CKFOR9 NO, CHECK FOR ERR 9 00542000
  548. TM FCBINIT,FCBOPCB DID OPEN ISSUE FILEDEF 00543000
  549. BNO ERR12 NO, THEN GIVE EOF CODE 00544000
  550. CKFOR9 CH R15,HALF9 OS IN/OUT CONFLICT 00545000
  551. BNE CKERR CHECK FOR EOF 00546000
  552. * DATA SET WAS OPENED AS "INOUT" OR "OUTIN". 00547000
  553. MVC FCBOP(8),=CL8'FINIS' CLOSEOUT CMS FILE 00548000
  554. SVC X'CA' 00549000
  555. DC AL4(*+4) 00550000
  556. B CKRDWR GO DO I/O AGAIN 00551000
  557. ERR12 LA R15,12 GET ERROR CODE 00552000
  558. * ERRORS WILL BE HANDLED BY THE QSAM/BSAM ROUTINES 00553000
  559. ERRRTN EQU * ERROR ROUTINE 00554000
  560. URERROR EQU * 00555000
  561. SR R14,R14 ZERO REG 14 00556000
  562. CKERR EQU * 00557000
  563. LTR R14,R14 ARE WE DOING BLOCKING 00558000
  564. BNZ VAREOF YES, THEN GO TO VAREOF 00559000
  565. SR R1,R1 CLEAR RESIDUAL COUNT 00560000
  566. FLAGERR LA R14,X'42' R14=ECB CODE, R15=CMS CODE 00561000
  567. B EOBRETRN 00562000
  568. EJECT 00563000
  569. * 00564000
  570. * CARD READER OPERATIONS 00565000
  571. * 00566000
  572. READR EQU * 00567000
  573. MVC RDBUFF+1(3),FCBBUFF+1 TR 00568000
  574. MVI RDBUFF,X'80' USE EXTENDED PLIST 00569000
  575. MVC RDCCW(2),FCBBYTE+2 SET READ COUNT 00570000
  576. LA 1,READLST 00571000
  577. SVC X'CA' 00572000
  578. DC AL4(READERR) 00573000
  579. RD1 SR R1,R1 RESIDUAL COUNT=ZERO 00574000
  580. B IORET 00575000
  581. SPACE 3 00576000
  582. READERR EQU * CARD READER ERROR RETURN 00577000
  583. LH R1,RDCOUNT GET NO. OF BYTES READ 00578000
  584. CH R15,=H'5' IS ERROR CODE = 5 00579000
  585. BE SETRDCNT YES, IGNORE INCORRECT LENGTH 00580000
  586. CH R15,HALF1 IS THIS EOF ERROR 00581000
  587. BNE NORESID NOPE. @VA13662 00582000
  588. SPACE 1 @VA13662 00582800
  589. * @VA13662 00583600
  590. **** COMMON END OF FILE ROUNTINE FOR CONSOLE,READER, AND TAPE @VA13662 00584400
  591. * @VA13662 00585200
  592. EOFERR EQU * @VA13662 00586000
  593. LA R15,12 SET RET CODE FOR CMS @VA13662 00586800
  594. LA R14,EOFCODE SET RET CODE FOR ECB @VA13662 00587600
  595. B EOBRETRN RETURN @VA04019 00589000
  596. SPACE 3 @VA13662 00589100
  597. NORESID EQU * @VA13662 00589200
  598. SR R1,R1 SET RESIDUAL COUNT = 0 @VA13662 00589300
  599. PERMERR EQU * @VA13662 00589400
  600. LA R14,PERMCODE SET RET CODE FOR ECB @VA13662 00589500
  601. B EOBRETRN CLEAN UP AND RETURN @VA13662 00589600
  602. * @VA13662 00589700
  603. PERMCODE EQU X'41' INDICATES PERM. I/O ERROR @VA13662 00589800
  604. EOFCODE EQU X'42' INDICATES END OF FILE @VA13662 00589900
  605. EJECT 00590000
  606. * 00591000
  607. * 00592000
  608. * COMBINED "PRINTER/PUNCH" UNIT RECORD OPERATIONS 00593000
  609. * 00594000
  610. * "PUNCH" INITIATOR 00595000
  611. PUNCH DS 0H SIGNAL PUNCH CARD OUTPUT 00596000
  612. MVC FCBPRPU(8),PUNCHLST SET I/O OPER = "PUNCH" 00597000
  613. B PRTPUN JOIN FORCES 00598000
  614. * "PRINT" INITIATOR 00599000
  615. PRINT DS 0H SIGNAL PRINTER OUTPUT 00600000
  616. MVC FCBPRPU(8),PRINTLST SET I/O OPER = "PRINT" 00601000
  617. * LET ALL PRINTS & PUNCHYS COME TOGETHER 00602000
  618. PRTPUN EQU * @VA11880 00602300
  619. LA R15,36 INDICATE DEVICE ERROR @VA11880 00602600
  620. TM IOBIOFLG,IOBIN CHECK FOR READ OPERATION @VA11880 00602900
  621. BO PRPUERR NOT VALID FOR OUTPUT DEVICE @VA11880 00603200
  622. TM DCBRECFM,FXD RECFM = VARIABLE? @VA11880 00603500
  623. BNO PPVLR YES. 00604000
  624. TM DCBRECFM,BLK RECFM = BLOCKED? 00605000
  625. LA R14,DUMMY SET RETURN VECTOR 00606000
  626. BNO GOPPOUT UNBLK. GO TO PRINT/PUNCH OUTPUTTER. 00607000
  627. L R0,FCBBYTE GET BYTE SIZE OF BLOCK 00608000
  628. LH R1,DCBLRECL GET L'DATA RECORD 00609000
  629. STH R1,FCBBYTE+2 SET L'OUTPUT LINE 00610000
  630. BAL R14,GOPPOUT OUTPUT FIRST RECORD OF BLOCK 00611000
  631. PPFB1 LH R1,FCBBYTE+2 00612000
  632. SR R0,R1 00613000
  633. BNP DUMMY YES. 00614000
  634. L R15,FCBBUFF GET A(NEXT RECORD WITHIN BLOCK) 00615000
  635. AR R15,R1 00616000
  636. ST R15,FCBBUFF SET A(PRINT BUFFER) 00617000
  637. B GOPPOUT 00618000
  638. * 00619000
  639. PPVLR EQU * VARIABLE 00620000
  640. L R15,FCBBUFF GET (ABUFFER: BDW) 00621000
  641. MVC FCBOP(2),0(R15) ALLIGN BDW 00622000
  642. LH R0,FCBOP GET BDW 00623000
  643. SH R0,HALF4+2 DISCOUNT L'BDE(=4) 00624000
  644. LA R15,4(,R15) PTT RDW 00625000
  645. PPVLR1 MVC FCBOP(2),0(R15) ALLIGN RDW 00626000
  646. LH R1,FCBOP GET RDW 00627000
  647. SR R0,R1 SUBTRACT RDW 00628000
  648. SH R1,HALF4+2 DISCOUNT L'RDW 00629000
  649. STH R1,FCBBYTE+2 SET L'OUTPUT BUFFER 00630000
  650. HALF4 LA R15,4(R15,R0) PTT DATA 00631000
  651. ST R15,FCBBUFF SET A(THIS RECORD) 00632000
  652. BAL R14,GOPPOUT 00633000
  653. LTR R0,R0 HAS BLKSI BEEN EXHAUSTED? 00634000
  654. BNP DUMMY YES. 00635000
  655. L R15,FCBBUFF P3130 00636000
  656. AH R15,FCBBYTE+2 PTT NEXT REC IN BLOCK 00637000
  657. B PPVLR1 00638000
  658. * 00639000
  659. GOPPOUT MVC FCBOP(8),FCBBUFF SAVE BUFFER ADDR 00640000
  660. CLI FCBPRPU,C'P' IS PRINTR SPECIFIED 00641000
  661. BNE PUTOUT NO GO PUNCH OUTPUT 00642000
  662. TM DCBRECFM,MCH IS MACHINE CNTRL SPECIFIED? 00643000
  663. BNO CKCNTRL NO, GO CHECK FOR ASA 00644000
  664. MVI FCBBYTE+1,X'01' SET INDICATOR FOR MACHINE CNTRL 00645000
  665. CKCNTRL TM DCBRECFM,ASA+MCH ARE CNTRL CHARACTERS SPECIFIED 00646000
  666. BNZ PUTOUT YES, THEN MOVE NOT NECCESSARY 00647000
  667. L R1,FCBDSTYP GET ADDR OF MOVE BUFFER 00648000
  668. LTR R1,R1 IS IT ZERO? 00649000
  669. BNZ MOVEBUFF NO, GO MOVE RECORD 00650000
  670. ST R0,FCBDSTYP SAVE REG 0 00651000
  671. GETMAIN R,LV=160 00652000
  672. L R0,FCBDSTYP RESTORE REG 0 00653000
  673. ST R1,FCBDSTYP SAVE ADDR OF PRINT BUFFER 00654000
  674. MOVEBUFF MVI 0(R1),C' ' SET CONTROL CHARACTERS @VA08538 00655100
  675. L R15,FCBBUFF GET BUFFER ADDRESS @VA08538 00655200
  676. MVC 1(159,R1),0(R15) MOVE RECORD TO ADD CNTRL CHAR 00657000
  677. ST R1,FCBBUFF SET ADDR OF NEW BUFFER 00658000
  678. LH R1,FCBBYTE+2 GET BYTE SIZE 00659000
  679. LA R1,1(,R1) ADD ONE FOR CNTRL CHARACTER 00660000
  680. STH R1,FCBBYTE+2 RESET BYTE SIZE 00661000
  681. PUTOUT LA R1,FCBPRPU GET ADDR OF PLIST 00662000
  682. SVC X'CA' 00663000
  683. DC AL4(PRPUERR) 00664000
  684. PRPUOK MVC FCBBUFF(8),FCBOP RESTORE BUFFER ADDR AND SIZE 00665000
  685. BR R14 RETURN TO THE CALLER 00666000
  686. PRPUERR CLI FCBPRPU,C'P' WAS THE PRINTER SPECIFIED? 00667000
  687. BNE URERROR NO, THEN HANDLE PUNCH ERRORS 00668000
  688. CH R15,HALF4+2 ERROR CODE < 4 00669000
  689. BNL URERROR NO, THEN HANDLE ERROR 00670000
  690. CH R15,HALF1 ERROR CODE = 1 00671000
  691. BE URERROR ERROR, LENGTH TOO LARGE 00672000
  692. LA R1,FCBPRPU GET ADD. OF PLIST @VA01467 00673000
  693. CLC 12(2,R1),=XL2'0001' MACHINE CODE? @VA01467 00674000
  694. BE ZER15 YES, LINE PRINTED RETURN @VA01467 00675000
  695. L R15,8(R1) GET ADDRESS PRINT LINE @VA01467 00676000
  696. MVI 0(R15),C'+' PRINT AND SUPPRESS SPACE @VA01467 00677000
  697. B PUTOUT PRINT IT @VA01467 00678000
  698. ZER15 SR R15,R15 ZERO RETURN CODE @VA01467 00679000
  699. B PRPUOK RETURN @VA01467 00680000
  700. EJECT 00681000
  701. * 00682000
  702. * I/O DEVICE IS A TAPE. HANDLE THE OPERATION, DOCTOR. 00683000
  703. * 00684000
  704. TAPE EQU * 00685000
  705. MVC TAPEOPER(8),=CL8'READ' INDICATE TAPE "READ" TR 00686000
  706. TM IOBIOFLG,IOBIN INPUT? 00687000
  707. BO TAPEDO YES. 00688000
  708. MVC TAPEOPER(8),=CL8'WRITE' INDICATE TAPE "WRITE" TR 00689000
  709. TAPEDO MVC TAPEMASK(1),FCBMODE GET TAPE MODE TR 00690000
  710. MVC TAPEDEV(4),FCBTAPID GET SYMBOLIC TAPE NAME TR 00691000
  711. MVC TAPEBUFF(3),FCBBUFF+1 SET BUFFER ADDRESS 00692000
  712. MVC TAPESIZE(4),FCBBYTE SET BLOCK LENGTH 00693000
  713. LA R1,TAPELIST GET PLIST TR 00694000
  714. SVC X'CA' 00695000
  715. DC AL4(TAPEERR) 00696000
  716. TAPEOK EQU * @VA07551 00696100
  717. CLI TAPEOPER,C'W' OUTPUT? 00697000
  718. BE TAPERET YES. 00698000
  719. MVC FCBREAD(4),TAPECOUT FILL IN FCBREAD FIELD 00699000
  720. L R1,TAPESIZE L'DESIRED BLOCK 00700000
  721. S R1,TAPECOUT - N'BYTES READ=RESIDUAL COUNT 00701000
  722. TAPERET B IORET 00702000
  723. TAPEERR EQU * 00703000
  724. CH R15,HALF8 IS ERROR WRONG LENGTH? @VA07551 00703100
  725. BNE TAPEER NO THEN HANDLE AS ERROR @VA07551 00703200
  726. TM FCBRECFM,RECUND YES/TEST FOR RECFM=UNDEF @VA07551 00703300
  727. BNO TAPEER NO THEN HANDLE AS ERROR @VA07551 00703400
  728. SR R15,R15 YES/THEN NO ERROR RETCDE=0@VA07551 00703500
  729. B TAPEOK IGNORE WRONG LENGTH @VA07551 00703600
  730. TAPEER EQU * @VA07551 00703700
  731. CH R15,HALF2 IS IT END OF FILE ? 00704000
  732. BE EOFCK YES, BRANCH @VA11136 00705000
  733. CLI TAPEOPER,C'W' WRITE OPERATION? @VA11136 00705100
  734. BE NORESID IF SO DON'T NEED RESIDUAL @VA13662 00705200
  735. L R1,TAPESIZE CALC RESIDUAL BYTE COUNT, @VA11136 00705300
  736. S R1,TAPECOUT PUT IN REG1 FOR RETURN @VA11136 00705400
  737. B PERMERR GO SET ECB CODE @VA13662 00705500
  738. EOFCK EQU * END OF FILE ERROR @VA11136 00705600
  739. B EOFERR 00706000
  740. EJECT 00707000
  741. * 00708000
  742. * SOME VARIABLE CONSTANTS 00709000
  743. * 00710000
  744. HALFWORD DC F'65535' 00711000
  745. HALF8 DC H'8' 00712000
  746. HALF9 DC H'9' 00713000
  747. HALF2 DC H'2' 00714000
  748. HALF1 DC H'1' 00715000
  749. RECUND EQU X'C0' RECFM=UNDEFINED @VA07551 00715100
  750. M4FLAG EQU X'01' FILEMODE=4 IF FM='*' @VA09484 00715200
  751. EJECT 00716000
  752. PRINT GEN 00717000
  753. * 00718000
  754. * A FEW DUMMIES FOLLOW ... 00719000
  755. * 00720000
  756. IO 00721000
  757. EJECT 00722000
  758. NUCON 00723000
  759. EJECT 00724000
  760. SPACE 3 00725000
  761. DCBD DSORG=(PS) 00726000
  762. EJECT 00727000
  763. SPACE 3 00728000
  764. CMSCB 00729000
  765. EJECT 00730000
  766. EJECT 00731000
  767. REGEQU 00732000
  768. SPACE 3 00733000
  769. END 00734000
ibm/vm370-lib/cms/dmsseb.assemble_src.txt ยท Last modified: 2023/08/06 13:35 by Site Administrator