Table of Contents

DMKVMI Source

References

Source Listing

DMKVMI.ASSEMBLE.txt
  1. VMI TITLE 'DMKVMI (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 00002000
  3. *. 00003000
  4. * 00004000
  5. * MODULE NAME - 00005000
  6. * 00006000
  7. * DMKVMI 00007000
  8. * 00008000
  9. * FUNCTION - 00009000
  10. * 00010000
  11. * TO SIMULATE A USER'S IPL I/O SEQUENCE 00011000
  12. * 00012000
  13. * ATTRIBUTES - 00013000
  14. * 00014000
  15. * RESIDENT IN A PAGE OF THE USER'S VIRTUAL MEMORY, DMKVMI RUNS 00015000
  16. * IN THE VIRTUAL MACHINE UNDER CONTROL OF THE USER'S VIRTUAL 00016000
  17. * PSW AND IN PROBLEM STATE. SIO INSTRUCTIONS ISSUED BY THE 00017000
  18. * IPL SIMULATOR ARE HANDLED EITHER BY CCW TRANSLATION OR SIMU- 00018000
  19. * LATION BY DMKVSPEX. 00019000
  20. * 00020000
  21. * ENTRY POINTS - 00021000
  22. * 00022000
  23. * DMKVMIPL 00023000
  24. * 00024000
  25. * ENTRY CONDITIONS - 00025000
  26. * 00026000
  27. * THE FOLLOWING LOCATIONS IN THE USER'S VIRTUAL PAGE ZERO WILL 00027000
  28. * BE FILLED IN BY THE IPL COMMAND HANDLER DMKCFP BEFORE THE 00028000
  29. * USER'S MACHINE IS DISPATCHED - 00029000
  30. * 00030000
  31. * LOCATION 0 VIRTUAL IPL CYLINDER NUMBER 00031000
  32. * LOCATION 2 IPL DEVICE ADDRESS 00032000
  33. * LOCATION 8 VMMLEVEL FLAG BYTE FROM USER'S VMBLOK 00033000
  34. * LOCATION A IPL STOP FLAG BYTE 00034000
  35. * 00035000
  36. * EXIT CONDITIONS - 00036000
  37. * 00037000
  38. * WHEN DMKVMI HAS COMPLETED PROCESSING, THE ENTIRE IPL CHANNEL 00038000
  39. * PROGRAM HAS BEEN INTERPRETED. THE IPL DEVICE ADDRESS IS 00039000
  40. * PLACED IN LOCATION X'2' OF THE USER'S VIRTUAL MEMORY OR 00040000
  41. * X'BA' FOR A MACHINE WITH THE EXTENDED MODE BIT ON IN THE 00041000
  42. * IPL PSW. THE IPL PSW AT LOCATION X'0' IS THEN LOADED. 00042000
  43. * 00043000
  44. * CALLS TO OTHER ROUTINES - 00044000
  45. * 00045000
  46. * NONE 00046000
  47. * 00047000
  48. * EXTERNAL REFERENCES - 00048000
  49. * 00049000
  50. * NONE 00050000
  51. * 00051000
  52. * TABLES / WORKAREAS - 00052000
  53. * 00053000
  54. * NONE 00054000
  55. * 00055000
  56. * REGISTER USAGE - 00056000
  57. * 00057000
  58. * GPR0-9 - SCRATCH 00058000
  59. * GPR10 - ADDRESS OF THE NEXT CCW TO BE VALIDATED 00059000
  60. * GPR11 - ADDRESS OF 1ST CCW IN SEQUENCE TO BE EXECUTED 00060000
  61. * GPR12 - INTERNAL SUBROUTINE LINKAGE 00061000
  62. * GPR13 - IPL DEVICE ADDRESS 00062000
  63. * GPR14 - VIRTUAL OPERATOR'S CONSOLE ADDRESS 00063000
  64. * GPR15 - DMKVMIPL BASE REGISTER 00064000
  65. * 00065000
  66. * NOTES - 00066000
  67. * 00067000
  68. * NONE 00068000
  69. * 00069000
  70. * OPERATION - 00070000
  71. * 00071000
  72. * 1. SAVE REGISTERS AND ESTABLISH MODULE BASE REGISTER. 00072000
  73. * 2. GET IPL AND CONSOLE DEVICE ADDRESSES. 00073000
  74. * 3. SAVE USER CAW AND IPL DEVICE CLASS AND TYPE. 00074000
  75. * 4. IF DEVICE CLASS IS DASD GOTO DISK ROUTINE. 00075000
  76. * 5. IF DEVICE CLASS IS TAPE GOTO TAPE ROUTINE. 00076000
  77. * 6. IF DEVICE CLASS IS EITHER UNIT RECORD INPUT OR SPECIAL 00077000
  78. * (CTCA), GO TO READER ROUTINE. 00078000
  79. * 7. IF DEVICE CLASS IS NONE OF THE ABOVE, GIVE MESSAGE 00079000
  80. * 'INVALID IPL DEVICE TYPE' AND LOAD DISABLED WAIT STATE. 00080000
  81. * 00081000
  82. * (OPERATION OF THE DISK, TAPE, AND READER ROUTINES BELOW) 00082000
  83. * 00083000
  84. * 7. EXECUTE THE LAST CCW. 00084000
  85. * 8. IF THE PSW AT VIRTUAL X'0' HAS THE EXTENDED BIT ON PLACE 00085000
  86. * THE IPL DEVICE ADDRESS IN VIRTUAL LOCATION X'BA'; 00086000
  87. * OTHERWISE PLACE IT IN VIRTUAL LOCATION X'2'. 00087000
  88. * 9. RESTORE REGISTERS AND LATEST CAW. 00088000
  89. * 9A. FOR IPL STOP OPTION GET THE PSW ADDRESS FROM 00089000
  90. * LOCATION 4 AND CONVERT TO AN ADSTOP ADDRESS. 00090000
  91. * ISSUE CP DIAGNOSE 8 TO SET ADSTOP AT PSW LOCATION. 00091000
  92. * 10. LOAD PSW AT VIRTUAL LOCATION X'0'. 00092000
  93. * 00093000
  94. * MESSAGES - 00094000
  95. * 00095000
  96. * DMKVMI022E VADDR MISSING OR INVALID 00096100
  97. * DMKVMI230E IPL SIO ERROR 00097100
  98. * DMKVMI231E IPL TIO ERROR 00098100
  99. * DMKVMI232E IPL UNIT ERROR, CSW=XXXXXXXX XXXXXXXX, SENSE=XX 00099100
  100. * DMKVMI233E IPL OVERLAY ERROR 00100100
  101. * DMKVMI234E IPL SENSE ERROR 00101100
  102. * 00102000
  103. *. 00103000
  104. EJECT 00104000
  105. COPY OPTIONS 00105000
  106. COPY LOCAL 00106000
  107. EJECT 00107000
  108. PUNCH 'SPB' 00108000
  109. DMKVMI CSECT 00109000
  110. ENTRY DMKVMIPL 00110000
  111. SPACE 3 00111000
  112. USING PSA,R0 00112000
  113. SPACE 3 00113000
  114. DMKVMIPL EQU * 00114000
  115. ST R15,IPLSAVE SAVE REGISTER NEEDED FOR BASE 00115000
  116. BALR R15,R0 ESTABLISH ADDRESSABILITY 00116000
  117. USING *,R15 ... 00117000
  118. BASEADD EQU * 00118000
  119. LA R15,0(0,R15) STRIP HIGH-ORDER BYTE FROM BASE REG 00119000
  120. SH R15,=AL2(BASEADD-DMKVMI) 00120000
  121. USING DMKVMI,R15 00121000
  122. STM R0,R14,SAVEREGS SAVE THE USER'S REGS 00122000
  123. MVC SAVEREGS+4*R15(4),IPLSAVE RETRIEVE R15 00123000
  124. LA R15,0(,R15) STRIP HIGH BYTE (FROM BALR) FROM BASE REG 00124000
  125. SLR R14,R14 SET DIAG REG TO -1 @VM08862 00125000
  126. BCTR R14,0 LOCATE CONSOLE ADDRESS @VM08862 00126000
  127. DC X'83E10024' .. @VM08862 00127000
  128. MVC SAVECAW(4),CAW SAVE USER'S CAW 00128000
  129. LA R1,SENSDATA FILL IN RELOCATED ADDRESS OF "SENSDATA" 00129000
  130. STCM R1,B'0111',SENSE+1 (FOR GENERAL USE) 00130000
  131. MVC CODEBYTE,IPLERRCD SAVE ERROR LEVEL CODE BYTE @VM08862 00131000
  132. MVC FLAG2(1),FLAG1 SAVE IPLSTOP FLAG BYTE @VM08862 00132000
  133. LH R13,IPLADDR ADDRESS OF IPL'ED DEVICE @VM08862 00133000
  134. DC X'83D10024' GET VDEVTYPC,VDEVTPE,RDEVFTR @VM08862 00134000
  135. STCM R1,B'1100',CLASS SAVE VDEVTYPC AND VDEVTYPE @VM08862 00135000
  136. BC 2,CHKNXT BRANCH IF NO REAL DEVICE BLOCK @VM08862 00136000
  137. CLC CLASS(2),=AL1(CLASSPEC,TYPUNSUP) UNSUPPORTED ?? @VM08862 00137000
  138. BNE CHKNXT NO - PROCESS @VM08862 00138000
  139. STC R2,CLASS SPECIAL CASE USE RDEVFTR @VM08862 00139000
  140. CLI CLASS,CLASURI READER CLASS TYPE @VM08862 00140000
  141. BNE *+8 NO - LEAVE TYPE AS IS @VM08862 00141000
  142. MVI TYPE,TYPRDR SET TO READER TYPE @VM08862 00142000
  143. CHKNXT TM CLASS,CLASDASD DASD DEVICE ?? @VM08862 00143000
  144. BO DISK YES -- 00144000
  145. TM CLASS,CLASTAPE OR TAPE ?? 00145000
  146. BO TAPE YES -- 00146000
  147. CLC CLASS(2),=AL1(CLASSPEC,TYPCTCA) OR CTCA ?? @VM08862 00147000
  148. BE READER YES -- @VM08862 00148000
  149. TM CLASS,CLASURI THE ONLY ONE LEFT 00149000
  150. BNO BADEVICE NO GOOD IF NOT THIS ONE 00150000
  151. TM TYPE,TYPRDR MUST BE A CARD READER 00151000
  152. BO READER GO GET IT 00152000
  153. SPACE 00153000
  154. BADEVICE EQU * HERE IF DEVICE TYPE IS UNSUPPORTED 00154000
  155. LA R4,ERRTYP LOAD THE ERROR MSG ADDRESS 00155000
  156. LA R5,L'ERRTYP LOAD ERROR MSG LENGTH 00156000
  157. B PRINT PRINT ERROR AND DIE 00157000
  158. EJECT 00158000
  159. *. 00159000
  160. * OPERATION OF CARD READER IPL SIMULATION - 00160000
  161. * 00161000
  162. * 1. READ FIRST 24 BYTES INTO VIRTUAL LOCATION X'0'. 00162000
  163. * 2. SET THE CCW POINTER TO THE IPL CCW LOCATED AT VIRTUAL 00163000
  164. * X'8'. 00164000
  165. * 3. VALIDATE THE DATA ADDRESS OF THE CURRENT CCW TO INSURE 00165000
  166. * THAT THE IPL SIMULATOR DOES NOT GET OVERWRITTEN. 00166000
  167. * 4. IF THE CURRENT CCW OP-CODE IS A TIC, SET THE 00167000
  168. * CURRENT CCW POINTER TO THE DATA ADDRESS AND THEN PROCEED 00168000
  169. * TO STEP 3. 00169000
  170. * 5. IF THE CHAIN DATA FLAG IN THE CURRENT CCW IS NOT ON 00170000
  171. * GO TO STEP 19. 00171000
  172. * 6. AFTER HAVING SAVED THE OP-CODE IN THE CURRENT CCW 00172000
  173. * CHANGE THIS CCW'S OP-CODE TO A X'C2' (READ-BUFFER). 00173000
  174. * 7. RESET ALL CHAINING FLAGS IN THE CURRENT CCW. 00174000
  175. * 8. VALIDATE THE CCW DATA ADDRESS. 00175000
  176. * 9. EXECUTE THE CCW. 00176000
  177. * 10. IF THE CURRENT CCW WAS OVERLAID PROCEED TO STEP 00177000
  178. * 11; OTHERWISE RECHAIN THE CCW IN CASE IT 00178000
  179. * GETS RE-EXECUTED VIA A TIC. 00179000
  180. * 11. ADVANCE CCW POINTER BY 8. 00180000
  181. * 12. IF THE CHAIN DATA FLAG IS ON GO TO 00181000
  182. * STEP 7; OTHERWISE RESTORE OP-CODE OF FIRST CHAIN 00182000
  183. * DATA CCW. 00183000
  184. * 13. IF THE COMMAND CHAINING FLAG IS NOT ON IN THE 00184000
  185. * CURRENT CCW GO TO STEP 24. 00185000
  186. * 14. RESET ALL CHAINING FLAGS. 00186000
  187. * 15. VALIDATE CCW DATA ADDRESS. 00187000
  188. * 16. EXECUTE ALL CCWS SINCE START OF CHAIN DATA. 00188000
  189. * 17. IF THE CURRENT CCW WAS OVERLAID PROCEED TO STEP 00189000
  190. * 18; OTHERWISE RECHAIN THE CCW IN CASE IT GETS 00190000
  191. * RE-EXECUTED VIA A TIC. 00191000
  192. * 18. ADVANCE CCW POINTER BY 8 AND PROCEED TO STEP 3. 00192000
  193. * 19. IF THE COMMAND CHAINING FLAG IS NOT ON IN THE 00193000
  194. * CURRENT CCW GO TO STEP 24. 00194000
  195. * 20. RESET ALL CHAINING FLAGS. 00195000
  196. * 21. EXECUTE THIS CCW ALONE. 00196000
  197. * 22. IF THE CURRENT CCW WAS OVERLAID PROCEED TO STEP 23; 00197000
  198. * OTHERWISE RECHAIN THE CCW IN CASE IT GETS RE-EXECUTED 00198000
  199. * VIA A TIC. 00199000
  200. * 23. ADVANCE CCW POINTER BY 8 AND PROCEED TO STEP 3. 00200000
  201. * 24. RETURN TO STEP 7 IN MAIN PROLOG. 00201000
  202. * 00202000
  203. *. 00203000
  204. SPACE 1 00204000
  205. READER EQU * 00205000
  206. LA R11,CARDCCW SET CCW POINTER TO LOAD-KEY CCW'S 00206000
  207. BAL R12,IO GET THE 24 BYTES 00207000
  208. LA R11,IPLCCW1 SET CCW POINTER TO FIRST USER CCW 00208000
  209. NEXTCARD LR R10,R11 GIVE CCW ADDRESS TO ADDRTEST 00209000
  210. BAL R12,ADDRTEST VALIDATE CCW ADDRESS, PREVENT OVERLAY 00210000
  211. TM 0(R10),X'08' IS OPCODE A TIC? 00211000
  212. BZ *+12 BRANCH IF NOT TIC 00212000
  213. TM 0(R10),X'07' ARE YOU SURE IT'S A TIC? 00213000
  214. BZ TICCARD BRANCH IF IT'S A TIC 00214000
  215. TM 4(R11),CD IS THE CD FLAG SET? 00215000
  216. BO CDCARD BRANCH IF YES 00216000
  217. TM 4(R11),CC IS THE CC FLAG SET? 00217000
  218. BNO IPLDONE BRANCH IF NOT AND EXECUTE LAST CCW 00218000
  219. SPACE 1 00219000
  220. CCCARD EQU * HERE TO PROCESS COMMAND CHAINING FLAG 00220000
  221. NI 4(R11),X'FF'-CC DECHAIN THE CCW 00221000
  222. MVI 5(R11),HEXFF FLAG CURRENT CCW 00222000
  223. BAL R12,IO EXECUTE THE STAND ALONE CCW 00223000
  224. CLI 5(R11),HEXFF DID CURRENT CCW GET OVERLAID? 00224000
  225. BNE *+8 YES 00225000
  226. OI 4(R11),CC RESET COMMAND CHAINING BIT *00226000
  227. FOR RE-EXECUTION (IF NEEDED) 00227000
  228. LA R11,8(,R11) ADVANCE CCW POINTER 00228000
  229. B NEXTCARD GET NEXT USER CCW 00229000
  230. SPACE 1 00230000
  231. CDCARD EQU * HERE TO PROCESS DATA CHAINING FLAG 00231000
  232. MVC OPCODE,0(R11) SAVE THE VALID OPCODE 00232000
  233. MVI 0(R10),X'C2' SET OPCODE TO A READ-BUFFER 00233000
  234. CSCATTER NI 4(R10),X'FF'-(CD+CC) RESET ALL CHAINING FLAGS 00234000
  235. OI 4(R10),SILI PROTECT FROM A PARTIAL READ 00235000
  236. MVI 5(R10),HEXFF FLAG CURRENT CCW 00236000
  237. BAL R12,ADDRTEST VALIDATE THE CCW ADDRESS 00237000
  238. CLI TYPE,TYP2501 IS IT 2501? @VA02056 00238000
  239. BE AFTERIO YES, DON'T ACTUALLY DO ANY I/O @VA02056 00239000
  240. BAL R12,IO EXECUTE THE CCW 00240000
  241. AFTERIO CLI 5(R10),HEXFF DID CURRENT CCW GET OVERLAID? @VA02056 00241000
  242. BNE *+8 YES 00242000
  243. OI 4(R10),CD RESET THE FLAG FOR RE-EXECUTION *00243000
  244. IF CHAIN GETS RESTARTED VIA TIC 00244000
  245. LA R10,8(,R10) ADVANCE POINTER TO LAST ATTACHED CCW 00245000
  246. TM 4(R10),CD MORE DATA CHAINING? 00246000
  247. BO CSCATTER BRANCH IF YES 00247000
  248. SPACE 00248000
  249. * HERE IF SCATTER READ CHAIN HAS ENDED 00249000
  250. BAL R12,ADDRTEST VALIDATE THE CCW ADDRESS @VA02056 00250000
  251. MVC 0(1,R11),OPCODE RESTORE THE OPCODE IN THE FIRST CCW 00251000
  252. TM 4(R10),CC IS THE CC FLAG SET? 00252000
  253. BZ IPLDONE BRANCH IF NO, LAST CCW READY FOR EXEC 00253000
  254. SPACE 00254000
  255. * HERE IF LAST CCW IN DATA CHAIN SEQUENCE HAS CC FLAG 00255000
  256. NI 4(R10),X'FF'-CC RESET THE CC FLAG 00256000
  257. MVI 5(R10),HEXFF FLAG CURRENT CCW 00257000
  258. BAL R12,IO EXECUTE THE ENTIRE CHAIN 00258000
  259. CLI 5(R10),HEXFF DID CURRENT CCW GET OVERLAID? 00259000
  260. BNE *+8 YES 00260000
  261. OI 4(R10),CC RESET THE FLAG FOR RE-EXECUTION *00261000
  262. IF CHAIN GETS RESTARTED VIA TIC 00262000
  263. LA R11,8(,R10) SET POINTER TO DECODE NEXT CCW 00263000
  264. B NEXTCARD PROCESS COMMAND CHAINED CCW 00264000
  265. SPACE 1 00265000
  266. TICCARD EQU * HERE TO PROCESS TIC CCW 00266000
  267. L R11,0(,R11) LOAD OPCODE AND DATA ADDRESS 00267000
  268. LA R11,0(,R11) ISOLATE DATA ADDRESS 00268000
  269. B NEXTCARD GET NEXT USER CCW 00269000
  270. EJECT 00270000
  271. *. 00271000
  272. * OPERATION OF DISK IPL SIMULATION - 00272000
  273. * 00273000
  274. * 1. IF DEVICE TYPE IS NOT 2311,2314,3330,3340,3350 OR 2305 00274000
  275. * PRINT ERROR MESSAGE "INVALID DEVICE TYPE" 00275000
  276. * AND LOAD DISABLED WAIT STATE PSW. 00276000
  277. * 2. READ FIRST 24 BYTES INTO VIRTUAL LOCATION X'0'. 00277000
  278. * 3. SET THE CCW POINTER TO THE IPL CCW LOCATED AT VIRTUAL 00278000
  279. * X'8'. 00279000
  280. * 4. VALIDATE THE DATA ADDRESS OF THE CURRENT CCW TO 00280000
  281. * INSURE THAT THE IPL SIMULATOR DOES NOT GET 00281000
  282. * OVERWRITTEN. 00282000
  283. * 5. IF THE CURRENT CCW OP-CODE IS A TIC, SET THE 00283000
  284. * CURRENT CCW POINTER TO THE DATA ADDRESS AND THEN 00284000
  285. * PORCEED TO STEP 4. 00285000
  286. * 6. IF THE OP-CODE IS NOT A SEARCH GO TO STEP 19. 00286000
  287. * 7. IF THE OP-CODE OF THE NEXT CCW IS A TIC GO TO 00287000
  288. * STEP 11. 00288000
  289. * 8. VALIDATE DATA ADDRESS OF NEXT CCW (CURRENT CCW+8). 00289000
  290. * 9. ADVANCE CCW POINTER BY 16. 00290000
  291. * 10. GO TO STEP 4. 00291000
  292. * 11. IF THE DATA ADDRESS OF THE TIC FOLLOWING THE SEARCH 00292000
  293. * POINTS BACK TO THE SEARCH GO TO STEP 19. 00293000
  294. * 12. SAVE AND CHANGE THE OP-CODE OF THE FIRST AND 00294000
  295. * SECOND CCWS AFTER THE SEARCH TO NO-OPS. 00295000
  296. * 13. REMOVE ALL CHAINING FLAGS FROM BOTH CCWS AFTER SEARCH. 00296000
  297. * 14. EXECUTE ALL CCWS TO THIS POINT. 00297000
  298. * 15. RESTORE OP-CODES FOR BOTH CCWS AFTER SEARCH. 00298000
  299. * 16. IF THE SECOND CCW WAS OVERLAID PROCEED TO STEP 17; 00299000
  300. * OTHERWISE RECHAIN THIS CCW IN CASE IT GETS 00300000
  301. * RE-EXECUTED VIA A TIC. 00301000
  302. * 17. IF THE SEARCH WAS SUCCESSFULL (LAST CHANNEL PROGRAM 00302000
  303. * STOPED WITH CSW POINTING TO SECOND CCW) GO TO STEP 9. 00303000
  304. * 18. SETCCW POINTER TO DATA ADDRESS OF THE TIC CCW 00304000
  305. * AFTER THE SEARCH. 00305000
  306. * 19. IF THE CHAIN DATA FLAG IS NOT ON GO TO STEP 26. 00306000
  307. * 20. REMOVE ALL CHAINING FLAGS FROM THE CURRENT CCW. 00307000
  308. * 21. TURN ON THE SILI FLAG TO PREVENT THE CHANNEL PROGRAM 00308000
  309. * FROM TERMINATING FROM AN INCORRECT LENGTH INDICATION. 00309000
  310. * 22. EXECUTE ALL CCWS TO THIS POINT. 00310000
  311. * 23. IF THE CURRENT CCW WAS OVERLAID PROCEED TO STEP 24; 00311000
  312. * OTHERWISE RECHAIN THIS CCW IN CASE IT GETS RE- 00312000
  313. * EXECUTED VIA A TIC. 00313000
  314. * 24. ADVANCE CCW POINTER BY 8. 00314000
  315. * 25. GO TO STEP 4. 00315000
  316. * 26. IF THE COMMAND CHAIN FLAG IS NOT ON IN THE CURRENT CCW 00316000
  317. * GO TO STEP 31. 00317000
  318. * 27. REMOVE ALL CHAINING FLAGS. 00318000
  319. * 28. IS THIS CCW HAS BEEN PROCESSED BY THE IPL SIMULATOR 00319000
  320. * BEFORE TURN THE SKIP FLAG OFF; OTHERWISE PROCEED. 00320000
  321. * 29. EXECUTE ALL CCWS TO THIS POINT. 00321000
  322. * 30. GO TO STEP 23. 00322000
  323. * 31. RETURN TO STEP 7 IN MAIN PROLOG. 00323000
  324. * 00324000
  325. *. 00325000
  326. SPACE 1 00326000
  327. DISK EQU * 00327000
  328. MVC CYLAD(2),IPLCYLNO SET CYLINDER NO 00328000
  329. LA R1,SEEK RELOCATE CCW ADDRESSES 00329000
  330. STCM R1,B'0111',DISKCCW+1 ... 00330000
  331. LA R1,SEEK+2 ... 00331000
  332. STCM R1,B'0111',DISKCCW+9 ... 00332000
  333. LA R1,DISKCCW+8 ... 00333000
  334. STCM R1,B'0111',DISKCCW+17 ... 00334000
  335. LA R11,DISKCCW SET CCW POINTER TO LOAD-KEY CCW 00335000
  336. BAL R12,IO GET THE 24 BYTES 00336000
  337. MVI READCCW+4,CC+SILI+SKIP CHAIN TIC CCW TO IPLCCW1 00337000
  338. LA R10,IPLCCW1 SET CCW POINTER TO USER'S CCW 00338000
  339. NEXTDISK BAL R12,ADDRTEST VALIDATE CCW ADDRESS, PREVENT OVERLAY 00339000
  340. TM 0(R10),X'08' IS COMMAND CODE A TIC? 00340000
  341. BNO *+12 BRANCH IF NOT A TIC 00341000
  342. TM 0(R10),X'07' ARE YOU SURE IT IS A TIC? 00342000
  343. BZ TICDISK BRANCH IF IT IS A TIC 00343000
  344. LA R1,LIST SET INDEX TO BEGIN OF LIST 00344000
  345. LA R2,1 SET INCREMENT TO ONE BYTE 00345000
  346. LA R3,LISTEND SET COMPARAND TO END OF LIST 00346000
  347. LOOP1 CLC 0(1,R10),0(R1) IS OP-CODE A SEARCH? 00347000
  348. BE SEARCH BRANCH IF YES 00348000
  349. BXLE R1,R2,LOOP1 TEST NEXT IF NO 00349000
  350. SPACE 00350000
  351. * HERE IF OP-CODE IS NOT A SEARCH 00351000
  352. CLI 0(R10),X'07' SEEK COMMAND ? 00352000
  353. BNE *+6 NO 00353000
  354. LR R11,R10 RESTART CHANNEL PROGRAM FROM HERE 00354000
  355. TM 4(R10),CD IS THE CD FLAG SET 00355000
  356. BO CDDISK BRANCH IF YES 00356000
  357. TM 4(R10),CC IS CC FLAG SET? 00357000
  358. BO CCDISK BRANCH IF YES 00358000
  359. B IPLDONE EXECUTE THE LAST CCW 00359000
  360. SPACE 00360000
  361. * LIST OF ALL STANDARD DISK SEARCH CCW OPCODES 00361000
  362. LIST EQU * 00362000
  363. DC X'31' ID EQUAL 00363000
  364. DC X'B1' ID EQUAL - MT 00364000
  365. DC X'29' KEY EQUAL 00365000
  366. DC X'A9' KEY EQUAL - MT 00366000
  367. DC X'39' HOME ADDRESS EQUAL 00367000
  368. DC X'B9' HOME ADDRESS EQUAL - MT 00368000
  369. DC X'51' ID HIGH 00369000
  370. DC X'D1' ID HIGH - MT 00370000
  371. DC X'71' ID EQUAL OR HIGH 00371000
  372. DC X'F1' ID EQUAL OR HIGH - MT 00372000
  373. DC X'69' KEY EQUAL OR HIGH 00373000
  374. DC X'E9' KEY EQUAL OR HIGH - MT 00374000
  375. DC X'49' KEY HIGH 00375000
  376. LISTEND DC X'C9' KEY HIGH - MT 00376000
  377. SPACE 2 00377000
  378. TICDISK DS 0H PROCESS TIC CCW 00378000
  379. L R10,0(,R10) LOAD COMMAND CODE AND DATA ADDRESS 00379000
  380. LA R10,0(,R10) ISOLATE DATA ADDRESS 00380000
  381. B NEXTDISK EXAMINE NEXT CCW 00381000
  382. SPACE 1 00382000
  383. SEARCH EQU * PROCESS SEARCH CCW 00383000
  384. TM 8(R10),X'08' IS NEXT OP-CODE A TIC 00384000
  385. BZ SNOTIC BRANCH IF NOT 00385000
  386. TM 8(R10),X'07' ARE YOU SURE IT IS A TIC? 00386000
  387. BNZ SNOTIC BRANCH IF IT IS NOT A TIC 00387000
  388. L R1,8(,R10) LOAD COMMAND CODE AND DATA ADDRESS 00388000
  389. LA R1,0(,R1) ISOLATE DATA ADDRESS 00389000
  390. CR R1,R10 IS IT A SEARCH-TIC LOOP? 00390000
  391. BE SUPDATE BRANCH IF YES 00391000
  392. SPACE 00392000
  393. * HERE IF SEARCH IS FOLLOWED BY A TIC WHICH DOES NOT POINT 00393000
  394. * BACK TO THE SEARCH. THE TWO CCWS AFTER THE SEARCH ARE 00394000
  395. * CHANGED TO NO-OPS. ALL CCWS ARE EXECUTED AND THE CSW IS 00395000
  396. * EXAMINED TO DETERMINE WHETHER THE SEARCH IS SUCCESSFULL. 00396000
  397. MVI 8(R10),NOOP CHANGE TIC TO NOOP 00397000
  398. NI 12(R10),X'FF'-CC INSURE NO COMMAND CHAINING 00398000
  399. MVC OPCODE,16(R10) SAVE 2ND CCW OPCODE 00399000
  400. MVI 16(R10),NOOP CHANGE 2ND CCW TO NOOP 00400000
  401. TM 20(R10),CC COMMAND CHAINING IN 2ND CCW? 00401000
  402. BNO *+12 BRANCH IF NO 00402000
  403. NI 20(R10),X'FF'-CC TURN OFF COMMAND CHAINING 00403000
  404. MVI 21(R10),HEXFF FLAG AS HAVING DONE SO 00404000
  405. BAL R12,IO EXECUTE CCWS UP TO THIS POINT 00405000
  406. MVI 8(R10),TIC RESTORE TIC OPCODE 00406000
  407. MVC 16(1,R10),OPCODE RESTORE 2ND CCW OPCODE 00407000
  408. CLI 21(R10),HEXFF DOES CHAINING HAVE TO BE TURNED BACK ON? 00408000
  409. BNE *+12 NO 00409000
  410. OI 20(R10),CC TURN COMMAND CHAINING BACK ON 00410000
  411. MVI 21(R10),ZERO AND TURN FLAG OFF IN CASE CHAIN GETS *00411000
  412. RESTARTED VIA TIC 00412000
  413. L R2,CSW GET LAST CCW EXECUTED + 8 *00413000
  414. (NOTING CSW KEY SHOULD BE ZERO) 00414000
  415. LA R3,16(,R10) GET PTR TO 1ST CCW + 8 00415000
  416. CR R2,R3 WAS SEARCH UNSUCCESSFULL? 00416000
  417. BNE SUPDATE NO FOLLOW PRIMARY CHAIN 00417000
  418. L R10,8(,R10) FOLLOW ALTERNATE CHAIN 00418000
  419. LA R10,0(,R10) CLEAR HIGH BYTE 00419000
  420. B NEXTDISK ... 00420000
  421. SPACE 00421000
  422. SUPDATE LA R10,16(,R10) INCREMENT POINTER BY TWO CCW'S 00422000
  423. B NEXTDISK EXAMINE NEXT CCW 00423000
  424. SPACE 1 00424000
  425. SNOTIC EQU * HERE TO PROCESS NON-TIC CCW AFTER SEARCH 00425000
  426. LR R1,R10 SAVE THE CONTENTS OF R10 00426000
  427. LA R10,8(,R10) ISOLATE DATA ADDRESS OF NEXT CCW 00427000
  428. BAL R12,ADDRTEST VALIDATE CCW'S ADDRESS 00428000
  429. LR R10,R1 RESTORE R10 00429000
  430. B SUPDATE BRANCH TO UPDATE CCW ADDRESS 00430000
  431. SPACE 00431000
  432. CCDISK EQU * HERE TO PROCESS COMMAND CHAINING FLAG 00432000
  433. NI 4(R10),X'FF'-CC DECHAIN CCW 00433000
  434. TS 5(R10) IPL SIMULATOR FIDDLED? 00434000
  435. BZ *+8 NO 00435000
  436. NI 4(R10),X'FF'-SKIP ASSUME IPL TURNED THE SKIP FLAG ON 00436000
  437. BAL R12,IO EXECUTE ALL CCW'S UP TO THIS POINT 00437000
  438. CLI 5(R10),HEXFF DID CURRENT CCW GET OVERLAID? 00438000
  439. BNE NOCHAIN YES @VA09681 00439100
  440. CLI 0(R10),X'05' WRITE COMMAND? @VA09681 00439200
  441. BNE CCNOWRT NO @VA09681 00439300
  442. MVI 0(R10),X'06' CHANGE TO READ COMMAND FOR SKIP @VA09681 00439400
  443. * TO BE EFFECTIVE 00439500
  444. CCNOWRT DS 0H @VA09681 00439600
  445. OI 4(R10),CC+SKIP RECHAIN CCW 00440000
  446. NOCHAIN DS 0H @VA09681 00440100
  447. LA R10,8(,R10) ADVANCE CCW POINTER 00441000
  448. B NEXTDISK EXAMINE NEXT CCW 00442000
  449. SPACE 00443000
  450. CDDISK EQU * PROCESS DATA CHAINING FLAG 00444000
  451. NI 4(R10),X'FF'-(CD+CC) DECHAIN THE CCW 00445000
  452. OI 4(R10),SILI PREVENT INCORRECT LENGTH INDICATION *00446000
  453. CAUSED BY A PARTIAL READ 00447000
  454. MVI 5(R10),HEXFF FLAG CURRENT CCW 00448000
  455. BAL R12,IO EXECUTE ALL CCW'S TO THIS POINT 00449000
  456. CLI 5(R10),HEXFF DID CURRENT CCW GET OVERLAID? 00450000
  457. BNE *+8 YES 00451000
  458. OI 4(R10),CD RECHAIN THE CCW 00452000
  459. LA R10,8(,R10) ADVANCE THE CCW POINTER 00453000
  460. B NEXTDISK EXAMINE THE NEXT CCW 00454000
  461. EJECT 00455000
  462. *. 00456000
  463. * OPERATION OF TAPE IPL SIMULATION - 00457000
  464. * 00458000
  465. * 1. ISSUE A SENSE CCW TO DETERMINE WHETHER THE TAPE IS 7 OR 00459000
  466. * 9 TRACK. 00460000
  467. * 2. IF THE TAPE IS 7 TRACK ISSUE A MODE SET CCW TO SET THE 00461000
  468. * DEFAULT CHARACTERISTICS. 00462000
  469. * 3. READ FIRST 24 BYTES INTO VIRTUAL LOCATION X'0'. 00463000
  470. * 4. SET THE CCW POINTER TO START INTERPRETATION OF THE CCW 00464000
  471. * LOCATED AT VIRTUAL LOCATION X'8'. 00465000
  472. * 5. VALIDATE THE DATA ADDRESS OF THE CURRENT CCW TO INSURE 00466000
  473. * THAT THE IPL SIMULATOR DOES NOT GET OVERWRITTEN. 00467000
  474. * 6. IF THE CURRENT CCW OP-CODE IS A TIC, SET THE 00468000
  475. * CURRENT CCW POINTER TO THE DATA ADDRESS AND THEN PROCEED 00469000
  476. * TO STEP 5. 00470000
  477. * 7. IF THE CHAIN DATA FLAG IN THE CURRENT CCW IS NOT ON 00471000
  478. * GO TO STEP 17. 00472000
  479. * 8. RESET ALL CHAINING FLAGS IN THE CURRENT CCW. 00473000
  480. * 9. TURN ON THE SILI FLAG TO PREVENT THE CHANNEL 00474000
  481. * PROGRAM FROM TERMINATING FROM AN INCORRECT LENGTH 00475000
  482. * INDICATION. 00476000
  483. * 10. VALIDATE THE CCW DATA ADDRESS. 00477000
  484. * 11. EXECUTE THE CCW STRING. 00478000
  485. * 12. IF THE CURRENT CCW WAS OVERLAID PROCEED TO STEP 00479000
  486. * 13; OTHERWISE RECHAIN THE CCW IN CASE IT GETS RE- 00480000
  487. * EXECUTED VIA A TIC. 00481000
  488. * 13. EXECUTE A BACK SPACE RECORD CCW. 00482000
  489. * 14. ADVANCE CCW POINTER BY 8. 00483000
  490. * 15. IF THE CHAIN DATA FLAG IS ON GO TO STEP 8. 00484000
  491. * 16. IF THE COMMAND CHAIN FLAG IS NOT ON GO TO STEP 21; 00485000
  492. * OTHERWISE GO TO STEP 18. 00486000
  493. * 17. IF THE COMMAND CHAIN FLAG IS NOT ON GO TO STEP 21. 00487000
  494. * 18. RESET ALL CHAINING FLAGS. 00488000
  495. * 19. EXECUTE CCW STRING. 00489000
  496. * 20. IF THE CURRENT CCW WAS OVERLAID PROCEED TO STEP 21; 00490000
  497. * OTHERWISE RECHAIN THE CCW IN CASE IT GETS RE- 00491000
  498. * EXECUTED VIA A TIC. 00492000
  499. * 21. RETURN TO STEP 7 IN MAIN PROLOG. 00493000
  500. * 00494000
  501. *. 00495000
  502. SPACE 1 00496000
  503. TAPE EQU * 00497000
  504. LA R11,SENSE LOAD IO REG FOR SENSE OPERATION 00498000
  505. BAL R12,IO EXECUTE A SENSE 00499000
  506. TM SENSDATA+1,X'10' IS TAPE A 7 OR 9 TRACK? 00500000
  507. BO SEVENTK BRANCH IF SEVEN TRACK 00501000
  508. SPACE 00502000
  509. * HERE IF UNIT IS A NINE TRACK DRIVE 00503000
  510. LA R11,TAPE9CCW SET LOAD-KEY CCW POINTER 00504000
  511. BAL R12,IO EXECUTE THE LOAD-KEY CCW 00505000
  512. LA R10,IPLCCW1 SET POINTER TO FIRST USER CCW 00506000
  513. LA R9,NEXTAPE9 INITIALIZE THE RETURN FROM CC AND CD 00507000
  514. NEXTAPE9 LR R11,R10 SET POINTER FOR ADDRESS TEST 00508000
  515. BAL R12,ADDRTEST VALIDATE THE CCW ADDRESS 00509000
  516. TM 0(R11),X'08' IS OPCODE A TIC? 00510000
  517. BNO *+12 BRANCH IF NOT 00511000
  518. TM 0(R11),X'07' ARE YOU SURE IT IS A TIC? 00512000
  519. BZ TICTAPE BRANCH IF IT IS A TIC 00513000
  520. TM 4(R11),CD IS THE CD FLAG SET? 00514000
  521. BO CDTAPE BRANCH IF YES 00515000
  522. TM 4(R11),CC IS THE CC FLAG SET? 00516000
  523. BO CCTAPE BRANCH IF YES 00517000
  524. B IPLDONE EXECUTE THE LAST CCW 00518000
  525. SPACE 00519000
  526. SEVENTK EQU * HERE IF UNIT IS A SEVEN TRACK DRIVE 00520000
  527. LA R2,TAPE9CCW ADDRESS OF LOAD-KEY CCW 00521000
  528. STCM R2,B'0111',TTICCCW+1 STORE ADDRESS IN TAPE TIC 00522000
  529. LA R11,TAPE7CCW ADDRESS OF SET MODE CCW 00523000
  530. BAL R12,IO GET LOAD-KEY 24 BYTES 00524000
  531. LA R9,NEXTAPE7 SAVE EXIT ADDRESS FROM CD AND CC 00525000
  532. LA R10,IPLCCW1 POINTER TO FIRST USER CCW 00526000
  533. NEXTAPE7 STCM R10,B'0111',TTICCCW+1 STORE ADDRESS IN TAPE TIC 00527000
  534. BAL R12,ADDRTEST VALIDATE THE CCW ADDRESS 00528000
  535. TM 0(R10),X'08' IS CCW A TIC? 00529000
  536. BNO *+12 BRANCH IF IT IS NOT 00530000
  537. TM 0(R10),X'07' ARE YOU SURE IT IS A TIC? 00531000
  538. BZ TICTAPE BRANCH IF IT IS A TIC 00532000
  539. TM 4(R10),CD IS CD FLAG SET? 00533000
  540. BO CDTAPE BRANCH IF YES 00534000
  541. TM 4(R10),CC IS CC FLAG SET? 00535000
  542. BO CCTAPE BRANCH IF YES 00536000
  543. B IPLDONE EXECUTE THE LAST CCW 00537000
  544. SPACE 1 00538000
  545. TICTAPE EQU * HERE TO PROCESS TIC CCW 00539000
  546. L R10,0(,R10) LOAD OPCODE AND DATA ADDRESS 00540000
  547. LA R10,0(,R10) ISOLATE DATA ADDRESS 00541000
  548. BR R9 RETURN TO CALLER 00542000
  549. SPACE 1 00543000
  550. CDTAPE EQU * HERE TO PROCESS DATA CHAINING CCW 00544000
  551. NI 4(R10),X'FF'-(CD+CC) DECHAIN CCW 00545000
  552. OI 4(R10),SILI PROTECT FROM PARTIAL READ 00546000
  553. MVI 5(R10),HEXFF FLAG CURRENT CCW 00547000
  554. BAL R12,ADDRTEST VALIDATE THE CCW ADDRESS 00548000
  555. BAL R12,IO EXECUTE CCW'S CONSTRUCTED TO HERE 00549000
  556. CLI 5(R10),HEXFF DID CURRENT CCW GET OVERLAID? 00550000
  557. BNE *+8 YES 00551000
  558. OI 4(R10),CD RECHAIN CCW TO OTHERS 00552000
  559. LR R4,R11 SAVE R11 IN R 4 00553000
  560. LA R11,BACKSPAC GET ADDRESS OF BACKSPACE CCW 00554000
  561. BAL R12,IO EXECUTE A TAPE BACKSPACE 00555000
  562. LR R11,R4 RESTORE R11 00556000
  563. LA R10,8(,R10) ADVANCE POINTER TO NEXT CCW 00557000
  564. TM 4(R10),CD IS CD FLAG SET? 00558000
  565. BO CDTAPE BRANCH IF YES 00559000
  566. TTESTCC TM 4(R10),CC IS CC FLAG SET? 00560000
  567. BZ IPLDONE BRANCH IF NOT 00561000
  568. BAL R12,ADDRTEST VALIDATE THE CCW ADDRESS 00562000
  569. CCTAPE NI 4(R10),X'FF'-CC DECHAIN CCW 00563000
  570. MVI 5(R10),HEXFF FLAG CURRENT CCW 00564000
  571. BAL R12,IO EXECUTE THE CHAIN DATA STRING 00565000
  572. CLI 5(R10),HEXFF DID CURRENT CCW GET OVERLAID? 00566000
  573. BNE *+8 YES 00567000
  574. OI 4(R10),CC RESET THE FLAG FOR RE-EXECUTION *00568000
  575. IF CHAIN GETS RESTARTED VIA TIC 00569000
  576. LA R10,8(,R10) ADVANCE THE CCW POINTER 00570000
  577. BR R9 RETURN TO CALLER 00571000
  578. EJECT 00572000
  579. *. 00573000
  580. * OPERATION OF THE IO SUBROUTINE - 00574000
  581. * 00575000
  582. * 1. SET CAW WITH CURRENT CCW POINTER. 00576000
  583. * 2. SAVE CSW. 00577000
  584. * 3. ISSUE SIO. 00578000
  585. * 4. IF THE CONDITION CODE IS 0 GOTO STEP 10. 00579000
  586. * 5. IF THE CONDITION CODE IS 2 OR 3 PRINT "SIO ERROR" MSG. 00580000
  587. * 6. SAVE CSW. 00581000
  588. * 8. IF UNIT CHECK, GOTO STEP 22. 00582000
  589. * 9. IF CHANNEL END NOT RECEIVED, GO BACK TO STEP 3. 00583000
  590. * 10. ISSUE TIO. 00584000
  591. * 11. IF THE CONDITION CODE IS 0 GOTO STEP 18. 00585000
  592. * 12. IF THE CONDITION CODE IS 2 GO BACK TO STEP 10. 00586000
  593. * 13. IF THE CONDITION CODE IS 3 PRINT "IPL TIO ERROR" MSG. 00587000
  594. * 14. IF THE DEVICE IS BUSY GO BACK TO STEP 10. 00588000
  595. * 15. COMBINE CSW WITH PREVIOUSLY SAVED CSW. 00589000
  596. * 16. IF THERE ARE ANY CHANNEL ERRORS OR UNEXPECTED STATUS, 00590000
  597. * PRINT THE "IPL UNIT ERROR" MSG. 00591000
  598. * 17. IF CHAN. END REC'D WITHOUT DEV. END, GO BACK TO STEP 10. 00592000
  599. * 18. IF UNIT CHECK RECEIVED, GO TO STEP 22. 00593000
  600. * 19. RESTORE CSW. 00594000
  601. * 20. IF THE CURRENT CAW WAS OVERLAID DURING THE I/O OPERATION, 00595000
  602. * SAVE ITS MOST RECENT VALUE. 00596000
  603. * 21. RETURN. 00597000
  604. * 22. ISSUE SENSE. IF UNIT CHECK WAS FOR UNUSUAL COMMAND 00598000
  605. * SEQUENCE ON 2540 READER, IGNORE IT AND RETURN. OTHERWISE 00599000
  606. * ISSUE APPROPRIATE ERROR MSG. 00600000
  607. * 00601000
  608. *. 00602000
  609. SPACE 1 00603000
  610. IO EQU * 00604000
  611. ST R11,CAW STORE CCW ADDRESS IN CAW 00605000
  612. LM R5,R6,CSW SAVE CSW 00606000
  613. RESTART EQU * @VA02796 00607000
  614. XC CSWSAVE(8),CSWSAVE CLEAR CSW SAVE AREA @VA02796 00608000
  615. SIO 0(R13) START UP DEVICE @VA02796 00609000
  616. BC 8,INTTEST DRAIN INTERRUPT @VA02796 00610000
  617. BC 3,SIOERR BUSY OR NOT OPERATIONAL...ERROR @VA02796 00611000
  618. MVC CSWSAVE(8),CSW SAVE ENTIRE CSW @VA02796 00612000
  619. TM CSW+4,UC UNIT CHECK? @VA02796 00613000
  620. BO DOSENSE YES, GO DO SENSE @VA02796 00614000
  621. TM CSW+5,255-IL ANY CHANNEL ERRORS? @VA04206 00615000
  622. BNZ UNITERR YES, ERROR @VA04206 00616000
  623. TM CSW+4,CE CHANNEL END? @VA02796 00617000
  624. BZ RESTART NO, RETRY THE START I/O @VA02796 00618000
  625. SPACE 1 00619000
  626. INTTEST EQU * @VA02796 00620000
  627. LM R5,R6,CSW SAVE CONTENTS OF CSW @VA04372 00620500
  628. TIO 0(R13) DRAIN INTERRUPT @VA02796 00621000
  629. BC 8,UCHKTEST NO INTERRUPT @VA02796 00622000
  630. BC 2,INTTEST BUSY...LOOP BACK @VA02796 00623000
  631. BC 1,TIOERR NOT OPERATIONAL...ERROR @VA02796 00624000
  632. TM CSW+4,BUSY STILL BUSY? @VA02796 00625000
  633. BO INTTEST YES, RETRY @VA02796 00626000
  634. CSWJOIN EQU * @VA04372 00626500
  635. OC CSWSAVE(8),CSW COMBINE CSW WITH PREVIOUS @VA02796 00627000
  636. TM CSW+5,255-IL CHANNEL ERRORS? @VA02796 00628000
  637. BNZ UNITERR YES @VA02796 00629000
  638. TM CSW+4,ATTN+UE+SM UNEXPECTED STATUS? @VA02796 00630000
  639. BNZ UNITERR YES...ERROR @VA02796 00631000
  640. TM CSWSAVE+4,CE HAVE WE GOTTEN CHANNEL END? @VA02796 00632000
  641. BZ UCHKTEST NO @VA02796 00633000
  642. TM CSW+4,DE YES - DEVICE END TOO? @VA02796 00634000
  643. BNZ UCHKTEST YES @VA04372 00634200
  644. DEVTIO EQU * @VA04372 00634400
  645. TIO 0(R13) WAIT FOR DEVICE END @VA04372 00634600
  646. BC 8,UCHKTEST NO INTERRUPT @VA04372 00634800
  647. BC 2,DEVTIO BUSY...HANG IN THERE @VA04372 00635000
  648. BC 1,TIOERR NOT OPERATIONAL...ERROR @VA04372 00635200
  649. TM CSW+4,BUSY STILL BUSY? @VA04372 00635400
  650. BO DEVTIO YES...HANG IN THERE SOME MORE @VA04372 00635600
  651. B CSWJOIN JOIN CODE TO TEST STATUS @VA04372 00635800
  652. SPACE 1 00636000
  653. UCHKTEST EQU * @VA02796 00637000
  654. TM CSWSAVE+4,UC UNIT CHECK? @VA02796 00638000
  655. BO DOSENSE YES, GO DO SENSE @VA02796 00639000
  656. STM R5,R6,CSW RESTORE SAVED CSW 00640000
  657. C R11,CAW HAS THE CAW BEEN OVERLAYED? 00641000
  658. BCR 8,R12 (BER) BRANCH IF NOT 00642000
  659. MVC SAVECAW,CAW SAVE MOST RECENT CAW 00643000
  660. BR R12 RETURN TO CALLER 00644000
  661. SPACE 00645000
  662. DOSENSE EQU * 00646000
  663. C R11,CAW HAS THE CAW BEEN OVERLAID? 00647000
  664. BE *+10 NO 00648000
  665. MVC SAVECAW,CAW SAVE MOST RECENT CAW 00649000
  666. LA R0,SENSE SET SENSE CCW 00650000
  667. ST R0,CAW ... 00651000
  668. SIO 0(R13) EXECUTE CCW 00652000
  669. BC 7,SIOERR BRANCH IF BAD START 00653000
  670. TIO 0(R13) DRAIN INTERRUPT 00654000
  671. BC 2,*-4 BRANCH IF STILL BUSY 00655000
  672. BC 9,TIOERR BRANCH IF BAD EXECUTION 00656000
  673. CLI CSW+4,CE+DE DID SENSE GET CHANNEL END AND DEVICE END 00657000
  674. BNE SENSERR BRANCH IF IT DID NOT 00658000
  675. CLI TYPE,TYP2540R IS DEVICE READER? 00659000
  676. BNE UNITERR NO, GIVE ERROR MESSAGE 00660000
  677. TM SENSDATA,UNUSUAL UNUSUAL COMMAND SEQUENCE ? 00661000
  678. BNO UNITERR NO, GIVE ERROR MESSAGE 00662000
  679. STM R5,R6,CSW RESTORE LATEST CSW 00663000
  680. BR R12 YES, IGNORE 00664000
  681. EJECT 00665000
  682. *. 00666000
  683. * OPERATION OF THE ADDRTEST SUBROUTINE - 00667000
  684. * 00668000
  685. * 1. IF CURRENT CCW IS A READ BACKWARD PROCEED TO STEP 6. 00669000
  686. * 2. IF THE CURRENT CCW DATA ADDRESS 00670000
  687. * IS GREATER THAN OR EQUAL TO THE 00671000
  688. * ADDRESS OF THE END OF THE IPL SIMULATOR RETURN. 00672000
  689. * 3. IF THE CURRENT CCW DATA ADDRESS PLUS THE CURRENT 00673000
  690. * CCW COUNT IS LESS THAN OR EQUAL TO THE STARTING 00674000
  691. * ADDRESS OF THE IPL SIMULATOR RETURN. 00675000
  692. * 4. PRINT ERROR MESSAGE "DMKVMI233 IPL OVERLAY ERROR". 00676000
  693. * 5. LOAD DISABLED WAIT STATE PSW. 00677000
  694. * 6. IF THE CURRENT CCW DATA ADDRESS IS LESS THAN THE START 00678000
  695. * OF THE IPL SIMULATOR RETURN. 00679000
  696. * 7. IF THE CURRENT CCW DATA ADDRESS MINUS THE CURRENT CCW 00680000
  697. * COUNT IS EQUAL TO OR GREATER THAN THE END OF THE IPL 00681000
  698. * SIMULATOR RETURN. 00682000
  699. * 8. GO TO STEP 4. 00683000
  700. * 00684000
  701. *. 00685000
  702. SPACE 1 00686000
  703. ADDRTEST EQU * 00687000
  704. L R2,0(,R10) LOAD COMMAND CODE AND DATA ADDRESS 00688000
  705. LA R2,0(,R2) ISOLATE DATA ADDRESS 00689000
  706. LA R3,SIMEND LOAD HIGHEST SIMULATOR ADDRESS 00690000
  707. TM 0(R10),X'0C' IS CCW A READ BACKWARD? 00691000
  708. BNO UPTEST NO 00692000
  709. TM 0(R10),X'03' ARE YOU SURE? 00693000
  710. BNZ UPTEST YES 00694000
  711. CR R2,R15 IS DATA START LOWER THAN IPL START? 00695000
  712. BCR 4,R12 (BLR) BRANCH IF YES (NO OVERLAY) 00696000
  713. SLR R7,R7 CLEAR A REGISTER @VA04700 00697100
  714. ICM R7,B'0011',6(R10) GET CCW DATA COUNT @VA04700 00697200
  715. SR R2,R7 FIND END OF DATA @VA04700 00697300
  716. CR R2,R3 IS THE END OF DATA IN THE SIMULATOR? 00698000
  717. BL OVERLAY YES 00699000
  718. BR R12 RETURN TO CALLER 00700000
  719. SPACE 00701000
  720. UPTEST CR R2,R3 IS DATA START HIGHER THAN SIMEND? 00702000
  721. BCR 11,R12 (BNLR) RETURN, NO OVERLAY IF >= @VA00869 00703000
  722. SLR R7,R7 CLEAR A REGISTER @VA04700 00704100
  723. ICM R7,B'0011',6(R10) GET CCW DATA COUNT @VA04700 00704200
  724. AR R2,R7 ADD COUNT TO START @VA04700 00704300
  725. CR R2,R15 IS THE END OF DATA IN THE SIMULATOR? 00705000
  726. BH OVERLAY YES, GO TREAT OVERLAY @VA00869 00706000
  727. BR R12 RETURN TO CALLER 00707000
  728. EJECT 00708000
  729. * ERROR MESSAGES AND PRINT / DIE ROUTINE 00709000
  730. SPACE 00710000
  731. SIOERR EQU * 00711000
  732. LA R4,ERRSIO LOAD MESSAGE ADDRESS 00712000
  733. LA R5,L'ERRSIO LOAD MESSAGE LENGTH 00713000
  734. B PRINT PRINT ERROR AND DIE 00714000
  735. SPACE 00715000
  736. TIOERR EQU * 00716000
  737. LA R4,ERRTIO LOAD MESSAGE ADDRESS 00717000
  738. LA R5,L'ERRTIO LOAD MESSAGE LENGTH 00718000
  739. B PRINT PRINT ERROR AND DIE 00719000
  740. SPACE 00720000
  741. UNITERR EQU * 00721000
  742. LA R4,ERRMESS LOAD MESSAGE ADDRESS 00722000
  743. LA R5,ERRLNTH1 GET MESSAGE LENGTH *00723000
  744. (ASSUME SHORT MESSAGE FIRST) 00724000
  745. UNPK ERRCSW(9),CSWSAVE(5) CONSTRUCT MESSAGE 00725000
  746. TR ERRCSW(8),TRTBL ... 00726000
  747. MVI ERRCSW+8,C' ' ... 00727000
  748. UNPK ERRCSW+9(9),CSWSAVE+4(5) ... 00728000
  749. TR ERRCSW+9(8),TRTBL ... 00729000
  750. TM CSWSAVE+4,UC UNIT CHECK ON? 00730000
  751. BNO PRINT NO, PRINT MESSAGE WITHOUT SENSE INFO 00731000
  752. MVI ERRSENSM,C',' RESTORE COMMA 00732000
  753. UNPK ERRSENS(13),SENSDATA(7) ... 00733000
  754. UNPK ERRSENS+12(13),SENSDATA+6(7) ... 00734000
  755. UNPK ERRSENS+24(13),SENSDATA+12(7) ... 00735000
  756. UNPK ERRSENS+36(13),SENSDATA+18(7) ... 00736000
  757. TR ERRSENS(48),TRTBL ... 00737000
  758. LA R5,L'ERRSENSM(,R5) SENSE MSG LENGTH @VM08862 00738000
  759. LA R0,24 MAXIMUN SENSE LENGTH @VM08862 00739000
  760. SH R0,CSW+6 SUBSTRACT RESIDUAL COUNT @VM08862 00740000
  761. CL R0,=F'24' OVER MAXIMUN ? @VM08862 00741000
  762. BL *+8 LESS THAN 24 BYTES BRANCH @VM08862 00742000
  763. L R0,=F'24' USE DEFAULT OF 24 BYTES @VM08862 00743000
  764. SLL R0,1 TIMES 2 FOR BYTE COUNT @VM08862 00744000
  765. AR R5,R0 ADD TO MESSAGE LENGTH @VM08862 00745000
  766. B PRINT GO PRINT SENSE MESSAGE @VM08862 00746000
  767. UNITERRT TM TYPE,TYP2401+TYP2415+TYP2420 2400 TAPE DRIVE ? 00747000
  768. BM PRINT BRANCH IF YES (6 SENSE BYTES) 00748000
  769. LA R5,36(,R5) 24 SENSE BYTES 00749000
  770. B PRINT 00750000
  771. SPACE 00751000
  772. OVERLAY EQU * 00752000
  773. LA R4,ERRLAY LOAD MESSAGE ADDRESS 00753000
  774. LA R5,L'ERRLAY LOAD MESSAGE LENGTH 00754000
  775. B PRINT PRINT ERROR AND DIE 00755000
  776. SPACE 00756000
  777. SENSERR EQU * 00757000
  778. LA R4,SENSMESS LOAD MESSAGE ADDRESS 00758000
  779. LA R5,L'SENSMESS LOAD MESSAGE LENGTH 00759000
  780. B PRINT PRINT ERROR AND DIE 00760000
  781. SPACE 00761000
  782. PRINT EQU * 00762000
  783. LA R0,PRINTCCW GET THE CCW ADDRESS 00763000
  784. ST R0,CAW TELL THE CHANNEL WHERE IT IS 00764000
  785. TM CODEBYTE,VMMCODE+VMMTEXT RECEIVING CODE & TEXT ? 00765000
  786. BZ WAITDIE NO -- NO MSG 00766000
  787. BO SETCNT YES -- ALL OF MSG 00767000
  788. TM CODEBYTE,VMMCODE CODE ? 00768000
  789. BO PRCODE YES -- 00769000
  790. LA R4,11(,R4) SET FOR MSG TEXT ONLY @VA05494 00770100
  791. SH R5,=H'11' ADJUST LENGTH @VA05494 00771100
  792. B SETCNT 00772000
  793. PRCODE EQU * 00773000
  794. LA R5,10 LENGTH FOR MSG CODE ONLY @VA05494 00774100
  795. SETCNT EQU * 00775000
  796. STH R5,PRINTCCW+6 STORE MSG COUNT IN CCW 00776000
  797. ST R4,PRINTCCW STORE MESSAGE ADDRESS IN PRINT CCW 00777000
  798. MVI PRINTCCW,X'09' LOAD CONSOLE OP-CODE 00778000
  799. TIO 0(R14) CLEAR ANY PENDING INTERRUPTS 00779000
  800. BC 4+2,*-4 CC=1, CC=2 CSW STORED OR BUSY 00780000
  801. SIO 0(R14) SEND ERROR TO USER CONSOLE 00781000
  802. CNOP 4,8 SET ALLIGNMENT FOR LPSW 00782000
  803. SPACE 00783000
  804. WAITDIE LPSW *+4 00784000
  805. DC XL2'0002' INTERRUPS OFF, WAIT ON 00785000
  806. DC XL6'00' 00786000
  807. EJECT 00787000
  808. IPLDONE EQU * HERE IF ALL CCW'S ARE PRESENT AND VALIDATED 00788000
  809. * AFTER EXECUTION CONTROL WILL BE PASSED TO THE USER VIA 00789000
  810. * THE PSW IN LOCATION 0 (AFTER STORING THE IPL DEVICE 00790000
  811. * ADDRESS IN THE INTERRUPT CODE FIELD OF THE IPLPSW) 00791000
  812. BAL R12,IO EXECUTE THE LAST CCW 00792000
  813. TM FLAG2,IPLST IPLSTOP REQUESTED? 00793000
  814. BZ LOADNOW NO - DON'T DO IT 00794000
  815. UNPK CPARG(6+1),IPLPSW+5(3+1) GET PSW ADDR IN EBCDIC @V200930 00795000
  816. TR CPARG(6),TAB-C'0' TANSLATE TO EBCDIC @V200930 00796000
  817. MVI CPARG+6,C' ' ADD A BLANK AT THE END @V200930 00797000
  818. LA R0,CPCOM COMMAND ADDRESS @V200930 00798000
  819. LA R1,14 LENGTH OF ADSTOP COMMAND @V200930 00799000
  820. DC X'83010008' DIAGNOSE TO ISSUE ADSTOP @V200930 00800000
  821. LOADNOW EQU * 00801000
  822. TM IPLPSW+1,EXTMODE EXTENDED MODE? 00802000
  823. BO *+12 YES 00803000
  824. STH R13,IPLPSW+2 SET IPL DEVICE ADDRESS 00804000
  825. B *+8 00805000
  826. STH R13,INTTIO SET IPL DEVICE ADDRESS IN EXT MODE 00806000
  827. MVC CAW(4),SAVECAW RESTORE USER'S CAW 00807000
  828. LM R0,R15,SAVEREGS RESTORE THE USER'S REGISTERS 00808000
  829. LPSW IPLPSW AND AWAY WE GO 00809000
  830. FLAG2 DC XL1'00' FLAG TO DETERMINE IF STOP TO BE SET 00810000
  831. CPCOM DC CL7'ADSTOP ' @V200930 00811000
  832. CPARG DC CL7'000000 ' @V200930 00812000
  833. TAB DC C'0123456789ABCDEF' HEX TRANSLATE TABLE @V200930 00813000
  834. EJECT 00814000
  835. * CONSTANTS 00815000
  836. SPACE 00816000
  837. SENSE CCW X'04',SENSDATA-DMKVMI,SILI,24 SENSE CCW 00817000
  838. SPACE 1 00818000
  839. PRINTCCW CCW X'09',*-*,SILI,0 CONSOLE ERROR MESSAGE CCW 00819000
  840. SPACE 1 00820000
  841. BACKSPAC CCW X'27',0,SILI,1 TAPE BACKSPACE FOR READ DATA 00821000
  842. SPACE 1 00822000
  843. TAPE7CCW CCW X'93',0,CC+SILI,1 7 TRACK TAPE MODE-SET CCW 00823000
  844. TTICCCW CCW X'08',*-*,SILI,1 TIC TO 7 TRACK TAPE OPERATION 00824000
  845. SPACE 1 00825000
  846. CARDCCW EQU * LOAD KEY CCW FOR CARD READER 00826000
  847. TAPE9CCW CCW X'02',0,SILI,24 LOAD KEY CCW FOR TAPE 00827000
  848. SPACE 1 00828000
  849. DISKCCW CCW X'07',SEEK-DMKVMI,CC+SILI,6 SEEK 00829000
  850. CCW X'31',SEEK+2-DMKVMI,CC+SILI,5 SEARCH 00830000
  851. CCW X'08',*-8-DMKVMI,0,1 TIC 00831000
  852. READCCW CCW X'06',0,SILI,24 READ DATA 00832000
  853. CCW X'08',IPLCCW1-PSA,0,1 TIC TO USER'S IPLCCW1 00833000
  854. SPACE 1 00834000
  855. CSWSAVE DS 1D SAVE CSW FOR ERROR ANALYSIS 00835000
  856. SPACE 00836000
  857. LTORG 00837000
  858. * FULLWORDS 00838000
  859. SAVECAW DS F 00839000
  860. SAVEREGS DS 16F 00840000
  861. SPACE 00841000
  862. * UNALIGNED DATA GOES AFTER THIS POINT 00842000
  863. ERRSIO DC C'DMKVMI230E IPL SIO ERROR' @VA04551 00843000
  864. ERRTIO DC C'DMKVMI231E IPL TIO ERROR' @VA04551 00844000
  865. ERRMESS DC C'DMKVMI232E IPL UNIT ERROR, CSW=' @VA04551 00845000
  866. ERRCSW DC C'XXXXXXXX XXXXXXXX' 00846000
  867. ERRLNTH1 EQU *-ERRMESS LENGTH OF SHORT MESSAGE 00847000
  868. ERRSENSM DC C', SENSE=' 00848000
  869. ERRSENS DC C'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' 00849000
  870. DS X 00850000
  871. ERRLAY DC C'DMKVMI233E IPL OVERLAY ERROR' @VA04551 00851000
  872. ERRTYP DC C'DMKVMI022E VADDR MISSING OR INVALID' @VA04551 00852000
  873. SENSMESS DC C'DMKVMI234E IPL SENSE ERROR' @VA04551 00853000
  874. SENSDATA DC XL24'0' AREA FOR SENSE DATA 00854000
  875. SEEK DC XL7'1' BBCCHHR 00855000
  876. CYLAD EQU SEEK+2 00856000
  877. OPCODE DS XL1 OPCODE SAVE AREA 00857000
  878. CLASS DS 1X IPL DEVICE CLASS 00858000
  879. TYPE DS 1X IPL DEVICE TYPE 00859000
  880. CODEBYTE DS 1X ERROR LEVEL CODE BYTE 00860000
  881. TRTBL EQU *-C'0' TRANSLATE TABLE TO CONVERT TO HEX 00861000
  882. DC C'0123456789ABCDEF' 00862000
  883. SPACE 00863000
  884. SIMEND EQU * END OF IPL SIMULATOR CODE 00864000
  885. EJECT 00865000
  886. * EQUATES 00866000
  887. ZERO EQU X'00' 00867000
  888. HEXFF EQU X'FF' OVERLAY ANALYSIS FLAG BYTE 00868000
  889. NOOP EQU 3 NOOP CCW OPCODE 00869000
  890. TIC EQU 8 TIC CCW OPCODE 00870000
  891. UNUSUAL EQU X'02' UNUSUAL SENSE BYTE FROM 2821 CONTROL UNIT 00871000
  892. SPACE 2 00872000
  893. LTORG 00873000
  894. EJECT 00874000
  895. COPY EQU 00875000
  896. COPY DEVTYPES 00876000
  897. COPY VMBLOK 00877000
  898. PSA 00878000
  899. EJECT 00879000
  900. ORG IPLPSW 00880000
  901. SPACE 00881000
  902. IPLCYLNO DS H VIRTUAL IPL CYLINDER NUMBER @VM08862 00882000
  903. IPLADDR DS H IPL DEVICE ADDRESS 00883000
  904. IPLSAVE DS F SAVE AREA FOR R15 AT ENTRY TO IPL 00884000
  905. IPLERRCD DS X VMMLEVEL BYTE FROM USER'S VMBLOK 00885000
  906. DS XL1 DON'T WANT TO OVERLAY IPL STOP FLAG 00886000
  907. FLAG1 DS XL1 FLAG FOR IPLSTOP STORED HERE 00887000
  908. IPLST EQU X'80' BIT ONE IN THE FLAG BYTE 00888000
  909. END 00889000