Table of Contents

DMTINI Source

References

Source Listing

DMTINI.ASSEMBLE.txt
  1. INI TITLE 'DMTINI (RSCS) VM/370 - RELEASE 6' 00001000
  2. *. 00002000
  3. * MODULE NAME - 00003000
  4. * 00004000
  5. * DMTINI 00005000
  6. * 00006000
  7. * FUNCTION - 00007000
  8. * 00008000
  9. * DMTINI RECEIVES CONTROL AFTER INITIAL LOADING OF RSCS, 00009000
  10. * AND PERFORMS INITIALIZATION FUNCTIONS WHICH ARE GENERAL 00010000
  11. * AND COMMON TO ALL PARTS OF THE SUBSYSTEM. DMTINI 00011000
  12. * OPTIONALLY WRITES A COPY OF THE INITIAL LOAD TO DASD 00012000
  13. * ACCORDING TO OPERATOR INSTRUCTIONS WHEN THE SUBSYSTEM 00013000
  14. * IS FIRST LOADED FROM THE GENERATION IPL DECK. 00014000
  15. * WHEN IPL'ED FROM DISK, DMTINI COMPLETES READING 00015000
  16. * OF THE SAVED SUBSYSTEM LOAD. WHEN IPL DISK WRITING 00016000
  17. * OR READING IS COMPLETE, DMTINI PERFORMS ITS RSCS 00017000
  18. * INITIALIZATION FUNCTIONS. 00018000
  19. * 00019000
  20. * ATTRIBUTES - 00020000
  21. * 00021000
  22. * RESUABLE 00022000
  23. * 00023000
  24. * ENTRY POINTS - 00024000
  25. * 00025000
  26. * DMTINI - READ A NUCLEUS INTO MAIN STORAGE 00026000
  27. * DMTINIW - WRITE A NUCLEUS ONTO A DASD DEVICE 00027000
  28. * 00028000
  29. * ENTRY CONDITIONS - 00029000
  30. * 00030000
  31. * DMTINI IS ENTERED AT DMTINI FROM THE DASD IPL LOADER, 00031000
  32. * AND AT DMTINIW FROM THE GENERATION LOAD DECK LOADER. 00032000
  33. * 00033000
  34. * EXIT CONDITIONS - 00034000
  35. * 00035000
  36. * NORMAL - 00036000
  37. * AFTER THE RSCS STORAGE AREAS ARE INITIALIZED, DMTINI 00037000
  38. * EXITS TO THE MSUP DISPATCHER BY MEANS OF BALR R14,R15. 00038000
  39. * 00039000
  40. * ERROR - 00040000
  41. * WHEN ERROR CONDITIONS ARE ENCOUNTERED, DMTINI CEASES 00041000
  42. * PROCESSING AND TYPES A DIAGNOSTIC MESSAGE ON THE 00042000
  43. * OPERATOR CONSOLE. 00043000
  44. * 00044000
  45. * CALLS TO OTHER ROUTINES - 00045000
  46. * 00046000
  47. * DMTQRQ - TO REQUEST A FREE SUPERVISOR QUEUE ELEMENT 00047000
  48. * DMTDSP - TO BEGIN RSCS DISPATCHING 00048000
  49. * 00049000
  50. * EXTERNAL REFERENCES - 00050000
  51. * 00051000
  52. * DMTEXT - EXTERNAL INTERRUPT HANDLER ENTRY POINT 00052000
  53. * DMTSVC - SVC INTERRUPT HANDLER ENTRY POINT 00053000
  54. * DMTIOMIN - I/O INTERRUPT HANDLER ENTRY POINT 00054000
  55. * DMTMAPME - ADDR OF END OF MAIN (VIRTUAL) STORAGE MAP 00055000
  56. * DMTCREDA - ADDR OF DMTCRE DASD I/O REQUEST TABLE 00056000
  57. * DMTREXVL - RSCS LOAD DATE AND TIME BUFFER 00057000
  58. * DMTMAPQE - END OF SUPERVISOR QUEUE 00058000
  59. * 00059000
  60. * 00060000
  61. * TABLES / WORKAREAS - 00061000
  62. * 00062000
  63. * TASKE - MSUP TASK ELEMENT (FOR INITIAL TASK, REX) 00063000
  64. * FREEE - MSUP FREE ELEMENT (FOR SUPQUEUE INITIALIZATION) 00064000
  65. * DEVTAB - DEVICE TABLE (FOR CONSOLE AND SYSTEM DASD ADDRS) 00065000
  66. * 00066000
  67. * REGISTER USAGE - 00067000
  68. * 00068000
  69. * GPR 0 = IPL DISK DEVICE ADDRESS 00069000
  70. * GPR 1 = CCW STRING STARTING ADDRESS 00070000
  71. * GPR 2 = CURRENT CYLINDER NUMBER 00071000
  72. * GPR 3 = CURRENT TRACK NUMBER 00072000
  73. * GPR 4 = DASD RECORD LENGTH = 800 00073000
  74. * GPR 5 = CURRENT STORAGE RANGE END 00074000
  75. * GPR 6 = CURRENT STORAGE RANGE START 00075000
  76. * GPR 7 = POINTER TO NEXT RANGE VALUES 00076000
  77. * GPR 8 = CHANNEL COMMAND WORD LENGTH = 8 00077000
  78. * GPR 9 = CCW STRING ENDING ADDRESS 00078000
  79. * GPR 10 = CURRENT CCW ADDRESS 00079000
  80. * GPR 11 = MODULE BASE REGISTER 00080000
  81. * GPR 12 = SEARCH ADDRESS POINTER 00081000
  82. * GPR 13 = CONSOLE DEVICE ADDRESS 00082000
  83. * GPR 14 = LINKAGE REGISTER 00083000
  84. * GPR 15 = SCRATCH REGISTER 00084000
  85. * 00085000
  86. * NOTES - 00086000
  87. * 00087000
  88. * IF AN I/O ERROR OCCURS WHILE WRITING A NUCLEUS, THE FIRST TWO 00088000
  89. * SENSE BYTES ARE STORED AT LOCATIONS 2 AND 3, THE SECOND HALF 00089000
  90. * OF THE PSW IS STORED IN LOCATIONS 4 TO 7, AND THE CSW IS SAVED 00090000
  91. * IN LOCATIONS 8 TO 15 IN MEMORY. IF AN I/O ERROR OCCURS WHILE 00091000
  92. * READING A NUCLEUS, THE WAIT STATE IS ENTERED AND THE INSTRUC- 00092000
  93. * TION ADDRESS FIELD OF THE PSW CONTAINS THE CHARACTERS ' INI'. 00093000
  94. * 00094000
  95. * OPERATION - 00095000
  96. * 00096000
  97. * DMTINIR - READ A NUCLEUS INTO MAIN STORAGE 00097000
  98. * 00098000
  99. * 1. STORE THE DATA ADDRESS IN THE READ CCWS. 00099000
  100. * 00100000
  101. * 2. READ ONE TRACK OF THE NUCLEUS FROM THE IPL DEVICE. 00101000
  102. * 00102000
  103. * 3. IF THE NUCLEUS IS NOT COMPLETELY READ, GO TO STEP 1. 00103000
  104. * 00104000
  105. * 4. GO TO LABEL INIEXIT TO CONTINUE WITH THE INITIALIZATION. 00105000
  106. * 00106000
  107. * DMTINIW - WRITE A NUCLEUS ONTO A DASD DEVICE 00107000
  108. * 00108000
  109. * 1. SEE IF A CONSOLE EXISTS AT ADDRESS 009. IF NOT, WAIT FOR 00109000
  110. * AN INTERRUPT FROM A CONSOLE DEVICE. 00110000
  111. * 00111000
  112. * 2. ASK THE USER TO ENTER THE SYSTEM DISK ADDRESS. 00112000
  113. * 00113000
  114. * 3. ASK THE USER IF HE WANTS TO WRITE THE NUCLEUS ONTO A DASD 00114000
  115. * DEVICE. IF HE DOES NOT, GO TO LABEL INIEXIT. 00115000
  116. * 00116000
  117. * 4. ASK THE USER FOR THE IPL DEVICE ADDRESS AND VERIFY THAT 00117000
  118. * IS A SUPPORTED DASD TYPE DEVICE. 00118000
  119. * 00119000
  120. * 5. INITIALIZE THE DEVICE TYPE DEPENDENT VALUES. 00120000
  121. * 00121000
  122. * 6. ASK THE USER FOR THE CYLINDER NUMBER ON WHICH TO WRITE 00122000
  123. * THE NUCLEUS AND VERIFY THAT THE NUCLEUS WILL NOT OVERLAY 00123000
  124. * ANY CMS FILES ON THE DISK. 00124000
  125. * 00125000
  126. * 7. ASK THE USER IF THE IPL TEXT IS ALSO TO BE WRITTEN ON 00126000
  127. * CYLINDER 0 AND SET THE SWITCH ACCORDINGLY. 00127000
  128. * 00128000
  129. * 8. WRITE THE IPL TEXT ON THE NUCLEUS CYLINDER AND ON 00129000
  130. * CYLINDER 0 IF REQUESTED. 00130000
  131. * 00131000
  132. * 9. STORE THE DATA ADDRESS IN THE WRITE CCWS AND THE CYLINDER 00132000
  133. * NUMBER IN THE SEEK AND SEARCH ADDRESSES. 00133000
  134. * 00134000
  135. * 10. WRITE ONE TRACK OF THE NUCLEUS ONTO THE IPL DEVICE. 00135000
  136. * 00136000
  137. * 11. IF THE NUCLEUS IS NOT COMPLETELY WRITTEN, GO TO STEP 10. 00137000
  138. * 00138000
  139. * 12. GO TO LABEL INIEXIT TO CONTINUE WITH THE INITIALIZATION. 00139000
  140. * 00140000
  141. * INIEXIT - COMPLETE INITIALIZATION AND BEGIN PROCESSING 00141000
  142. * 00142000
  143. * 1. ACQUIRE THE DASD DEVICE TYPE FROM VM/370, AND SET 00143000
  144. * THE DASD CUU ADDR, TYPE CODE, AND DEVICE DEPENDENT 00144000
  145. * VARIABLE TABLE IN THE DMTCRE DASD ACCESS CONTROL AREA. 00145000
  146. * 00146000
  147. * 2. CLEAR THE FIRST 88 BYTES OF LOW VIRTUAL STORAGE, 00147000
  148. * CLEAR THE GENERAL REGISTERS, SET THE TIMER WORD TO 00148000
  149. * X'FFFFFFFF', AND SET THE RSCS NEW PSW VALUES. 00149000
  150. * 00150000
  151. * 3. INITIALIZE THE MAIN STORAGE MAP AND MAIN STORAGE 00151000
  152. * SIZE WORD. 00152000
  153. * 00153000
  154. * 4. INITIALIZE THE SUPERVISOR QUEUE AND SET ALL ELEMENTS 00154000
  155. * FREE TO START. 00155000
  156. * 00156000
  157. * 5. REQUEST A FREE SUPERVISOR QUEUE ELEMENT, BUILD AND 00157000
  158. * ENQUEUE THE REX TASK ELEMENT. 00158000
  159. * 00159000
  160. * 6. RESERVE REX TASK STORAGE IN THE MAIN STORAGE MAP. 00160000
  161. * 00161000
  162. * 7. EXIT TO THE RSCS DISPATCHER TO BEGIN PROCESSING. 00162000
  163. *. 00163000
  164. EJECT 00164000
  165. PUNCH 'SPB ' 00165000
  166. DMTINI CSECT 00166000
  167. DMTINIR EQU * ENTERED HERE FROM CP IPL SIMULATOR 00167000
  168. BALR R11,0 LOAD BASE FOR COMMON ADDRESSABILITY 00168000
  169. BCTR R11,0 ... 00169000
  170. BCTR R11,0 ... 00170000
  171. USING DMTINIR,R11 00171000
  172. USING TASKE,R1 GET TASK ELEMENT ADDRESSABILITY 00172000
  173. USING SVECTORS,0 GET SVECTORS ADDRESSABILITY 00173000
  174. SSM DISABLED RUN DISABLED FOR ALL I/O INTERUPTS 00174000
  175. LH R0,IPLPSW+2 LOAD THE IPL DEVICE ADDRESS 00175000
  176. L R1,CCWBGNR POINT TO CCW STRING TO READ IN NUCLEUS 00176000
  177. LH R2,RDCYLNO LOAD THE NUCLEUS STARTING CYLINDER NUMBER 00177000
  178. SR R3,R3 SET THE HEAD NUMBER TO ZERO 00178000
  179. LA R4,800 SET THE RECORD LENGTH TO 800 00179000
  180. LM R5,R7,RANGE1 LOAD LIMITS OF 1ST RANGE TO BE READ 00180000
  181. LA R8,8 LOAD THE CCW LENGTH 00181000
  182. L R9,CCWENDR LOAD ADDRESS OF LAST CCW TO BE BUILT 00182000
  183. LA R10,RDCCW3 START READING AT RECORD 3 00183000
  184. B STORESA BUILD THE REST OF THE CCW CHAIN 00184000
  185. SPACE 00185000
  186. ENDRANGE LTR R7,R7 DID WE READ THE LAST RANGE? 00186000
  187. BZ FLAGEND YES, STOP BUILDING THE CCW CHAIN 00187000
  188. LM R5,R7,0(R7) LOAD LIMITS NEXT RANGE TO BE READ 00188000
  189. B STORESA 00189000
  190. SPACE 00190000
  191. FLAGEND BCTR R7,0 MAKE POINTER TO NEXT RANGE NEGATIVE 00191000
  192. SR R10,R8 BACKUP TO THE PREVIOUS CCW 00192000
  193. CLI 0(R10),RDDATA IS THIS A READ DATA CCW ? 00193000
  194. BNE INIRDONE NO, NO MORE TO READ 00194000
  195. MVI 4(R10),SILI TURN THE COMMAND CHAINING FLAG OFF 00195000
  196. B DIAGRD READ IN THE REMAINDER OF THE NUCLEUS 00196000
  197. SPACE 00197000
  198. READLOOP AH R3,TRKINC ADD TRACK INCREMENT TO THE TRACK NUMBER 00198000
  199. CH R3,TRKMAX IS THIS THE END OF A CYLINDER 00199000
  200. BL STTRKAD NO, CONTINUE BUILDING CCWS 00200000
  201. SR R3,R3 YES, ZERO THE TRACK NUMBER AND 00201000
  202. LA R2,1(,R2) ADD ONE TO THE CYLINDER NUMBER 00202000
  203. STH R2,RDCYLNO UPDATE THE CURRENT SEEK ADDRESS 00203000
  204. STTRKAD STH R3,RDTRKNO ... 00204000
  205. LA R10,RDCCW1 POINT TO THE 1ST READ DATA CCW 00205000
  206. ADDRLOOP BXH R6,R4,ENDRANGE ADD 800 TO DATA ADDR & GO IF END OF RANGE 00206000
  207. STORESA ST R6,0(,R10) STORE THE DATA ADDRESS IN THE CCW 00207000
  208. MVI 0(R10),RDDATA MOVE IN A READ DATA COMMAND CODE 00208000
  209. BXLE R10,R8,ADDRLOOP POINT TO NEXT CCW AND LOOP IF MORE 00209000
  210. DIAGRD DC X'83010020' READ THE NUCLEUS INTO MAIN STORAGE 00210000
  211. BNZ RDERROR BRANCH IF ANY ERROR OCCURS 00211000
  212. LTR R7,R7 IS THE NUCLEUS COMPLETELY IN ? 00212000
  213. BNM READLOOP NO, READ IN ANOTHER TRACK WORTH 00213000
  214. INIRDONE EQU * 00214000
  215. INIEXIT EQU * 00215000
  216. LR R2,R0 DASD DEV ADDR 00216000
  217. DIAG R2,R3,X'24' GET DEVICE TYPE 00217000
  218. BC 7,RDERROR QUIT IF DEVTYPE FAILS 00218000
  219. L R1,=V(DMTCREDA) GET LOADER I/O TABLE ADDR 00219000
  220. STCM R3,B'0100',DEVCODE-IOTABLE(R1) TYPE TO LOADER 00220000
  221. STH R0,DEVCUU-IOTABLE(R1) GIVE DISK ADDR TO LOADER 00221000
  222. LA R4,RSCS2314 ASSUME TYPE = 2314 00222000
  223. CLI DEVCODE-IOTABLE(R1),TYP2314 CORRECT? 00223000
  224. BE INITMOVE YES - MOVE TABLE 00224000
  225. LA R4,RSCS3330 ASSUME TYPE = 3330 00225000
  226. CLI DEVCODE-IOTABLE(R1),TYP3330 CORRECT? 00226000
  227. BE INITMOVE YES - MOVE TABLE 00227000
  228. LA R4,RSCS3350 ASSUME TYPE = 3350 @V304498 00227100
  229. CLI DEVCODE-IOTABLE(R1),TYP3350 CORRECT? @V304498 00227200
  230. BE INITMOVE YES - MOVE TABLE @V304498 00227300
  231. LA R4,RSCS3340 ASSUME TYPE = 3340 00228000
  232. CLI DEVCODE-IOTABLE(R1),TYP3340 CORRECT? 00229000
  233. BNE RDERROR QUIT IF UNSUPPORTED DEVICE 00230000
  234. INITMOVE EQU * 00231000
  235. MVC 44(32,R1),0(R4) GIVE DASD TYPE INFO - LOADER @V304498 00232100
  236. XC IPLPSW(88),IPLPSW CLEAR LOW CORE TO START OF NEW 00233000
  237. LM R0,R10,IPLPSW AND CLEAR ALL THE REGISTERS 00234000
  238. LM R12,R15,IPLPSW AND CLEAR ALL THE REGISTERS 00235000
  239. SR R1,R1 CLEAR REG.R1 00236000
  240. BCTR R1,0 REG.1 = -1 00237000
  241. ST R1,TIMER SET TIMER WORD TO X'FFFFFFFF' 00238000
  242. SCKC FFS SET HI VALUE FOR CLOCK COMPARATOR@VA03349 00238100
  243. LCTL C0,C0,RSCSCR0 ENAB. CLOCK COMP UNDER CTL OF PSW@VA03349 00238200
  244. MVC NEWEXT(40),LOWCORE INITIALIZE THE NEW PSW'S 00239000
  245. SPACE 00240000
  246. L R1,MAINMAP REG.1 = ADDRESS OF MAIN STORAGE MAP 00241000
  247. L R2,MAPEND REG.2 = ADDRESS OF END OF STORAGE MAP 00242000
  248. SLR R2,R1 REG.2 = LENGTH OF MAP IN BYTES 00243000
  249. ST R2,MAINSIZE SET MAIN STORAGE SIZE IN VECTOR AREA 00244000
  250. BCTR R2,0 DECREMENT FOR CLEAR MVC 00245000
  251. EX R2,MAPCLEAR SET ALL PAGES FREE TO START 00246000
  252. * NOTE THAT THIS LIMITS FREE STORAGE SIZE TO 256 PAGES (1 MEG) 00247000
  253. MVI 0(R1),X'FF' SET PAGE ZERO TO SYSTEM ID 00248000
  254. MVI 1(R1),X'FF' AND PAGE ONE TOO 00249000
  255. SPACE 00250000
  256. MVI 2(R1),X'FF' AND PAGE TWO TOO @VA03349 00251100
  257. LA R3,3 SET FIRST FREE PAGE NUMBER @VA03349 00251200
  258. SLL R3,12 FIRST FREE STORAGE ADDRESS 00252000
  259. L R1,=V(DMTMAPQE) ADDR OF END OF SUP QUEUE 00253000
  260. SL R1,=F'16' ADDR OF LAST SUP QUEUE ELEMENT 00254000
  261. LA R2,2 SET SUP QUEUE EXTRN PAGE NUM @VA03349 00255100
  262. SLL R2,12 SUP QUEUE EXTN ADDR 00256000
  263. ST R2,FREENEXT-FREEE(R1) CHAIN TO EXTN 00257000
  264. LR R1,R2 SET FIRST EXTN ELEM ADDR 00258000
  265. INIQFREE EQU * 00259000
  266. LA R2,16(R1) NEXT PIECE TO BE FREE ELEMENT 00260000
  267. CLR R2,R3 PAST LIMIT YET? 00261000
  268. BNL INIQDONE YES - SET CHAIN TERMINATOR 00262000
  269. ST R2,FREENEXT-FREEE(R1) CHAIN CURRENT TO NEXT 00263000
  270. LR R1,R2 MAKE NEXT CURRENT 00264000
  271. B INIQFREE AND DO ANOTHER ELEMENT 00265000
  272. INIQDONE EQU * 00266000
  273. SR R2,R2 CLEAR NEXT POINTER 00267000
  274. ST R2,FREENEXT-FREEE(R1) TERMINATE FREE CHAIN 00268000
  275. MVC FREEQ(4),QUEUE SET ALL ELEMENTS FREE TO START 00269000
  276. SPACE 00270000
  277. SR R1,R1 CLEAR REG.R1 FOR QUEUE ELEMENT GET 00271000
  278. L R15,QREQ REG.15 = ADDRESS OF SYSTEM QUEUE GET ROUTINE 00272000
  279. BALR R14,R15 GET A QUEUE ELEMENT 00273000
  280. ST R1,TASKQ INITIALIZE TASK QUEUE POINTER 00274000
  281. XC TASKNEXT(4),TASKNEXT CLEAR FIRST TASK ELEMENT LIN 00275000
  282. MVC TASKSAVE(4),FIRSTSAV INITIALIZE FIRST TASK SAVE AREA 00276000
  283. MVI TASKID,X'01' INITIALIZE THE FIRST TASK ID 00277000
  284. MVI TASKSTAT,X'00' INITIALIZE THE FIRST TASK FLAGS 00278000
  285. MVC TASKNAME(4),FIRSTNAM INITIALIZE FIRST TASK NAME 00279000
  286. SPACE 00280000
  287. L R2,TASKSAVE REG.2 = ADDR OF FIRST TASK SAVE AREA 00281000
  288. SRL R2,12 REG.2 = FIRST TASK SAVE AREA PAGE NUMBER 00282000
  289. L R3,MAINMAP REG.3 = ADDRESS OF START OF MAIN STORAGE MAP 00283000
  290. LA R3,0(2,R3) REG.1 = ADDRESS OF FIRST TASK S/A PAGE ENTRY 00284000
  291. MVC 0(1,R3),TASKID SET TASK ID IN STORAGE MAP 00285000
  292. SPACE 00286000
  293. L R15,DISPATCH REG.15 = DISPATCHER ENTRY ADDRESS 00287000
  294. BALR R14,R15 START UP THE FIRST TASK 00288000
  295. SPACE 00289000
  296. MAPCLEAR XC 1(0,R1),1(R1) TO BE EXECUTED BY ABOVE CODE 00290000
  297. RSCSCR0 DC A(X'000008E0') CR0 MASK = CLOCK COMPARATOR @VA03349 00290100
  298. DS 0D 00290200
  299. FFS DC 8X'FF' ALSO A MINUS ONE @VA03349 00290300
  300. EJECT 00291000
  301. RDERROR EQU * 00292000
  302. SR R13,R13 CLEAR DEVICE REG 00293000
  303. BCTR R13,0 -1 TO REQUEST CONS ADDR 00294000
  304. DIAG R13,R14,X'24' GET CONS ADDR FROM VM/370 00295000
  305. LA R15,RDERR1 STORE ERROR MESSAGE CCW ADDRESS IN CAW 00296000
  306. ST R15,CAW ... 00297000
  307. TIO 0(R13) CLEAR ANY PENDING INTERRUPTS 00298000
  308. BNZ *-4 ... 00299000
  309. SIO 0(R13) SEND THE ERROR MESSAGE 00300000
  310. BNZ *-4 ... 00301000
  311. TIO 0(R13) AND WAIT FOR IT TO COMPLETE 00302000
  312. BNZ *-4 ... 00303000
  313. LPSW RDERRPSW CAN NOT CONTINUE - ENTER CP 00304000
  314. SPACE 3 00305000
  315. DS 0D 00306000
  316. RDERRPSW DC AL2(WAIT,0),A(X'011') @VM01136 00307010
  317. SPACE 00308000
  318. RDERR1 CCW WRITE1,RDMSG1,CC+SILI,L'RDMSG1 00309000
  319. CCW NOP,0,SILI,1 00310000
  320. SPACE 00311000
  321. RDMSG1 DC C'DMTINI402T IPL DEVICE READ I/O ERROR' @VM01137 00312010
  322. EJECT 00313000
  323. * DEVICE TYPE 00314000
  324. * DEVICE DEPENDENT VALUES 2311 2314 3330 2305 2305 3340 3350 00315100
  325. * 2319 M1 M2 00315200
  326. CCWBGNR DC A(RDCCWS+0) +8 +8 +0 +0 +0 +0 +0 @V304498 00315300
  327. CCWENDR DC A(RDCCWF) CCW4 CCWF CCWE CCWB CCWE CCW8 @V304498 00315400
  328. * CCW13 00315500
  329. TRKINC DC H'0' 1 2 1 1 1 1 1 @V304498 00315600
  330. TRKMAX DC H'0' 10 20 19 8 8 12 30 @V304498 00315700
  331. SPACE 00321000
  332. RANGE1 DC A(DMTINIW) NUCLEUS SEGMENT 0 @VM01108 00322010
  333. DC A(0) 00323000
  334. DC A(0) 00324000
  335. SPACE 00325000
  336. RDCCWS DS 0D 00326000
  337. CCW SEEK,RDSEEKA,CC+SILI,6 00327000
  338. CCW SETSEC,RDSECNO,CC+SILI,1 00328000
  339. CCW SEARCH,RDCYLNO,CC+SILI,5 00329000
  340. CCW TIC,*-8,0,0 00330000
  341. RDCCW1 CCW RDDATA,0,CC+SILI,800 00331000
  342. RDCCW2 CCW RDDATA,0,CC+SILI,800 00332000
  343. RDCCW3 CCW RDDATA,0,CC+SILI,800 00333000
  344. RDCCW4 CCW RDDATA,0,CC+SILI,800 00334000
  345. RDCCW5 CCW RDDATA,0,CC+SILI,800 00335000
  346. RDCCW6 CCW RDDATA,0,CC+SILI,800 00336000
  347. RDCCW7 CCW RDDATA,0,CC+SILI,800 00337000
  348. RDCCW8 CCW RDDATA,0,CC+SILI,800 00338000
  349. RDCCW9 CCW RDDATA,0,CC+SILI,800 00339000
  350. RDCCWA CCW RDDATA,0,CC+SILI,800 00340000
  351. RDCCWB CCW RDDATA,0,CC+SILI,800 00341000
  352. RDCCWC CCW RDDATA,0,CC+SILI,800 00342000
  353. RDCCWD CCW RDDATA,0,CC+SILI,800 00343000
  354. RDCCWE CCW RDDATA,0,CC+SILI,800 00344000
  355. RDCCWF CCW RDDATA,0,CC+SILI,800 @V304498 00345100
  356. RDCCW10 CCW RDDATA,0,CC+SILI,800 @V304498 00345200
  357. RDCCW11 CCW RDDATA,0,CC+SILI,800 @V304498 00345300
  358. RDCCW12 CCW RDDATA,0,CC+SILI,800 @V304498 00345400
  359. RDCCW13 CCW RDDATA,0,SILI,800 @V304498 00345500
  360. SPACE 00346000
  361. RDSEEKA DC H'0' 00347000
  362. RDCYLNO DC H'0' 00348000
  363. RDTRKNO DC H'0' 00349000
  364. RDRECNO DC X'01' 00350000
  365. RDSECNO DC X'02' 00351000
  366. SPACE 00352000
  367. LOWCORE DS 0D 00353000
  368. DC X'00040000',V(DMTEXT) 00354000
  369. DC X'00040000',V(DMTSVC) 00355000
  370. DC X'00020000',A(X'007') @VM01136 00356010
  371. DC X'00020000',A(OLDMACH-SVECTORS) 00357000
  372. DC X'00040000',V(DMTIOMIN) 00358000
  373. SPACE 00359000
  374. MAPEND DC V(DMTMAPME) ADDRESS OF END OF STORAGE MAP 00360000
  375. FIRSTSAV DC A(X'10000') FIRST TASK SAVE AREA IN PAGE 16 00361000
  376. FIRSTNAM DC C'INIT' DEFAULT NAME FOR FIRST TASK 00362000
  377. DISABLED DC X'00' 00363000
  378. ENABLED DC X'FF' 00364000
  379. EJECT 00365000
  380. RSCS2314 DC F'150' CMS RECORDS/CYL 00366000
  381. DC F'15' CMS RECORDS/X (TRACK OR PAIR) 00367000
  382. DC F'8' OVERFLOW RECORD NUMBER 00368000
  383. DC 20X'00' SECTOR MAP @V304498 00369100
  384. SPACE 00370000
  385. RSCS3330 DC F'266' CMS RECORDS/CYL 00371000
  386. DC F'14' CMS RECORDS/X (TRACK OR PAIR) 00372000
  387. DC F'0' OVERFLOW RECORD NUMBER 00373000
  388. DC X'00020B141D252E374049525B646D7500' SECTOR MAP 00374000
  389. DC 4X'00' EXTENSION OF SECTOR MAP @V304498 00374100
  390. SPACE 00375000
  391. RSCS3340 DC F'96' CMS RECORDS/CYL 00376000
  392. DC F'8' CMS RECORDS/X (TRACK OR PAIR) 00377000
  393. DC F'0' OVERFLOW RECORD NUMBER 00378000
  394. DC X'00020910171E252C3200000000000000' SECTOR MAP 00379000
  395. DC 4X'00' EXTENSION OF SECTOR MAP @V304498 00379100
  396. SPACE 1 00379200
  397. RSCS3350 DC F'570' CMS RECORDS/CYL @V304498 00379300
  398. DC F'19' CMS RECORDS/X (TRACK OR PAIR @V304498 00379400
  399. DC F'0' OVERFLOW RECORD NUMBER @V304498 00379500
  400. DC XL1'00' SECTOR MAP @V304498 00379600
  401. DC AL1(2,8,15,21,27,34,40,46,53,59,65,71,78,84,90) @V304498 00379700
  402. DC AL1(97,103,109,116) @V304498 00379800
  403. SPACE 1 00379900
  404. SPACE 3 00380000
  405. LTORG 00381000
  406. SPACE 00382000
  407. INIREND DS 0D 00383000
  408. EJECT 00384000
  409. DC 0D'0' 00385000
  410. ENTRY DMTINIW 00386000
  411. DMTINIW DC 0H'0' ENTERED HERE FROM NUCLEUS LOADER 00387000
  412. BALR R11,0 LOAD THE BASE REGISTER TEMPORARILY 00388000
  413. USING *,R11 00389000
  414. L R11,ADMTINI NOW PROVIDE FOR COMMON ADDRESSABILITY 00390000
  415. USING DMTINIR,R11 00391000
  416. SSM DISABLED RUN DISABLED FOR ALL I/O INTERRUPTS NOW 00392000
  417. LA R1,REPLY GET CURRENT DATE AND TIME FROM CP 00393000
  418. DC X'8312000C' ... 00394000
  419. L R13,=V(DMTREXVL) GET THE REX TITLE AREA ADDR 00395000
  420. MVC 16(8,R13),REPLY MOVE IN THE GEN DATE 00396000
  421. LH R13,CONSOLE LOAD THE STANDARD CONSOLE ADDRESS 00397000
  422. CHECKCON DC X'83DE0024' IS IT ATTACHED ? 00398000
  423. BC 1,INVALCON NO, WAIT FOR AN INTERRUPT 00399000
  424. CLM R14,12,CONSTYPE IS IT A CONSOLE ? 00400000
  425. BE ASKQUEST YES, START THE QUESTIONS 00401000
  426. MVC NEWIO,WAKEPSW SET I/O NEW PSW TO POINT BACK HERE 00402000
  427. INVALCON LPSW WAITPSW WAIT FOR THE USER TO CAUSE AN INTERRUPT 00403000
  428. WAKEHERE LH R13,OLDIO+2 GET THE INTERRUPTING DEVICE ADDRESS 00404000
  429. MVC NEWIO,NIOPSW RESTORE THE I/O NEW PSW 00405000
  430. B CHECKCON SEE WHAT THE INTERRUPTING DEVICE IS 00406000
  431. SPACE 00407000
  432. ASKQUEST EQU * 00408000
  433. LH R0,DASD SET DEFAULT DASD ADDR 00409000
  434. RDORWRT LA R1,Q2CCWS POINT TO THE CCW STRING FOR QUESTION 2 00410000
  435. BAL R14,DOCONSIO ASK THE QUESTION AND WAIT FOR A REPLY 00411000
  436. OI REPLY,X'40' MAKE SURE THE REPLY IS IN CAPITAL LETTERS 00412000
  437. CLI REPLY,C'N' IS THE REPLY 'NO' ? 00413000
  438. BE INIEXIT YES, CONTINUE WITH THE IPL SEQUENCE 00414000
  439. CLI REPLY,C'Y' IS THE REPLY 'YES' ? 00415000
  440. BE IPLDISK YES, ASK FOR THE IPL DEVICE ADDRESS 00416000
  441. LA R1,WRERR4 POINT TO CCW STRING FOR YES OR NO ERROR 00417000
  442. BAL R14,DOCONSIO TYPE THE ERROR MESSAGE TO THE USER 00418000
  443. B RDORWRT ASK THE QUESTION AGAIN 00419000
  444. SPACE 00420000
  445. IPLDISK LA R1,Q3CCWS POINT TO THE CCW STRING FOR QUESTION 3 00421000
  446. BAL R14,DOCONSIO ASK THE QUESTION AND WAIT FOR A REPLY 00422000
  447. CLI REPLY,X'00' DID THE USER JUST PRESS RETURN ? 00423000
  448. BE CHECKIPL YES, ASSUME THE DEFAULT IPL DEVICE 00424000
  449. BAL R14,HEXTOBIN NO,CONVERT ADDRESS TO BINARY 00425000
  450. BNZ IPLDISK ASK QUESTION AGAIN IF AN ERROR OCCURRED 00426000
  451. LR R0,R1 SAVE THE IPL DEVICE ADDRESS 00427000
  452. CHECKIPL DC X'83010024' IS THE DEVICE ATTACHED AND DASD ? 00428000
  453. BNZ BADIPLD ERROR IF NONEXISTENT UNIT 00429000
  454. STCM R1,12,DISKTYPE SAVE THE DEVICE TYPE AND CLASS 00430000
  455. CLI DISKTYPE,CLASDASD IS IT A DASD CLASS DEVICE ? 00431000
  456. BNE BADIPLD NO, SEND AN ERROR MESSAGE 00432000
  457. MVI MFDCCW1,RDDATA MOVE IN A READ OP-CODE. 00433000
  458. LA R1,MFDCCWS LOAD ADDRESS OF READ MFD CCW CHAIN 00434000
  459. DC X'83010020' READ IN THE MFD FROM THE IPL DEVICE 00435000
  460. BNZ BADIPLD SEND MESSAGE IF ANY ERRORS 00436000
  461. MVI MFDCCW1,WRDATA MOVE WRITE COMMAND CODE TO CCW 00437000
  462. DC X'83010020' WRITE THE MFD BACK OUT AGAIN 00438000
  463. BNZ BADIPLD SEND MESSAGE IF ANY ERRORS 00439000
  464. CLI DISKTYPE+1,TYP2314 IS THIS A 2314 OR 2319 ? 00440000
  465. BE DEV2314 BRANCH IF YES 00441000
  466. CLI DISKTYPE+1,TYP3330 IS THIS A 3330 ? 00442000
  467. BE DEV3330 BRANCH IF YES 00443000
  468. CLI DISKTYPE+1,TYP3350 IS THIS A 3350 ? @V304498 00443100
  469. BE DEV3350 BR...IF YES @V304498 00443200
  470. CLI DISKTYPE+1,TYP3340 IS IT A 3340? 00444000
  471. BE DEV3340 BR...IF YES 00445000
  472. BADIPLD LA R1,WRERR5 POINT TO CCW STRING FOR IPL DEVICE ERROR 00446000
  473. BAL R14,DOCONSIO TYPE THE ERROR MESSAGE TO THE USER 00447000
  474. B IPLDISK ASK THE QUESTION AGAIN 00448000
  475. SPACE 00449000
  476. DEV2314 MVI TRKINC+1,2 READ 2 TRACKS AT A TIME 00450000
  477. MVI TRKMAX+1,20 20 TRACKS PER CYLINDER 00451000
  478. LA R1,RDCCWS+8 SAVE SEEK CCW ADDRESS FOR READING 00452000
  479. ST R1,CCWBGNR ... 00453000
  480. LA R1,WRCCWS+8 SAVE SEEK CCW ADDRESS FOR WRITING 00454000
  481. ST R1,CCWBGNW ... 00455000
  482. LA R1,RDCCWF SAVE LAST READ CCW ADDRESS 00456000
  483. ST R1,CCWENDR ... 00457000
  484. LA R1,WRCCWF SAVE LAST WRITE CCW ADDRESS 00458000
  485. ST R1,CCWENDW ... 00459000
  486. MVC RDCCWS+8,RDCCWS OVERLAY SET SECTOR WITH SEEK CCW 00460000
  487. MVC WRCCWS+8,WRCCWS ... 00461000
  488. MVI RDCCWF+4,SILI TURN OFF 2314 CMD CHAINING READ @V304498 00461100
  489. MVI WRCCWF+4,SILI TURN OFF 2314 CMD CHAINING WRITE @V304498 00461200
  490. B NUCCYLN CONTINUE WITH QUESTIONING 00462000
  491. DEV3350 MVI TRKINC+1,1 READ 1 TRACK AT A TIME @V304498 00462100
  492. MVI TRKMAX+1,30 30 TRACKS PER CYLINDER @V304498 00462200
  493. LA R1,RDCCW13 SAVE LAST READ CCW ADDRESS @V304498 00462300
  494. ST R1,CCWENDR .... @V304498 00462400
  495. LA R1,WRCCW13 SAVE LAST WRITE CCW ADDRESS @V304498 00462500
  496. ST R1,CCWENDW .... @V304498 00462600
  497. B NUCCYLN CONTINUE WITH QUESTIONING @V304498 00462700
  498. SPACE 1 00462800
  499. SPACE 00463000
  500. DEV3330 MVI TRKINC+1,1 READ 1 TRACK AT A TIME 00464000
  501. MVI TRKMAX+1,19 19 TRACKS PER CYLINDER 00465000
  502. LA R1,RDCCWE SAVE LAST READ CCW ADDRESS 00466000
  503. ST R1,CCWENDR ... 00467000
  504. LA R1,WRCCWE SAVE LAST WRITE CCW ADDRESS 00468000
  505. ST R1,CCWENDW ... 00469000
  506. MVI RDCCWE+4,SILI TURN OFF COMMAND CHAINING 00470000
  507. MVI WRCCWE+4,SILI ... 00471000
  508. B NUCCYLN CONTINUE WITH QUESTIONING 00472000
  509. SPACE 00473000
  510. DEV3340 MVI TRKINC+1,1 READ 1 TRACK AT A TIME 00474000
  511. MVI TRKMAX+1,12 12 TRACKS PER CYLINDER 00475000
  512. LA R1,RDCCW8 SAVE LAST READ CCW ADDRESS 00476000
  513. ST R1,CCWENDR .... 00477000
  514. LA R1,WRCCW8 SAVE LAST WRITE CCW ADDRESS 00478000
  515. ST R1,CCWENDW .... 00479000
  516. MVI RDCCW8+4,SILI TURN OFF 00480000
  517. MVI WRCCW8+4,SILI COMMAND CHAINING 00481000
  518. SPACE 00482000
  519. NUCCYLN LA R1,Q4CCWS POINT TO THE CCW STRING FOR QUESTION 4 00483000
  520. BAL R14,DOCONSIO ASK THE QUESTION AND WAIT FOR A REPLY 00484000
  521. BAL R14,DECTOBIN CONVERT NUMBER TO BINARY 00485000
  522. BNZ NUCCYLN ASK QUESTION AGAIN IF AN ERROR OCCURED 00486000
  523. STH R1,RDCYLNO STORE THE CYLINDER ADDRESS OF THE NUCLEUS 00487000
  524. LA R9,MFDBUF OBTAIN POINTER FOR LIMIT TEST @V304498 00488100
  525. CH R1,382(R9) IS IT BEYOND THE ALLOCATED SPACE?@V304498 00488200
  526. BNL IPLZERO YES, ASK THE NEXT QUESTION 00489000
  527. LA R1,WRERR6 POINT TO CCW STRING FOR OVERLAY ERROR 00490000
  528. BAL R14,DOCONSIO TYPE THE ERROR MESSAGE TO THE USER 00491000
  529. B NUCCYLN ASK THE QUESTION AGAIN 00492000
  530. SPACE 00493000
  531. IPLZERO LA R1,Q5CCWS POINT TO THE CCW STRING FOR QUESTION 5 00494000
  532. BAL R14,DOCONSIO ASK THE QUESTION AND WAIT FOR A REPLY 00495000
  533. OI REPLY,X'40' MAKE SURE REPLY IS IN CAPITAL LETTERS 00496000
  534. MVI IPLSWTCH,C'Y' INDICATE IPL TEXT ALSO WRITTEN ON CYL 0 00497000
  535. CLI REPLY,C'Y' IS THE REPLY 'YES' ? 00498000
  536. BE VERSONID YES, CONTINUE WITH QUESTIONS 00499000
  537. MVI IPLSWTCH,C'N' INDICATE NO IPL TEXT ON CYLINDER 0 00500000
  538. CLI REPLY,C'N' IS THE REPLY 'NO' ? 00501000
  539. BE VERSONID YES, CONTINUE WITH QUESTIONS 00502000
  540. LA R1,WRERR4 POINT TO CCW STRING FOR YES OR NO ERROR 00503000
  541. BAL R14,DOCONSIO TYPE THE ERROR MESAGE TO THE USER 00504000
  542. B IPLZERO ASK THE QUESTION AGAIN 00505000
  543. SPACE 00506000
  544. VERSONID EQU * 00507000
  545. SPACE 00508000
  546. QUESTEND LA R1,IPLCCWS POINT TO IPL TEXT CCWS 00509000
  547. CLI IPLSWTCH,C'Y' IS IPL TEXT TO BE WRITTEN ON CYLINDER 0 00510000
  548. BNE NOTZERO NO,ONLY ON THE NUCLEUS CYLINDER 00511000
  549. DC X'83010020' WRITE OUT IPL TEXT AND DMTINIR 00512000
  550. BALR R15,0 SAVE ADDRESS AND CONDITION CODE 00513000
  551. BNZ WRERROR BRANCH IF ANY ERROR OCCURS 00514000
  552. NOTZERO LH R2,RDCYLNO LOAD THE CYLINDER NUMBER FOR THE NUCLEUS 00515000
  553. STH R2,WRCYLNO INITIALIZE THE SEEK AND SEARCH ADDRESSES 00516000
  554. STH R2,REC1 ... 00517000
  555. STH R2,REC2 ... 00518000
  556. DC X'83010020' WRITE OUT IPL TEXT AND DMTINIR 00519000
  557. BALR R15,0 SAVE ADDRESS AND CONDITION CODE 00520000
  558. BNZ WRERROR BRANCH IF ANY ERROR OCCURS 00521000
  559. L R1,CCWBGNW POINT TO CCWS TO WRITE OUT THE NUCLEUS 00522000
  560. SR R3,R3 ZERO THE TRACK NUMBER 00523000
  561. LA R4,800 LOAD THE RECORD LENGTH 00524000
  562. LM R5,R7,RANGE1 LOAD POINTER TO 1ST RANGE TO BE WRITTEN 00525000
  563. LA R8,24 LOAD THE CCW CHAIN INCREMENT 00526000
  564. L R9,CCWENDW LOAD A POINTER TO THE LAST WRITE CCW 00527000
  565. LA R10,WRCCW3 POINT TO THE CCW TO START WITH 00528000
  566. LA R12,REC3 POINT TO THE SEARCH ADDRESS TO START WITH 00529000
  567. B STOREDA CONTINUE BUILDING THE WRITE CCW CHAIN 00530000
  568. SPACE 00531000
  569. NXTRANGE LTR R7,R7 IS THIS THE LAST RANGE ? 00532000
  570. BZ SETLAST YES, WRITE OUT THE LAST TRACK WORTH 00533000
  571. LM R5,R7,0(R7) NO, LOAD THE POINTERS FOR THE NEXT RANGE 00534000
  572. B CHECKREC CONTINUE BUILDING THE WRITE CCW CHAIN 00535000
  573. SPACE 00536000
  574. SETLAST BCTR R7,0 MAKE POINTER TO NEXT RANGE NEGATIVE 00537000
  575. SR R10,R8 BACKUP TO THE PREVIOUS CCW PACKAGE 00538000
  576. CLI 0(R10),WRDATA IS THIS A WRITE DATA CCW ? 00539000
  577. BNE INIEXIT NO, NO MORE TO WRITE 00540000
  578. MVI 4(R10),SILI TURN OFF COMMAND CHAINING 00541000
  579. B DIAGWR WRITE OUT THE REMAINDER OF THE NUCLEUS 00542000
  580. SPACE 00543000
  581. NEXTTRK LA R3,1(,R3) ADD 1 TO THE TRACK NUMBER 00544000
  582. CH R3,TRKMAX IS THIS THE END OF THE CYLINDER 00545000
  583. BL STTRKNO NO, CONTINUE BUILDING CCWS 00546000
  584. SR R3,R3 YES, ZERO THE TRACK NUMBER AND 00547000
  585. LA R2,1(,R2) ADD ONE TO THE CYLINDER NUMBER 00548000
  586. STH R2,WRCYLNO UPDATE THE CURRENT SEEK ADDRESS 00549000
  587. STTRKNO STH R3,WRTRKNO ... 00550000
  588. LA R10,WRCCW1 POINT TO THE 1ST WRITE CCW 00551000
  589. LA R12,REC1 POINT TO THE 1ST SEARCH ADDRESS 00552000
  590. DATALOOP BXH R6,R4,NXTRANGE ADD 800 TO DATA ADDR & GO IF END OF RANGE 00553000
  591. CHECKREC CLI DISKTYPE+1,TYP2314 IS THIS A 2314 DISK ? 00554000
  592. BNE STOREDA NO, CONTINUE 00555000
  593. CLI 4(R12),X'09' YES, ARE WE AT RECORD 9 ? 00556000
  594. BNE STOREDA NO, CONTINUE 00557000
  595. LA R3,1(,R3) YES, ADD 1 TO THE TRACK NUMBER 00558000
  596. STOREDA ST R6,0(,R10) STORE THE DATA ADDRESS INTO THE CCW 00559000
  597. MVI 0(R10),WRDATA MOVE WRITE DATA COMMAND CODE TO THE CCW 00560000
  598. STH R2,0(,R12) STORE CYLINDER NUMBER IN SEARCH ADDRESS 00561000
  599. STH R3,2(,R12) STORE TRACK NUMBER IN SEARCH ADDRESS 00562000
  600. LA R12,6(,R12) POINT TO THE NEXT SEARCH ADDRESS 00563000
  601. BXLE R10,R8,DATALOOP POINT TO NEXT CCW AND LOOP IF MORE 00564000
  602. DIAGWR DC X'83010020' WRITE THE NUCLEUS ONTO THE DISK 00565000
  603. BALR R15,0 SAVE ADDRESS AND CONDITION CODE 00566000
  604. BNZ WRERROR BRANCH IF ANY ERROR OCCURS 00567000
  605. LTR R7,R7 IS THE NUCLEUS ALL ON DISK ? 00568000
  606. BNM NEXTTRK NO, WRITE OUT ANOTHER TRACK WORTH 00569000
  607. B INIEXIT CONTINUE WITH SYSTEM INITIALIZATION 00570000
  608. EJECT 00571000
  609. HEXTOBIN DS 0H HEX TO BINARY CONVERSION ROUTINE 00572000
  610. LA R1,REPLY-1 POINT TO START OF REPLY - 1 00573000
  611. L R2,ZEROES INITIALIZE VALUE TO ZERO 00574000
  612. OC REPLY(8),BLANKS MAKE SURE REPLY IS IN UPPER CASE 00575000
  613. HEXLOOP LA R1,1(,R1) POINT TO NEXT CHARACTER OF REPLY 00576000
  614. CLI 0(R1),C' ' IS IT THE END OF THE REPLY ? 00577000
  615. BE HEXPACK YES, CONTINUE CONVERSION 00578000
  616. SLL R2,8 MAKE ROOM FOR ANOTHER CHARACTER 00579000
  617. IC R2,0(,R1) SAVE THE NEXT CHARACTER 00580000
  618. CLI 0(R1),C'9' IS IT LESS THAN OR EQUAL TO 9 ? 00581000
  619. BH BINERR1 ERROR IF NO 00582000
  620. CLI 0(R1),C'0' IS IT LESS THAN 0 ? 00583000
  621. BNL HEXLOOP NO, LOOK AT THE NEXT CHARACTER 00584000
  622. CLI 0(R1),C'F' IS IT LESS THAN OR EQUAL TO F ? 00585000
  623. BH BINERR1 ERROR IF NO 00586000
  624. CLI 0(R1),C'A' IS IT GREATER THAN OR EQUAL TO A ? 00587000
  625. BL BINERR1 ERROR IF NO 00588000
  626. AL R2,=F'9' CONVERT NUMBER TO CORRECT RANGE 00589000
  627. B HEXLOOP LOOK AT THE NEXT CHARACTER 00590000
  628. SPACE 00591000
  629. HEXPACK C R2,ZEROES IS NUMBER STILL 0 ? 00592000
  630. BE BINERR1 YES, ASK HIM AGAIN 00593000
  631. ST R2,HEXWORD CONVERT THE NUMBER TO BINARY 00594000
  632. PACK HEXDBLW(4),HEXWORD ... 00595000
  633. L R1,HEXDBLW LOAD THE NUMBER 00596000
  634. SRL R1,4 AND REMOVE THE SIGN 00597000
  635. SR R2,R2 SET CONDITION CODE = 0 00598000
  636. BR R14 RETURN TO THE CALLER 00599000
  637. SPACE 00600000
  638. BINERR1 LA R1,WRERR2 POINT TO CCW STRING FOR ADDRESS ERROR 00601000
  639. HEXERR LR R2,R14 SAVE THE RETURN ADDRESS 00602000
  640. BAL R14,DOCONSIO START THE I/O AND WAIT 00603000
  641. LTR R14,R2 SET CONDITION CODE NOT = 0 00604000
  642. BR R14 AND RETURN TO THE CALLER 00605000
  643. EJECT 00606000
  644. DECTOBIN DS 0H HEX TO DECIMAL CONVERSION ROUTINE 00607000
  645. LA R1,REPLY POINT TO START OF THE REPLY 00608000
  646. L R2,ZEROES INITIALIZE VALUE TO ZERO 00609000
  647. DECLOOP CLI 0(R1),X'00' IS THIS THE END OF THE REPLY ? 00610000
  648. BE DECPACK YES, CONTINUE CONVERSION 00611000
  649. CLI 0(R1),C'0' IS IT EQUAL TO OR GREATER THAN 0 ? 00612000
  650. BL DECERR1 ERROR IF NO 00613000
  651. CLI 0(R1),C'9' IS IT LESS THAN OR EQUAL TO 9 ? 00614000
  652. BH DECERR1 ERROR IF NO 00615000
  653. SLL R2,8 MAKE ROOM FOR ANOTHER CHARACTER 00616000
  654. IC R2,0(,R1) SAVE THE CURRENT CHARACTER 00617000
  655. LA R1,1(,R1) POINT TO THE NEXT CHARACTER 00618000
  656. B DECLOOP LOOK AT THE NEXT CHARACTER 00619000
  657. SPACE 00620000
  658. DECPACK C R2,ZEROES IS NUMBER STILL 0 ? 00621000
  659. BE DECERR1 YES, ASK HIM AGAIN 00622000
  660. ST R2,HEXWORD CONVERT THE NUMBER TO BINARY 00623000
  661. PACK HEXDBLW,HEXWORD ... 00624000
  662. CVB R1,HEXDBLW ... 00625000
  663. SR R2,R2 SET CONDITION CODE = 0 00626000
  664. BR R14 RETURN TO THE CALLER 00627000
  665. SPACE 00628000
  666. DECERR1 LA R1,WRERR3 POINT TO CCWSTRING FOR NUMBER ERROR 00629000
  667. B HEXERR SEND THE ERROR MESSAGE AND CONTINUE 00630000
  668. EJECT 00631000
  669. DOCONSIO DS 0H CONSOLE I/O SUBROUTINE 00632000
  670. MVI REPLY,X'00' CLEAR THE REPLY BUFFER 00633000
  671. MVC REPLY+1(L'REPLY-1),REPLY 00634000
  672. ST R1,CAW STORE CCW ADDRESS IN CAW 00635000
  673. TIO 0(R13) CLEAR ANY PENDING INTERRUPTS 00636000
  674. BNZ *-4 ... 00637000
  675. SIO 0(R13) START THE I/O TO THE CONSOLE 00638000
  676. BNZ *-4 ... 00639000
  677. TIO 0(R13) WAIT FOR THE I/O TO COMPLETE 00640000
  678. BC 2,*-4 ... 00641000
  679. CLI CSW+4,CE+DE NORMAL STATUS RECEIVED ? 00642000
  680. BNE DOCONSIO NO, TRY THE I/O AGAIN 00643000
  681. BR R14 YES, RETURN TO THE CALLER 00644000
  682. SPACE 3 00645000
  683. WRERROR DS 0H ERROR WHILE WRITING THE NUCLEUS 00646000
  684. ST R1,0 SAVE THE INDICATORS OF THE ERROR 00647000
  685. ST R15,4 ... 00648000
  686. MVC IPLCCW1+4(4),CAW ... 00649000
  687. LA R1,WRERR1 POINT TO CCW STRINT FOR WRITE ERROR 00650000
  688. BAL R14,DOCONSIO PERFORM THE I/O AND WAIT 00651000
  689. B INIEXIT CONTINUE SYSTEM INITIALIZATION 00652000
  690. EJECT 00653000
  691. SPACE 00654000
  692. DS 0D 00655000
  693. REPLY DC CL128' ' 00656000
  694. SPACE 2 00657000
  695. DS 0D 00658000
  696. NIOPSW DC AL2(MCHEK,0),V(DMTIOMIN) 00659000
  697. WAITPSW DC AL1(CHAN0,MCHEK+WAIT,0,0),A(WAKEHERE) 00660000
  698. WAKEPSW DC AL1(0,MCHEK,0,0),A(WAKEHERE) 00661000
  699. SPACE 2 00662000
  700. CHAN0 EQU X'80' 00663000
  701. HEXDBLW DC D'0' 00664000
  702. HEXWORD DC F'0' 00665000
  703. ZEROES DC C'0000' 00666000
  704. BLANKS DC CL8' ' 00667000
  705. SPACE 2 00668000
  706. ADMTINI DC A(DMTINIR) 00669000
  707. CCWBGNW DC A(WRCCWS+0) 00670000
  708. CCWENDW DC A(WRCCWF) 00671000
  709. DISKTYPE DC H'0' 00672000
  710. CONSTYPE DC AL1(CLASTERM,TYP3210) 00673000
  711. IPLSWTCH DC C'N' 00674000
  712. SPACE 00675000
  713. DS 0H 00676000
  714. CONSOLE DC X'0009' DEFAULT CONSOLE ADDR 00677000
  715. DASD DC X'0191' DEFAULT DASD ADDR 00678000
  716. EJECT 00679000
  717. DS 0D 00680000
  718. Q2CCWS CCW WRITE,Q2,CC+SILI,L'Q2 00681000
  719. CCW TIC,QREAD,0,0 00682000
  720. SPACE 00683000
  721. Q3CCWS CCW WRITE,Q3,CC+SILI,L'Q3 00684000
  722. CCW TIC,QREAD,0,0 00685000
  723. SPACE 00686000
  724. Q4CCWS CCW WRITE,Q4,CC+SILI,L'Q4 00687000
  725. CCW TIC,QREAD,0,0 00688000
  726. SPACE 00689000
  727. Q5CCWS CCW WRITE,Q5,CC+SILI,L'Q5 00690000
  728. CCW TIC,QREAD,0,0 00691000
  729. SPACE 00692000
  730. QREAD CCW RDCONS,REPLY,CC+SILI,128 00693000
  731. CCW NOP,0,SILI,1 00694000
  732. SPACE 00695000
  733. WRERR1 CCW WRITE1,WRMSG1,CC+SILI,L'WRMSG1 00696000
  734. CCW NOP,0,SILI,1 00697000
  735. SPACE 00698000
  736. WRERR2 CCW WRITE1,WRMSG2,CC+SILI,L'WRMSG2 00699000
  737. CCW NOP,0,SILI,1 00700000
  738. SPACE 00701000
  739. WRERR3 CCW WRITE1,WRMSG3,CC+SILI,L'WRMSG3 00702000
  740. CCW NOP,0,SILI,1 00703000
  741. SPACE 00704000
  742. WRERR4 CCW WRITE1,WRMSG4,CC+SILI,L'WRMSG4 00705000
  743. CCW NOP,0,SILI,1 00706000
  744. SPACE 00707000
  745. WRERR5 CCW WRITE1,WRMSG5,CC+SILI,L'WRMSG5 00708000
  746. CCW NOP,0,SILI,1 00709000
  747. SPACE 00710000
  748. WRERR6 CCW WRITE1,WRMSG6,CC+SILI,L'WRMSG6 00711000
  749. CCW NOP,0,SILI,1 00712000
  750. EJECT 00713000
  751. Q2 DC C'DMTINI407R REWRITE THE NUCLEUS ? ' Y OR N @VM01137 00714010
  752. Q3 DC C'DMTINI408R IPL DEVICE ADDRESS = ' CCU @VM01137 00715010
  753. Q4 DC C'DMTINI409R NUCLEUS CYL ADDRESS = ' NNN @VM01137 00716010
  754. Q5 DC C'DMTINI410R ALSO IPL CYLINDER 0 ? ' Y OR N @VM01137 00717010
  755. SPACE 00718000
  756. WRMSG1 DC C'DMTINI431S IPL DEVICE WRITE I/O ERROR' @VM01137 00719500
  757. WRMSG2 DC C'DMTINI479E INVALID DEVICE ADDRESS - REENTER' @VM01137 00720000
  758. WRMSG3 DC C'DMTINI480E INVALID CYLINDER NUMBER - REENTER' @VM01137 00720500
  759. WRMSG4 DC C'DMTINI481E INVALID REPLY - ANSWER "YES" OR ' @VM01137 00721000
  760. DC C'"NO"' @VM01137 00721500
  761. WRMSG5 DC C'DMTINI482E IPL DEVICE ERROR - REENTER' @VM01137 00722000
  762. WRMSG6 DC C'DMTINI483E NUCLEUS WILL OVERLAY CMS FILES -' @VM01137 00722500
  763. DC C' RECOMPUTE' @VM01137 00723000
  764. SPACE 3 00725000
  765. MFDCCWS DS 0D 00726000
  766. CCW SEEK,ZERO,CC+SILI,6 00727000
  767. CCW SEARCH,REC4,CC+SILI,5 00728000
  768. CCW TIC,*-8,0,0 00729000
  769. MFDCCW1 CCW RDDATA,MFDBUF,SILI,800 00730000
  770. SPACE 3 00731000
  771. IPLCCWS DS 0D 00732000
  772. CCW SEEK,WRSEEKA,CC+SILI,6 00733000
  773. CCW SEARCH,REC1,CC+SILI,5 00734000
  774. CCW TIC,*-8,0,0 00735000
  775. CCW WRDATA,IPLTEXT,CC+SILI,24 00736000
  776. CCW SEARCH,REC2,CC+SILI,5 00737000
  777. CCW TIC,*+8,0,0 00738000
  778. CCW WRDATA,DMTINIR,SILI,800 00739000
  779. SPACE 2 00740000
  780. IPLTEXT DS 0D 00741000
  781. DC AL2(MCHEK,0),A(DMTINIR) 00742000
  782. CCW RDDATA,DMTINIR,CC+SILI,800 00743000
  783. CCW NOP,0,SILI,1 00744000
  784. EJECT 00745000
  785. WRCCWS DS 0D 00746000
  786. CCW SEEK,WRSEEKA,CC+SILI,6 00747000
  787. CCW SETSEC,WRSECNO,CC+SILI,1 00748000
  788. CCW SEARCH,REC1,CC+SILI,5 00749000
  789. CCW TIC,*-8,0,0 00750000
  790. WRCCW1 CCW NOP,0,CC+SILI,800 00751000
  791. CCW SEARCH,REC2,CC+SILI,5 00752000
  792. CCW TIC,*-8,0,0 00753000
  793. WRCCW2 CCW NOP,0,CC+SILI,800 00754000
  794. CCW SEARCH,REC3,CC+SILI,5 00755000
  795. CCW TIC,*-8,0,0 00756000
  796. WRCCW3 CCW WRDATA,0,CC+SILI,800 00757000
  797. CCW SEARCH,REC4,CC+SILI,5 00758000
  798. CCW TIC,*-8,0,0 00759000
  799. WRCCW4 CCW WRDATA,0,CC+SILI,800 00760000
  800. CCW SEARCH,REC5,CC+SILI,5 00761000
  801. CCW TIC,*-8,0,0 00762000
  802. WRCCW5 CCW WRDATA,0,CC+SILI,800 00763000
  803. CCW SEARCH,REC6,CC+SILI,5 00764000
  804. CCW TIC,*-8,0,0 00765000
  805. WRCCW6 CCW WRDATA,0,CC+SILI,800 00766000
  806. CCW SEARCH,REC7,CC+SILI,5 00767000
  807. CCW TIC,*-8,0,0 00768000
  808. WRCCW7 CCW WRDATA,0,CC+SILI,800 00769000
  809. CCW SEARCH,REC8,CC+SILI,5 00770000
  810. CCW TIC,*-8,0,0 00771000
  811. WRCCW8 CCW WRDATA,0,CC+SILI,800 00772000
  812. CCW SEARCH,REC9,CC+SILI,5 00773000
  813. CCW TIC,*-8,0,0 00774000
  814. WRCCW9 CCW WRDATA,0,CC+SILI,800 00775000
  815. CCW SEARCH,RECA,CC+SILI,5 00776000
  816. CCW TIC,*-8,0,0 00777000
  817. WRCCWA CCW WRDATA,0,CC+SILI,800 00778000
  818. CCW SEARCH,RECB,CC+SILI,5 00779000
  819. CCW TIC,*-8,0,0 00780000
  820. WRCCWB CCW WRDATA,0,CC+SILI,800 00781000
  821. CCW SEARCH,RECC,CC+SILI,5 00782000
  822. CCW TIC,*-8,0,0 00783000
  823. WRCCWC CCW WRDATA,0,CC+SILI,800 00784000
  824. CCW SEARCH,RECD,CC+SILI,5 00785000
  825. CCW TIC,*-8,0,0 00786000
  826. WRCCWD CCW WRDATA,0,CC+SILI,800 00787000
  827. CCW SEARCH,RECE,CC+SILI,5 00788000
  828. CCW TIC,*-8,0,0 00789000
  829. WRCCWE CCW WRDATA,0,CC+SILI,800 00790000
  830. CCW SEARCH,RECF,CC+SILI,5 00791000
  831. CCW TIC,*-8,0,0 00792000
  832. WRCCWF CCW WRDATA,0,CC+SILI,800 @V304498 00793100
  833. CCW SEARCH,REC10,CC+SILI,5 @V304498 00793125
  834. CCW TIC,*-8,0,0 @V304498 00793150
  835. WRCCW10 CCW WRDATA,0,CC+SILI,800 @V304498 00793175
  836. CCW SEARCH,REC11,CC+SILI,5 @V304498 00793200
  837. CCW TIC,*-8,0,0 @V304498 00793225
  838. WRCCW11 CCW WRDATA,0,CC+SILI,800 @V304498 00793250
  839. CCW SEARCH,REC12,CC+SILI,5 @V304498 00793275
  840. CCW TIC,*-8,0,0 @V304498 00793300
  841. WRCCW12 CCW WRDATA,0,CC+SILI,800 @V304498 00793325
  842. CCW SEARCH,REC13,CC+SILI,5 @V304498 00793350
  843. CCW TIC,*-8,0,0 @V304498 00793375
  844. WRCCW13 CCW WRDATA,0,SILI,800 @V304498 00793400
  845. EJECT 00794000
  846. WRSEEKA DC H'0' 00795000
  847. WRCYLNO DC H'0' 00796000
  848. WRTRKNO DC H'0' 00797000
  849. WRRECNO DC X'01' 00798000
  850. WRSECNO DC X'02' 00799000
  851. SPACE 3 00800000
  852. DS 0D 00801000
  853. ZERO DC 8X'00' 00802000
  854. REC1 DC 4X'00',X'01',X'00' 00803000
  855. REC2 DC 4X'00',X'02',X'00' 00804000
  856. REC3 DC 4X'00',X'03',X'00' 00805000
  857. REC4 DC 4X'00',X'04',X'00' 00806000
  858. REC5 DC 4X'00',X'05',X'00' 00807000
  859. REC6 DC 4X'00',X'06',X'00' 00808000
  860. REC7 DC 4X'00',X'07',X'00' 00809000
  861. REC8 DC 4X'00',X'08',X'00' 00810000
  862. REC9 DC 4X'00',X'09',X'00' 00811000
  863. RECA DC 4X'00',X'0A',X'00' 00812000
  864. RECB DC 4X'00',X'0B',X'00' 00813000
  865. RECC DC 4X'00',X'0C',X'00' 00814000
  866. RECD DC 4X'00',X'0D',X'00' 00815000
  867. RECE DC 4X'00',X'0E',X'00' 00816000
  868. RECF DC 4X'00',X'0F',X'00' 00817000
  869. REC10 DC 4X'00',X'10',X'00' @V304498 00817100
  870. REC11 DC 4X'00',X'11',X'00' @V304498 00817200
  871. REC12 DC 4X'00',X'12',X'00' @V304498 00817300
  872. REC13 DC 4X'00',X'13',X'00' @V304498 00817400
  873. SPACE 3 00818000
  874. LTORG 00819000
  875. SPACE 3 00820000
  876. DS 0D 00821000
  877. MFDBUF DS 800X 00822000
  878. EJECT 00823000
  879. SPACE 00824000
  880. WRITE EQU X'01' WRITE 00825000
  881. READ EQU X'02' READ 00826000
  882. NOP EQU X'03' NO OPERATION 00827000
  883. SENSE EQU X'04' SENSE 00828000
  884. WRDATA EQU X'05' WRITE DATA 00829000
  885. RDDATA EQU X'06' READ DATA 00830000
  886. SEEK EQU X'07' SEEK 00831000
  887. TIC EQU X'08' TRANSFER IN CHANNEL 00832000
  888. WRITE1 EQU X'09' WRITE AND SPACE 1 00833000
  889. RDCONS EQU X'0A' READ FROM CONSOLE 00834000
  890. SETSEC EQU X'23' SET SECTOR 00835000
  891. SEARCH EQU X'31' SEARCH ID EQUAL 00836000
  892. EJECT 00837000
  893. COPY RSSEQU 00838000
  894. * 00838100
  895. C0 EQU 0 CONTROL REGISTER ZERO 00838200
  896. EJECT 00839000
  897. COPY DEVTYPES 00840000
  898. EJECT 00841000
  899. COPY SVECTORS 00842000
  900. EJECT 00843000
  901. COPY IOTABLE 00844000
  902. EJECT 00845000
  903. COPY TASKE 00846000
  904. COPY FREEE 00847000
  905. END DMTINIW 00848000