Table of Contents

DMKCFH Source

References

Source Listing

DMKCFH.ASSEMBLE.txt
  1. CFH TITLE 'DMKCFH (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF INPUT 00002000
  3. *. 00003000
  4. * MODULE NAME - 00004000
  5. * 00005000
  6. * DMKCFHSV 00006000
  7. * 00007000
  8. * FUNCTION - 00008000
  9. * 00009000
  10. * TO SAVE A PAGE FORM VERSION OF A SYSTEM'S VIRTUAL STORAGE SPAC 00010000
  11. * INCLUDING REGISTERS AND PSW AS THEY CURRENTLY EXIST. THE NAME 00011000
  12. * OF THE SYSTEM AND THE DASD LOCATION AT WHICH IT IS TO BE SAVED 00012000
  13. * IS DEFINED IN THE CP MODULE DMKSNT. 00013000
  14. * 00014000
  15. * ATTRIBUTES - 00015000
  16. * 00016000
  17. * REENTRANT, PAGEABLE, CALLED VIA SVC 00017000
  18. * 00018000
  19. * COMMAND LINE FORMAT - 00019000
  20. * 00020000
  21. * +---------+-------------+ 00021000
  22. * | | | 00022000
  23. * | SAVESYS | SYSTEM-NAME | 00023000
  24. * | | | 00024000
  25. * +---------+-------------+ 00025000
  26. * 00026000
  27. * ENTRY CONDITIONS - 00027000
  28. * 00028000
  29. * GPR9 = ADDRESS OF COMMAND LINE BUFFER 00029000
  30. * GPR11 = ADDRESS OF CALLER'S VMBLOK 00030000
  31. * GPR12 = ADDRESS OF ENTRY POINT 00031000
  32. * GPR13 = ADDRESS OF SAVEAREA 00032000
  33. * 00033000
  34. * EXIT CONDITIONS 00034000
  35. * 00035000
  36. * NORMAL - 00036000
  37. * GPR2 = 0 00037000
  38. * 00038000
  39. * ERROR - 00039000
  40. * GPR2 = ERROR MESSAGE CODE NUMBER 00040000
  41. * 00041000
  42. * CALLS TO OTHER ROUTINES - 00042000
  43. * 00043000
  44. * DMKCVTBH - TO CONVERT BINARY TO HEX 00044000
  45. * DMKERMSG - TO SEND ERROR MESSAGES TO TERMINAL 00045000
  46. * DMKFREE - TO OBATIN BUFFER SPACE FOR STORAGE KEYS 00046000
  47. * DMKFRET - TO RETURN FREE STORAGE USED FOR BUFFER SPACE 00047000
  48. * DMKPTRAN - LOCATE AND FETCH A PAGE OF VIRTUAL STORAGE 00048000
  49. * DMKPTRLK - TO LOCK A PAGE IN CORE 00049000
  50. * DMKPTRUL - TO UNLOCK A PAGE 00050000
  51. * DMKQCNRD - TO READ RESPONSE FROM A CONSOLE 00051000
  52. * DMKQCNWT - TO WRITE A MESSAGE TO CONSOLE 00052000
  53. * DMKRPAGT - TO GET A PAGE FROM BACKING DEVICE 00053000
  54. * DMKRPAPT - TO WRITE A PAGE TO BACKING DEVICE 00054000
  55. * DMKSCNFD - LOCATE THE NEXT ARGUMENT ON THE COMMAND LINE 00055000
  56. * DMKSCNVS - TO FIND A VOLUME 00056000
  57. * DMKSCNVU - TO FIND A VIRTUAL UNIT 00057000
  58. * 00058000
  59. * EXTERNAL REFERENCES - 00059000
  60. * 00060000
  61. * DMKVMAS1 - ANCHOR FOR SHARED SYSTEMS (SHRTABLE POINTER) 00061000
  62. * 00062000
  63. * TABLES / WORKAREAS - 00063000
  64. * 00064000
  65. * DMKSNTBL - SYSTEM NAME TABLE 00065000
  66. * 00066000
  67. * MACROS - 00067000
  68. * 00068000
  69. * CALL - TO TRANSFER CONTROL TO OTHER SYSTEM ROUTINES 00069000
  70. * ENTRY - TO ESTABLISH ENTRY CONVENTIONS AND ADDRESSIBILITY 00070000
  71. * EXIT - TO RETURN CONTROL TO CALLING ROUTINE 00071000
  72. * MSG - TO SEND MESSAGES TO THE CALLERS CONSOLE 00072000
  73. * TRANS - TO BRING PAGEABLE PAGES BACK INTO MAIN STORAGE 00073000
  74. * 00074000
  75. * REGISTER USAGE - 00075000
  76. * 00076000
  77. * GPR0 = LENGTH OF ARGUMENT (RETURNED BY DMKSCNFD) 00077000
  78. * GPR1 = ADDRESS OF ARGUMENT (RETURNED BY DMKSCNFD) 00078000
  79. * GPR2 = PARMS PASSED TO CALLED ROUTINES 00079000
  80. * GPR3 = LENGTH FOR EXECUTED MOVES AND COMPARES 00080000
  81. * GPR4 = INTERNAL LINKAGE (2ND LEVEL) 00081000
  82. * GPR5 = INTERNAL LINKAGE (2ND LEVEL) 00082000
  83. * GPR6-8 NOT USED 00083000
  84. * GPR9 = ADDRESS OF COMMAND LINE BUFFER 00084000
  85. * GPR10 = IOBLOK BASE 00085000
  86. * GPR11 = VMBLOK BASE 00086000
  87. * GPR12 = MODULE BASE 00087000
  88. * GPR13 = SAVEAREA BASE 00088000
  89. * GPR14 = EXTERNAL LINKAGE 00089000
  90. * GPR15 = EXTERNAL LINKAGE 00090000
  91. * 00091000
  92. * OPERATION - 00092000
  93. * 00093000
  94. * 1. CALL DMKSCNFD TO GET THE SYSTEM-NAME ARGUMENT. IF 00094000
  95. * NONE IS FOUND, CALL DMKERMSG TO SEND ERROR MESSAGE 00095000
  96. * DMKCFH026E. 00096000
  97. * 2. TRANS IN AND LOCK THE SYSTBL. THEN SCAN THE SYSTBL TO 00097000
  98. * FIND THE ENTRY FOR THE SPECIFIED NAME. IF NONE IS FOUND, 00098000
  99. * CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFH044E. 00099000
  100. * 3. IF THE VIRTUALSTORAGE IS NOT LARGE ENOUGH TO CONTAIN 00100000
  101. * THE NAMED SYSTEM, CALL DMKERMSG TO SEND ERROR MESSAGE 00101000
  102. * DMKCFH170E. 00102000
  103. * 4. CALL DMKSCNVS TO FIND THE VOLUME CONTAINING THE VIRTUAL 00103000
  104. * SYSRES. IF NOT FOUND, CALL DMKERMSG TO SEND ERROR MESSAGE 00104000
  105. * DMKCFH171E. 00105000
  106. * 5. CALL DMKSCNVU TO GET THE VIRTUAL DEVICE BLOKS FOR THE 00106000
  107. * VIRTUAL SYSRES. IF NOT FOUND, CALL DMKERMSG TO SEND ERROR 00107000
  108. * MESSAGE DMKCFH173E. IF HAVE THE DEVICE BLOKS, BUT THE 00108000
  109. * MINI DISK IS NOT AT THE CYLINDER SPECIFIED IN THE SYSTBL, 00109000
  110. * CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFH172E. 00110000
  111. * 6. CALL DMKSCNVS TO FIND THE VOLUME THAT IS TO CONTAIN THE 00111000
  112. * SAVED SYSTEM. IF NOT FOUND, CALL DMKERMSG TO SEND ERROR 00112000
  113. * MESSAGE DMKCFH171E. IF THIS VOLUME IS NOT A CP OWNED 00113000
  114. * VOLUME, CALL DMKERMSG TO SEND ERROR MESSAGE 00114000
  115. * DMKCFH179E. IF ALL OK, CHECK FOR ANY 00115000
  116. * PENDING INTERRUPTS IN THE VIRTUAL MACHINE. IF NONE ARE 00116000
  117. * FOUND, GO TO STEP 9. 00117000
  118. * 7. CALL DMKQCNWT TO SEND THE INTERRUPT PENDING MESSAGE. 00118000
  119. * THEN CALL DMKQCNRD TO READ THE REPLY. 00119000
  120. * 8. IF THE REPLY WAS YES, CONTINUE - ELSE GO TO STEP 13. 00120000
  121. * 9. SET UP THE NEXT GROUP OF PAGES (SPECIFIED IN THE SYSTBL) 00121000
  122. * TO BE SAVED. CALL DMKFREE TO OBTAIN FREE STORAGE 00122000
  123. * FOR A STORAGE KEY BUFFER. 00123000
  124. * 10.TRANS IN THE NEXT PAGE TO BE SAVED. CALL DMKRPAPT TO 00124000
  125. * WRITE THE PAGE TO THE SYSVOL. SAVE THE STORAGE KEYS FOR 00125000
  126. * THIS PAGE. 00126000
  127. * 11.IF ALL THE PAGES IN THIS GROUP HAVE BEEN PROCESSED, GO TO 00127000
  128. * STEP 12. ELSE - BUMP TO THE NEXT PAGE AND GO BACK TO 00128000
  129. * STEP 10. 00129000
  130. * 12.IF THERE ARE MORE PAGE GROUPS TO PROCESS, GO BACK TO 00130000
  131. * STEP 9. IF NOT, TRANS IN USER PAGE ZERO. STORE THE VIRTUAL 00131000
  132. * PSW,REGISTERS, AND KEYS IN THIS PAGE. THEN CALL DMKRPAPT 00132000
  133. * TO WRITE THIS PAGE OUT TO THE SYSVOL. 00133000
  134. * 13.CALL DMKPTRUL TO UNLOCK THE SYSTBL. IF THE SAVE WAS NOT 00134000
  135. * COMPLETED DUE TO AN ERROR - EXIT. IF IT WAS A GOOD 00135000
  136. * SAVE, CALL DMKQCNWT TO SEND THE 'SYSTEM SAVED' MESSAGE 00136000
  137. * AND EXIT. 00137000
  138. * 00138000
  139. * RESPONSES - 00139000
  140. * SYSTEM SAVED 00140000
  141. * 00141000
  142. * ERROR MESSAGES - 00142000
  143. * DMKCFH026E OPERAND MISSING OR INVALID 00143000
  144. * DMKCFH044E SYSTEM (NAME) DOES NOT EXIST 00144000
  145. * DMKCFH170E SYSTEM (NAME) EXCEEDS STORAGE 00145000
  146. * DMKCFH171E SYSTEM (NAME) VOLID (VOLID) NOT MOUNTED 00146000
  147. * DMKCFH172E SYSTEM (NAME) DASD (VADDR) INCOMPATIBLE SYSRES 00147000
  148. * DMKCFH173E SYSTEM (NAME) REQUIRES DASD (VADDR) 00148000
  149. * DMKCFH179E SYSTEM (NAME) VOLID (VOLID) NOT CP-OWNED 00149000
  150. * DMKCFH300E SAVE REQUEST BEYOND VIRTUAL MACHINE SIZE 00150000
  151. * DMKCFH435E PAGING ERROR WRITING SAVED SYSTEM 00151000
  152. * 00152000
  153. *. 00153000
  154. EJECT 00154000
  155. COPY OPTIONS 00155000
  156. COPY LOCAL 00156000
  157. DMKCFH CSECT 00157000
  158. MODID DC CL8'DMKCFH' MODULE NAME @VM03098 00158000
  159. SPACE 3 00159000
  160. USING PSA,R0 00160000
  161. USING VMBLOK,R11 00161000
  162. USING SAVEAREA,R13 00162000
  163. SPACE 2 00163000
  164. EXTRN DMKSCNFD 00164000
  165. EXTRN DMKPTRUL 00165000
  166. EXTRN DMKCVTBH 00166000
  167. EXTRN DMKSNTBL 00167000
  168. EXTRN DMKSCNVS 00168000
  169. EXTRN DMKSCNVU 00169000
  170. EXTRN DMKQCNRD,DMKQCNWT 00170000
  171. EXTRN DMKRPAPT 00171000
  172. EXTRN DMKRPAGT 00172000
  173. EXTRN DMKERMSG 00173000
  174. EXTRN DMKVMAS1 00174000
  175. EJECT 00175000
  176. SPACE 00176000
  177. DMKCFHSV RELOC 00177000
  178. XC SAVEWRK1,SAVEWRK1 CLEAR FLAG BYTES @V304635 00178000
  179. XC SAVEWRK2(SAVEWRK9-SAVEWRK2+4),SAVEWRK2 CLEAR @VM03100 00179000
  180. * SAVEWRK2-9 00180000
  181. MVC SAVEWRK2(L'SAVEWRK2+L'SAVEWRK3),BLANKS BLANKS @VM03100 00181000
  182. * TO SAVEWRK2/3 00182000
  183. CALL DMKSCNFD LOCATE SYSTEM NAME 00183000
  184. BNZ CFH026 MISSING ARGUMENT 00184000
  185. LR R3,R0 LENGTH OF NAME TO R3 00185000
  186. CL R3,F8 MORE THAN EIGHT CHARACTERS 00186000
  187. BH CFH026 INVALID ARGUMENT 00187000
  188. BCTR R3,0 MINUS ONE 00188000
  189. EX R3,SAVENAME SAVE NAME IN SAVEWRK2/3 00189000
  190. TM VMRSTAT,VMLOGOFF OTHER ACTIVITY STARTED? @V408246 00190000
  191. BO CFHEXIT YES, GET OUT AS FAST AS POSSIBLE @V408246 00191000
  192. BAL R5,GETSNTBL GET SYSNAME TABLE @V304635 00192000
  193. SPACE 00193000
  194. USING SYSTBL,R4 00194000
  195. SPACE 00195000
  196. NAMECHEK CLC SAVEWRK2(L'SYSNAME),SYSNAME IS THIS CORRECT @VM03100 00196000
  197. * ENTRY ? 00197000
  198. BE SIZECHK BRANCH IF YES 00198000
  199. L R3,SYSPNT LOAD DISPLACEMENT TO NEXT ENTRY 00199000
  200. AR R4,R3 ADDRESS OF NEXT ENTRY TO R4 00200000
  201. LTR R3,R3 LAST ENTRY ??? 00201000
  202. BNZ NAMECHEK BRANCH IF NOT 00202000
  203. B CFH044 INVALID NAME 00203000
  204. SPACE 00204000
  205. SIZECHK L R0,VMSTOR GET VIRTUAL STORAGE SIZE @V304635 00205000
  206. CL R0,SYSSIZE WILL THE SYSTEM FIT IN THIS MACHINE 00206000
  207. BL CFH170 NOPE !!!! 00207000
  208. SPACE 00208000
  209. LH R1,SYSVADDR GET VIRTUAL ADDRESS @V304635 00209000
  210. LTR R1,R1 IS NAMESYS FLAGGED 'IGNORE' @V304635 00210000
  211. BM NOVOLCHK IF YES - SKIP FOR MOUNT CHECK. @V304635 00211000
  212. LA R1,VSYSRES ADDRESS OF VOL. SER. FOR VIRT. @V304635 00212000
  213. * SYSRES. 00213000
  214. LA R0,L'VSYSRES LENGTH OF 6 BYTES @VM03100 00214000
  215. CALL DMKSCNVS SEARCH FOR THIS VOLUME 00215000
  216. BNZ NOSYSRES BRANCH IF NOT FOUND 00216000
  217. SPACE 00217000
  218. LR R5,R1 RDEVBLOK ADDRESS TO R5 00218000
  219. LH R1,SYSVADDR LOAD VIRTUAL ADDRESS FROM SYSTABLE 00219000
  220. CALL DMKSCNVU SEE IF THERE 00220000
  221. BNZ BLD173 NOT PROPER ADR. 00221000
  222. USING VDEVBLOK,R8 00222000
  223. SPACE 00223000
  224. CL R5,VDEVREAL PROPER LINK-UP ??? 00224000
  225. BNE BLD172 NO - NO 00225000
  226. SPACE 00226000
  227. CLC VDEVRELN(L'SYSCYL),SYSCYL PROPER CYLINDER ON @VM03100 00227000
  228. * DISK ?? 00228000
  229. BNE BLD172 NOT PROPER CYLINDER 00229000
  230. SPACE 00230000
  231. NOVOLCHK LA R0,L'SYSVOL VOLUME SERIAL LENGTH @VM03100 00231000
  232. LA R1,SYSVOL NOW LET US SEE IF RIGHT SYSVOL SPECIFIED 00232000
  233. CALL DMKSCNVS ... 00233000
  234. BNZ NOSYSVOL CAN'T SAVE A SYSTEM WITHOUT A DISK 00234000
  235. SPACE 00235000
  236. LR R10,R1 RDEVBLOK TO R10 00236000
  237. USING RDEVBLOK,R10 00237000
  238. TM RDEVFLAG,RDEVOWN OWNED VOLUME ???? 00238000
  239. BZ NOSYSOWN ALMOST MADE IT -- NOT CP OWNED @V200820 00239000
  240. LA R0,PAGE2314 MAXIMUM PAGES/CYL ON 2314 @VM03100 00240000
  241. TM RDEVTYPE,TYP2314 IS THIS A 2314 ???? 00241000
  242. BO STOMAXPG YES ----- 00242000
  243. LA R0,PAGE3330 MAXIMUM PAGES/CYL ON 3330 @VM03100 00243000
  244. TM RDEVTYPE,TYP3330 IS IT ???? 00244000
  245. BO STOMAXPG YES ---- 00245000
  246. LA R0,PAGE3350 MAXIMUM PAGES/CYL ON 3350 @VM03100 00246000
  247. CLI RDEVTYPE,TYP3350 IS IT ???? @V304498 00247000
  248. BE STOMAXPG YES ----- @V304498 00248000
  249. LA R0,PAGE3375 Maximum pages/cyl on 3375 HRC106DK 00248100
  250. TM RDEVTYPE,TYP3375 Is it ???? HRC106DK 00248200
  251. BO STOMAXPG Yes ----- HRC106DK 00248300
  252. LA R0,PAGE3380 Maximum pages/cyl on 3380 HRC106DK 00248400
  253. TM RDEVTYPE,TYP3380 Is it ???? HRC106DK 00248500
  254. BO STOMAXPG Yes ----- HRC106DK 00248600
  255. LA R0,PAGE2305 MAXIMUM PAGES/CYL ON 3340/2305 @VM03100 00249000
  256. TM RDEVTYPE,TYP2305+TYP3340 2305 OR 3340 ? @V2A2029 00250000
  257. BNZ STOMAXPG YES - @V2A2029 00251000
  258. LA R2,EMSG006 LOAD ERROR CODE FOR WRONG @VM03100 00252000
  259. * DEVICE TYPE 00253000
  260. B NOVAR GO SEND ERROR MESSAGE 00254000
  261. SPACE 00255000
  262. STOMAXPG SLL R0,8 SHIFT UP EIGHT 00256000
  263. ST R0,SAVEWRK7 SAVE FOR LATER USE 00257000
  264. SPACE 00258000
  265. ****************************************************************** 00259000
  266. * NOW CHEK FOR PENDING INTERUPTS - IF ANY FOUND - GIVE 00260000
  267. * REQUESTOR A CHANCE TO BACK OUT... 00261000
  268. ****************************************************************** 00262000
  269. TM VMPEND,X'FF'-EXTMASK CHECK ALL BUT EXTERNAL @VM03100 00263000
  270. BZ DOSAVE BRANCH IF NONE FOUND 00264000
  271. SPACE 00265000
  272. INTPEND MSG 'DMKCFH436E INTERRUPT PENDING. TO PROCEED TYPE YES, TO EX00266000
  273. ND TYPE NO.' @VM08919 00267000
  274. L R2,=A(NOTRESP) SIGNAL NOT A COMMAND RESPONSE @V60C2B8 00268100
  275. CALL DMKQCNWT,PARM=NORET+ERRMSG(,R2) @V60C2B8 00268120
  276. LA R1,SAVEWRK4 READ IT INTO HERE @V304635 00269000
  277. LA R0,3 MAXIMUM LENGTH 00270000
  278. CALL DMKQCNRD,PARM=UCASE+EDIT 00271000
  279. BNZ CFHEXIT SOMETHING HAPPENED -FORGET IT @V304635 00272000
  280. CH R0,F2+2 2 CHARACTERS IN? @VM08919 00273000
  281. BH CHKYES MORE, MAYBE YES. @VM08919 00274000
  282. BL INTPEND LESS, BAD NEWS, TRY AGAIN. @VM08919 00275000
  283. CLC =C'NO',SAVEWRK4 WAS IT NO ? @VM03100 00276000
  284. BNE INTPEND NOPE, BAD NEWS, TRY AGAIN. @VM08919 00277000
  285. BE CFHEXIT IT WAS NO - SO FORGET IT. @V304635 00278000
  286. SPACE 1 00279000
  287. CHKYES CH R0,F3+2 ENTER 3 CHARACTERS? @VM08919 00280000
  288. BNE INTPEND NOPE, THEN CAN'T BE YES @VM08919 00281000
  289. CLC =C'YES',SAVEWRK4 WAS IT YES ? @VM03100 00282000
  290. BNE INTPEND NOPE, SO SAD, TRY AGAIN. @VM08919 00283000
  291. SPACE 00284000
  292. DOSAVE XC SAVEWRK4(L'SAVEWRK4+L'SAVEWRK5),SAVEWRK4 CLEAR @VM03100 00285000
  293. * SAVEWRK4/5 00286000
  294. L R0,SYSPAGCT LOAD NUMBER OF PAGES SAVED 00287000
  295. SRL R0,2 DIVIDE NUM. OF PAGES BY 4 00288000
  296. AH R0,F1+2 ADD ONE TO ADJUST FOR LOST BITS 00289000
  297. ST R0,SAVEWRK9 SAVE SIZE FOR FRET 00290000
  298. CALL DMKFREE ... 00291000
  299. ST R1,SAVEWRK4 SAVE BUFFER ADDRESS 00292000
  300. L R5,SYSSTART LOAD CCPD FROM SYSTABLE 00293000
  301. IC R5,RDEVCODE+1 INSERT DEVICE CODE 00294000
  302. ST R5,SAVEWRK2 SAVE STARTING CCPD FOR FUTURE USE 00295000
  303. L R10,F4096 LOAD CONSTANT FOR BUMPING PAGES 00296000
  304. LH R6,SYSPAGLN LOAD NUMBER OF SAVEPAG ENTRIES 00298000
  305. BAL R14,NEXTCCPD GET NEXT PAGE SLOT @VA12886 00299100
  306. SR R3,R3 ZERO GPR3 00300000
  307. **************************************************************** 00301000
  308. * REGISTER USAGE DURING SAVE LOOP 00302000
  309. * R3 - INDEX COUNT TO STEP THRU SYSPAGNM OF SYSTABLE ENTRY. 00303000
  310. * R4 - ADDRESS OF SYSTABLE ENTRY. 00304000
  311. * R5 - CCPD OF CURRENT PAGE ON SYSVOL. 00305000
  312. * R6 - COUNT OF NUMBER OF SYSPAGNM ENTRIES LEFT TO PROCESS. 00306000
  313. * R7 - CONSTANT USED TO INCREMENT CCPD IN R5. 00307000
  314. * R8 - CURRENT PAGE ADDRESS. 00308000
  315. * R9 - ENDING ADDRESS OF THE SYSPAGNM ENTRY BEING PROCESSED. 00309000
  316. * R10- CONSTANT USED TO INCREMENT ADDRESS IN R8. 00310000
  317. * 00311000
  318. ******************************************************************* 00312000
  319. SAVELOOP L R8,SYSPAGNM(R3) LOAD ENTRY 00313000
  320. SRDL R8,16 LOW PAGE NUM TO LOW ORDER OF R8 00314000
  321. SRL R9,16 HIGH PAG NUM TO LOW ORDER OF R9 00315000
  322. SLL R8,12 FORM ADDRESS OF CURRENT PAGE 00316000
  323. SLL R9,12 FORM ADDRESS OF HIGH PAGE 00317000
  324. CL R9,VMSIZE GREATER THAN VIRTUAL MACH SIZE @VA02004 00318000
  325. BNL CFH300 YES, WRITE ERROR MSG @VA02004 00319000
  326. SPACE 00320000
  327. TRANLOOP LR R1,R8 ADDRESS OF PAGE TO R1 00321000
  328. TRANS 2,1,OPT=(BRING,DEFER),ADEX=CFH300,IOER=CFH435 @VA12197 00322500
  329. LR R1,R8 LOAD ADDRESS 00323000
  330. LR R0,R5 LOAD CCPD 00324000
  331. ST R2,SAVEWRK1 SAVE THE REAL ADDRESS FOR LATER 00325000
  332. SLR R2,R2 ZIP THE PARM REG 00326000
  333. CALL DMKRPAPT WRITE PAGE OUT TO SYSVOL 00327000
  334. BNZ CFH435 GET OUT ON ERROR FROM WRITE 00328000
  335. * 00329000
  336. * NOW GET KEYS FOR PAGE AND SAVE IN BUFFER 00330000
  337. * 00331000
  338. RSTRT DS 0H 00332000
  339. L R15,SAVEWRK1 LOAD THE REAL ADDRESS 00333000
  340. L R2,VMSEG GET SEGTABLE ADDRESS 00334000
  341. LR R0,R8 LOAD VIRT ADDRESS 00335000
  342. SRDL R0,16 SEGMENT TO LOW ORDER OF R0, PAG TO R1 00336000
  343. SLL R0,2 INDEX INTO SEGTABLE 00337000
  344. AR R2,R0 R2 NOW POINTS TO ADDRESS OF PAGETABLE 00338000
  345. TM 3(R2),SEGINV VALID SEGMENT @V408246 00339000
  346. BZ SEGVAL YES @V408246 00340000
  347. TRANS 2,8,OPT=DEFER CLEAR SEQMENT INVALID @V408246 00341000
  348. B RSTRT START AGAIN @V408246 00342000
  349. SEGVAL DS 0H 00343000
  350. L R2,0(,R2) NOW CONTAINS ADDRESS OF PAGTABLE 00344000
  351. SRL R1,28 SHIFT PAGE TO LOWORDER OF R1 00345000
  352. SLL R1,3 INDEX INTO SWPTABLE 00346000
  353. LA R2,16*2+8(R1,R2) NOW POINT TO CORRECT SWAPTABLE @V408246 00347000
  354. LH R0,SWPKEY1-SWPFLAG(,R2) LOAD KEYS FOR PAGE @VM03100 00348000
  355. SLR R14,R14 ZIP THE KEY REG 00349000
  356. ISK R14,R15 GET THE PRESENT KEY 00350000
  357. SLL R14,8 SHIFT IT DOWN THE LINE 00351000
  358. A R15,=F'2048' GET ADDRESS OF SECOND HALF OF PAGE 00352000
  359. ISK R14,R15 GET PRESENT KEY FOR THAT HALF 00353000
  360. OR R0,R14 'OR' THE OLD AND THE NEW 00354000
  361. LM R1,R2,SAVEWRK4 LOAD ADDRESS OF BUFFER AND NO. KEYS SAVED 00355000
  362. STH R0,0(R2,R1) STORE KEYS IN BUFFER 00356000
  363. A R2,F2 BUMP COUNT OF KEYS(ALSO INDEXINTO BUFFER) 00357000
  364. ST R2,SAVEWRK5 STORE IT 00358000
  365. SPACE 00359000
  366. BAL R14,NEXTCCPD GET NEXT PAGE SLOT @VA12886 00360100
  367. SPACE 00367000
  368. PAGBUMP EQU * . . . 00368000
  369. AR R8,R10 BUMP PAGE 00369000
  370. CR R8,R9 END OF THIS ENTRY 00370000
  371. BH CHKPAGLN YES - GO SEE IF ANY MORE ENTRIES 00371000
  372. B TRANLOOP NO - GO PROCESS NEXT PAGE 00372000
  373. SPACE 00373000
  374. CHKPAGLN A R3,F4 BUMP R3 TO NEXT PAGNM ENTRY 00374000
  375. BCT R6,SAVELOOP BRANCH IF MORE ENTRIES 00375000
  376. SPACE 00376000
  377. L R5,SAVEWRK2 RESTORE ORIGINAL CCPD 00377000
  378. LH R1,SYSPAGNM FIRST PAGE SAVED @V408246 00378000
  379. SLL R1,12 VIRT. ADDRESS OF FIRST PAGE SAVED@V408246 00379000
  380. TRANS 2,1,OPT=(BRING,DEFER) @V408246 00380000
  381. USING SAVTABLE,R2 00381000
  382. MVC SAVPSW,VMPSW SAVE PSW 00382000
  383. MVC SAVGREGS(L'SAVGREGS*16),VMGPRS SAVE GENERAL @VM03100 00383000
  384. * PURPOSE REGS. 00384000
  385. MVC SAVFPRES(L'SAVFPRES*4),VMFPRS SAVE FLOATING @VM03100 00385000
  386. * POINT REGS 00386000
  387. SPACE 00387000
  388. TM VMPSTAT,VMV370R IS THIS AN EC MACHINE? 00388000
  389. BO SAVECRS BR., WE HAVE EC MACH. 00389000
  390. XC SAVCREGS(L'SAVCREGS*16),SAVCREGS SET THE CREGS @VM03100 00390000
  391. * ... 00391000
  392. MVC SAVCREGS,VMVCR0 .... TO CORRECT @VM03100 00392000
  393. MVC SAVCREGS+C2*4(L'SAVCREGS*2),FFS ... VALUES @VM03100 00393000
  394. MVI SAVCREGS+C14*4,HEXC4 SET CR14 @VM03100 00394000
  395. MVI SAVCREGS+C15*4+2,HEX02 SET SAVCR15 @VM03100 00395000
  396. B KEYSAVE NOW GO SAVE THE KEYS. 00396000
  397. SAVECRS EQU * 00397000
  398. L R10,VMECEXT ADDRESS OF ECBLOK 00398000
  399. USING ECBLOK,R10 00399000
  400. MVC SAVCREGS(L'SAVCREGS*16),EXTCR0 SAVE CREGS @VM03100 00400000
  401. DROP R10 00401000
  402. SPACE 00402000
  403. KEYSAVE EQU * 00403000
  404. LM R8,R9,SAVEWRK4 ADDRESS AND LENGTH OF KEY FIELD 00404000
  405. LR R7,R8 SAVE THE BUFFER ADDRESS 00405000
  406. LR R3,R9 LENGTH TO R3 FOR LONG MOVE 00406000
  407. LA R2,SAVKEYS ADDRESS OF KEYS IN THE SAVETABLE 00407000
  408. MVCL R2,R8 MOVE THE KEYS 00408000
  409. LR R0,R5 LOAD CCPD FOR FIRST DASD PAGE 00409000
  410. LH R1,SYSPAGNM STARTING PAGE NO. @V408246 00410000
  411. SLL R1,12 STARTING VIRTUAL ADDRESS @V408246 00411000
  412. CALL DMKRPAPT,PARM=0 @V408246 00412000
  413. BNZ CFH435 GET OUT ON ERROR FROM WRITE @VA10709 00412100
  414. L R0,SAVEWRK9 LOAD SIZE OF BUFFER 00413000
  415. LR R1,R7 ADDRESS OF BUFFER 00414000
  416. CALL DMKFRET RELEASE BUFFER 00415000
  417. SR R0,R0 CLEAR REGISTER @VA10709 00415100
  418. ST R0,SAVEWRK9 CLEAR SAVEWRK9 TO INDICATE @VA10709 00415200
  419. * BUFFER HAS BEEN FRETTED 00415300
  420. LH R1,SYSPAGNM FIRST PAGE SAVED @V408246 00416000
  421. SLL R1,12 VIRT. ADDRESS OF FIRST PAGE SAVE @V408246 00417000
  422. BAL R14,NEXTCCPD GET NEXT PAGE SLOT @VA12886 00418100
  423. LR R0,R5 SAVE ADDRESS @VA12886 00418300
  424. CALL DMKRPAGT,PARM=0 @V408246 00422000
  425. BNZ CFH435 GET OUT ON ERROR FROM READ @VA10709 00422100
  426. SPACE 1 00423000
  427. SAVEFINI MSG 'SYSTEM SAVED' SEND CONFIRMATION MESSAGE 00424000
  428. CALL DMKQCNWT,PARM=NORET SEND THE MSG 00425000
  429. SPACE 1 00426000
  430. * CHECK IF NAMED SYSTEM IS ALREADY ACTIVE 00427000
  431. L R2,=A(DMKVMAS1) GET ANCHOR OF SHARED SYSTEMS @VM03171 00428000
  432. L R5,0(,R2) GET FIRST SHRTABLE (IF ANY) @V304735 00429000
  433. USING SHRTABLE,R5 ADDRESSABILITY @V304735 00430000
  434. EXAMSHR CR R5,R2 IS IT END OF THE CHAIN ? @V304735 00431000
  435. BE CFHEXIT IF YES - SHRTABLE NOT BEING USED @V304735 00432000
  436. CLC SYSNAME,SHRNAME DO NAMES MATCH ? @VM03100 00433000
  437. BE EXAMSHR1 YES @V304735 00434000
  438. L R5,SHRFPNT GET NEXT ONE IN CHAIN @V304735 00435000
  439. LA R5,0(,R5) CLEAR FLAG BYTE @V60BC11 00435100
  440. B EXAMSHR KEEP SEARCHING @V304735 00436000
  441. EXAMSHR1 LM R1,R2,SHRFPNT UNCHAIN THE SHRTABLE @V304735 00437000
  442. STCM R1,B'0111',SHRFPNT+1-SHRTABLE(R2) FROM THE @V60BC11 00438000
  443. ST R2,SHRBPNT-SHRTABLE(,R1) ACTIVE LIST @V304735 00439000
  444. STCM R5,B'0111',SHRFPNT+1 CHAIN THIS ONE @V60BC11 00440000
  445. ST R5,SHRBPNT TO ITSELF...... @V304735 00441000
  446. B CFHEXIT EXIT @V304735 00442000
  447. DROP R5 @V304735 00443000
  448. EJECT 00444000
  449. NOSYSOWN EQU * VOLID NOT CP OWNED @V200820 00445000
  450. MVC SAVEWRK4+1(L'SYSVOL),SYSVOL MOVE IN VOLID @VM03100 00446000
  451. MVI SAVEWRK4,SEP00 MOVE IN FIELD DELIMITER @VM03100 00447000
  452. LA R0,LEN15 LOAD LENGTH OF ERROR MSG PARM @VM03100 00448000
  453. LA R1,SAVEWRK2 LOAD PARM REG WITH ADDRESS OF MSG@VM03100 00449000
  454. B CFH179 GO WRITE ERROR MSG DMKCFH179 @VM03100 00450000
  455. NOSYSVOL MVC SAVEWRK4+1(L'SYSVOL),SYSVOL VOL SER FOR ERR MSG @VM03100 00451000
  456. B LOADLEN GO SET UP LENGTH PARM REG @VM03100 00452000
  457. NOSYSRES MVC SAVEWRK4+1(L'VSYSRES),VSYSRES VIRT SYSRES VOL @VM03100 00453000
  458. * SER FOR MSG 00454000
  459. LOADLEN MVI SAVEWRK4,SEP00 MOVE IN FIELD SEPARATOR @VM03100 00455000
  460. LA R0,LEN15 LOAD PARM REG LENGTH OF PARMS @VM03100 00456000
  461. LA R1,SAVEWRK2 LOAD ADDRESS OF ERROR MSG PARMS @VM03100 00457000
  462. B CFH171 GO TO WRITE ERROR MSG ROUTINE @VM03100 00458000
  463. BLD172 EQU * INCOMPATIBLE VSYSRES 00459000
  464. BAL R10,GETVADDR BUILD VADDR 00460000
  465. B CFH172 GO TO WRITE ERROR MSG ROUTINE @VM03100 00461000
  466. SPACE 00462000
  467. BLD173 EQU * VADDR REQUIRED 00463000
  468. BAL R10,GETVADDR BUILD VADDR 00464000
  469. B CFH173 GO TO WRITE ERROR MSG ROUTINE @VM03100 00465000
  470. SPACE 00466000
  471. GETVADDR LH R1,SYSVADDR LOAD VADDR FROM SYSTBL 00467000
  472. CALL DMKCVTBH CONVERT IT 00468000
  473. ICM R1,8,F0 INSERT THE SEPARATER 00469000
  474. ST R1,SAVEWRK4 STORE DEV ADDRESS IN MSG TEXT 00470000
  475. LA R0,12 FIELD LENGTH 00471000
  476. LA R1,SAVEWRK2 FIELD ADDRESS 00472000
  477. BR R10 RETURN 00473000
  478. DROP R2,R4,R8 00474000
  479. EJECT 00475000
  480. CFHEXIT BAL R10,SYSTUNLC UNLOCK SYSTEM NAME TABLE(DMKSNT) @V304635 00476000
  481. EXIT RETURN TO CALLER @V304635 00477000
  482. SPACE 2 00478000
  483. SPACE 00479000
  484. GETSNTBL L R4,SAVEWRK6 IS SYSNAME TABLE ALLREADY IN @V304635 00480000
  485. * STORAGE 00481000
  486. LTR R4,R4 ..... @V304635 00482000
  487. BNZR R5 IF IT IS - RETURN TO CALLER @V304635 00483000
  488. L R1,=A(DMKSNTBL) ADDRESS OF SYSNAME TABLE @V304635 00484000
  489. TRANS 2,1,OPT=(BRING,DEFER,LOCK,SYSTEM) @V304635 00485000
  490. LR R4,R2 ADDRESS OF SYSTABLE TO R4 @V304635 00486000
  491. ST R2,SAVEWRK6 SAVE ADDRESS OF SYSNAME TABLE @V304635 00487000
  492. BR R5 RETURN TO CALLER @V304635 00488000
  493. NEXTCCPD EQU * HERE TO INCREMENT PAGE NUMBER @VA12886 00488100
  494. AL R5,F256 INCREMENT PAGE NUMBER FIRST @VA12886 00488110
  495. CLM R5,B'0010',SAVEWRK7+2 TEST PAGE # TO PAGE/CYL @VA12886 00488120
  496. BNHR R14 NOT CYL BOUNDARY RETURN @VA12886 00488130
  497. AL R5,=F'65536' INCREMENT CYLINDER NUMBER @VA12886 00488140
  498. ICM R5,B'0010',F256+2 RESET PAGE # TO ONE @VA12886 00488150
  499. BR R14 RETURN @VA12886 00488160
  500. EJECT 00489000
  501. SYSTUNLC ST R2,SAVEWRK9 SAVE ERROR CODE REGISTER @V304635 00490000
  502. L R2,SAVEWRK6 TEST IF DMKSNT TABLE IN STORAGE @V304635 00491000
  503. LTR R2,R2 IS IT ? @V304635 00492000
  504. BNZ PTRUL IF IS - UNLOCK IT. @V304635 00493000
  505. L R2,SAVEWRK9 RESTORE R2 @V304635 00494000
  506. BR R10 RETURN TO CALLER @V304635 00495000
  507. PTRUL CALL DMKPTRUL UNLOCK THE SYSNAME TABLE @V304635 00496000
  508. XC SAVEWRK6,SAVEWRK6 ZERO OUT ADDRESS OF SYSNAME @V304635 00497000
  509. * TABLE 00498000
  510. L R2,SAVEWRK9 RESTORE ERROR CODE REGISTER @V304635 00499000
  511. BR R10 RETURN TO CALLER @V304635 00500000
  512. SPACE 2 00501000
  513. FREEKBUF L R0,SAVEWRK9 BUFFER LENGTH 00502000
  514. LTR R0,R0 IS THERE A BUFFER TO FRET? @VA10709 00502100
  515. BZ NOVAR NO,THEN CONTINUE WITHOUT FRET @VA10709 00502200
  516. L R1,SAVEWRK4 BUFFER ADDRESS 00503000
  517. CALL DMKFRET FRET THE BUFFER 00504000
  518. BR R10 RETURN 00505000
  519. SPACE 2 00506000
  520. SAVENAME MVC SAVEWRK2(0),0(R1) @V304635 00507000
  521. EJECT 00508000
  522. CFH026 LA R2,EMSG026 LOAD ERROR CODE 00509000
  523. B NOVAR GO SET UP ERROR MSG DMKCFH026 00510000
  524. CFH044 LA R0,L'SYSNAME LOAD LENGTH OF FIELD 00511000
  525. LA R1,SAVEWRK2 FIELD ADDRESS 00512000
  526. LA R2,EMSG044 LOAD ERROR CODE @VM03100 00513000
  527. B CALLERM GO SET UP ERROR MSG DMKCFH044 @VM03099 00514000
  528. SPACE 1 00515000
  529. SPACE 00516000
  530. CFH170 LA R0,L'SYSNAME LOAD LENGTH OF FIELD @VM03201 00517000
  531. LA R1,SAVEWRK2 FIELD ADDRESS @VM03201 00518000
  532. LA R2,EMSG170 LOAD ERROR CODE @VM03201 00519000
  533. B CALLERM ..... 00520000
  534. SPACE 00521000
  535. CFH171 LA R2,EMSG171 LOAD ERROR CODE @VM03100 00522000
  536. B CALLERM GO SET UP ERROR MSG DMKCFH171 @VM03099 00523000
  537. SPACE 00524000
  538. CFH172 LA R2,EMSG172 LOAD ERROR CODE @VM03100 00525000
  539. B CALLERM GO SET UP ERROR MSG DMKCFH172 @VM03099 00526000
  540. SPACE 00527000
  541. CFH173 LA R2,EMSG173 LOAD ERROR CODE @VM03100 00528000
  542. B CALLERM GO SET UP ERROR MSG DMKCFH173 @VM03099 00529000
  543. SPACE 1 00530000
  544. CFH179 LA R2,EMSG179 LOAD ERROR CODE @VM03100 00531000
  545. B CALLERM GO SET UP ERROR MSG DMKCFH179 @VM03099 00532000
  546. SPACE 1 00533000
  547. CFH300 LA R2,EMSG300 LOAD ERROR CODE @VM03100 00534000
  548. BAL R10,FREEKBUF GO RELEASE THE KEY BUFFER @VA04160 00535000
  549. B CALLERM GO SET UP ERROR MSG DMKCFH300 @VM03099 00536000
  550. SPACE 00537000
  551. CFH435 LA R2,EMSG435 LOAD ERROR CODE @VM03100 00538000
  552. BAL R10,FREEKBUF GO RELEASE THE KEY BUFFER @VA04160 00539000
  553. SPACE 3 00540000
  554. NOVAR SLR R1,R1 ZIP THE PARM REG 00541000
  555. CALLERM BAL R10,SYSTUNLC UNLOCK SYSNAME TABLE @V304635 00542000
  556. ICM R0,B'1110',MODID+3 INSERT MODULE IDENT. @VM03100 00543000
  557. ERMSG CALL DMKERMSG SEND THE ERROR MESSAGE @V304635 00544000
  558. ***************************************************************** 00545000
  559. * ERMSG WILL RETURN DIRECTLY TO DMKCFM -- NOT HERE -- 00546000
  560. ***************************************************************** 00547000
  561. EJECT 00548000
  562. ********************************************************** 00549000
  563. * * 00550000
  564. * MODULE EQUATES * 00551000
  565. ********************************************************** 00552000
  566. SPACE 1 00553000
  567. PAGE2314 EQU 32 NUMBER OF PAGES PER CYLINDER @VM03100 00554000
  568. * (2314/2319). 00555000
  569. PAGE3330 EQU 57 NUMBER OF PAGES PER CYLINDER @VM03100 00556000
  570. * (3330). 00557000
  571. PAGE3350 EQU 120 NUMBER OF PAGES PER CYLINDER @VM03100 00558000
  572. * (3350). 00559000
  573. PAGE3375 EQU 96 Number of pages per cylinder HRC106DK 00559100
  574. * (3375) HRC106DK 00559200
  575. PAGE3380 EQU 150 Number of pages per cylinder HRC106DK 00559300
  576. * (3380) HRC106DK 00559400
  577. PAGE2305 EQU 24 NUMBER OF PAGES PER CYLINDER @VM03100 00560000
  578. * (2305/3340). 00561000
  579. * 00562000
  580. LEN0 EQU 0 LENGTH VALUE OF 0 @VM03100 00563000
  581. LEN3 EQU 3 LENGTH VALUE OF 3 @VM03100 00564000
  582. LEN4 EQU 4 LENGTH VALUE OF 4 @VM03100 00565000
  583. LEN15 EQU 15 LENGTH VALUE OF 15 @VM03100 00566000
  584. * 00567000
  585. CC0 EQU X'00' VALUE FOR CONDITION CODE 0 @VM03100 00568000
  586. CC1 EQU X'10' VALUE FOR CONDITION CODE 1 @VM03100 00569000
  587. CC2 EQU X'20' VALUE FOR CONDITION CODE 2 @VM03100 00570000
  588. CC3 EQU X'30' VALUE FOR CONDITION CODE 3 @VM03100 00571000
  589. * 00572000
  590. ONE EQU 1 VALUE OF ONE @VM03100 00573000
  591. * 00574000
  592. SEGINDEX EQU 1 SEGMENT INDEX VALUE OF 1 @VM03100 00575000
  593. * 00576000
  594. INDEX1 EQU 1 INDEXING BY 1 @VM03100 00577000
  595. INDEX4 EQU 4 INDEXING BY 4 @VM03100 00578000
  596. * 00579000
  597. RETPLUS4 EQU 4 VALUE USED FOR RETURNING PLUS 4 @VM03100 00580000
  598. * 00581000
  599. SEP00 EQU X'00' SEPARATOR CHARACTER @VM03100 00582000
  600. * 00583000
  601. HEX00 EQU X'00' VALUE OF X'00' @VM03100 00584000
  602. HEXC4 EQU X'C4' HEX VALUE OF X'C4' @VM03100 00585000
  603. HEX02 EQU X'02' HEX VALUE OF X'02' @VM03100 00586000
  604. * 00587000
  605. PAGHDR EQU 2 LENGTH OF PAGHDR @VM03100 00588000
  606. SWPHDR EQU 8 LENGTH OF SWPHDR @VM03100 00589000
  607. * 00590000
  608. EMSG006 EQU 6 ERROR MESSAGE NUMBER 006 @VM03100 00591000
  609. EMSG026 EQU 26 ERROR MESSAGE NUMBER 026 @VM03100 00592000
  610. EMSG044 EQU 44 ERROR MESSAGE NUMBER 044 @VM03100 00593000
  611. EMSG170 EQU 170 ERROR MESSAGE NUMBER 170 @VM03100 00594000
  612. EMSG171 EQU 171 ERROR MESSAGE NUMBER 171 @VM03100 00595000
  613. EMSG172 EQU 172 ERROR MESSAGE NUMBER 172 @VM03100 00596000
  614. EMSG173 EQU 173 ERROR MESSAGE NUMBER 173 @VM03100 00597000
  615. EMSG179 EQU 179 ERROR MESSAGE NUMBER 179 @VM03100 00598000
  616. EMSG300 EQU 300 ERROR MESSAGE NUMBER 300 @VM03100 00599000
  617. EMSG435 EQU 435 ERROR MESSAGE NUMBER 435 @VM03100 00600000
  618. SPACE 2 00601000
  619. LTORG * @VM03100 00602000
  620. SPACE 00603000
  621. USERSTOR DSECT @VM03100 00604000
  622. CYLAREA DS XL2 FILLER @VM03100 00605000
  623. DEVAREA DS XL2 PLACE FOR DEVICE ADDRESS @VM03100 00606000
  624. DS 4X FILLER @VM03100 00607000
  625. MSGBYTE DS XL2 PLACE FOR MESSAGE INFORMATION @VM03100 00608000
  626. STOPBYTE DS 1X STOP FLAG @VM03100 00609000
  627. * 00610000
  628. * BITS DEFINED IN STOPBYTE 00611000
  629. NOSTOP EQU X'00' NO STOP ON IPL @VM03100 00612000
  630. IPLSTOP EQU X'80' STOP ON IPL @VM03100 00613000
  631. SPACE 00614000
  632. COPY SHRTABLE @VM03100 00615000
  633. PSA , @V306638 00616000
  634. COPY CORE @V306638 00617000
  635. COPY DEVTYPES @V306638 00618000
  636. COPY EQU @V306638 00619000
  637. COPY RBLOKS @V306638 00620000
  638. COPY SAVE @V306638 00621000
  639. COPY SAVTABLE @V306638 00622000
  640. COPY SYSTBL @V306638 00623000
  641. COPY VBLOKS @V306638 00624000
  642. COPY VMBLOK @V306638 00625000
  643. END 00626000