Table of Contents

DMKPGT Source

References

Source Listing

DMKPGT.ASSEMBLE.txt
  1. PGT TITLE 'DMKPGT (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF INPUT 00002000
  3. *. 00003000
  4. * MODULE NAME - 00004000
  5. * 00005000
  6. * DMKPGT 00006000
  7. * 00007000
  8. * CONTENTS - 00008000
  9. * 00009000
  10. * DMKPGTPG - ALLOCATE ONE DASD PAGE FOR SYSTEM PAGING 00010000
  11. * DMKPGTSG - ALLOCATE ONE DASD PAGE FOR SYSTEM SPOOLING 00011000
  12. * DMKPGTPR - RELEASE ONE DASD PAGE FOR PAGING USE 00012000
  13. * DMKPGTSP - RELEASE ONE DASD PAGE FOR SYSTEM USE 00013000
  14. * DMKPGTSD - RELEASE ONE DASD PAGE FOR SPOOLING USE 00014000
  15. * DMKPGTSR - RELEASE A GROUP OF DASD PAGES FOR SPOOLING USE 00015000
  16. * DMKPGTCG - ALLOCATE CONTIGUOUS SPOOL SPACE FOR 370X DUMP 00016000
  17. * DMKPGTVG - ALLOCATE ONE PAGE OF SYSTEM VIRTUAL STORAGE 00017000
  18. * DMKPGTVR - RELEASE ONE PAGE OF SYSTEM VIRTUAL STORAGE 00018000
  19. *. 00019000
  20. EJECT 00020000
  21. COPY OPTIONS 00021000
  22. COPY LOCAL OPTIONS 00022000
  23. SPACE 2 00023000
  24. DMKPGT CSECT 00024000
  25. SPACE 3 00025000
  26. EXTRN DMKSTKCP,DMKCKP @V200820 00026000
  27. EXTRN DMKPTRXX @V408246 00026100
  28. EXTRN DMKSYSOW 00027000
  29. ENTRY DMKPGTTM,DMKPGT90 00028000
  30. ENTRY DMKPGTTU 00029000
  31. ENTRY DMKPGTP5,DMKPGTP0,DMKPGTP4 00030000
  32. ENTRY DMKPGT4P,DMKPGT4T @V2A2029 00031000
  33. ENTRY DMKPGT5P,DMKPGT5T @V304498 00032000
  34. ENTRY DMKPGT7P,DMKPGT7T 00032020
  35. ENTRY DMKPGT8P,DMKPGT8T 00032040
  36. ENTRY DMKPGTPM ENTRY FOR PAGE ALLOCATION IN @V408246 00032100
  37. * SPOOL 00032200
  38. ENTRY DMKPGTT5,DMKPGTT0,DMKPGTT4 00033000
  39. ENTRY DMKPGTDF FLAGS AND COUNT FOR DRUM MAX. @V408246 00033500
  40. SPACE 00034000
  41. ENTRY DMKPGTPG,DMKPGTBN @VA00919 00035000
  42. SPACE 3 00036000
  43. USING PSA,R0 00037000
  44. USING RECBLOK,R6 00038000
  45. USING RDEVBLOK,R8 00039000
  46. USING ALOCBLOK,R10 00040000
  47. SPACE 00041000
  48. EJECT 00042000
  49. *. 00043000
  50. * 00044000
  51. * SUBROUTINE NAME - 00045000
  52. * 00046000
  53. * DMKPGTPG 00047000
  54. * 00048000
  55. * FUNCTION - 00049000
  56. * 00050000
  57. * TO ALLOCATE A PAGE OF DASD SPACE THAT IS TO BE USED FOR EITHER 00051000
  58. * VIRTUAL MEMORY PAGING OR FOR SPOOL FILE PAGE BUFFERS 00052000
  59. * 00053000
  60. * ATTRIBUTES - 00054000
  61. * 00055000
  62. * SERIALLY REUSABLE, RESIDENT, CALLED VIA BALR 00056500
  63. * 00057000
  64. * ENTRY POINTS - 00058000
  65. * 00059000
  66. * DMKPGTPG - TO OBTAIN A DASD PAGE FOR VIRTUAL MEMORY PAGING 00060000
  67. * DMKPGTSG - TO OBTAIN A DASD PAGE FOR A SPOOL FILE RECORD 00061000
  68. * 00062000
  69. * DMKPGTP5,DMKPGTP0,DMKPGT4P,DMKPGT5P,DMKPGTP4,DMKPGT7P HRC106DK 00062100
  70. * AND DMKPGT8P ARE ANCHOR CHAINS OF PREFERRED PAGING HRC106DK 00063100
  71. * DEVICES, THEY ARE INITIALIZED BY DMKCPI,DMKPGTT5, HRC106DK 00064100
  72. * DMKPGTT0,DMKPGT4T,DMKPGT5T,DMKPGTT4,DMKPGT7T AND HRC106DK 00065100
  73. * DMKPGT8T ARE ANCHORS FOR CHAINS CONNECTING ALL OTHER HRC106DK 00066100
  74. * DEVICE BLOKS WITH OWNED VOLUMES MOUNTED. HRC106DK 00067100
  75. * 00068000
  76. * DMKPGTTM,DMKPGTTU AND DMKPGT90 HOLD THE MAXIMUM, USED, AND 00069000
  77. * 90 PERCENT OF THE MAXIMUM NUMBER OF TEMPORARY CYLINDERS 00070000
  78. * THAT ARE AVAILABLE. THEY ARE INITIALIZED BY DMKCPI AND 00071000
  79. * MAINTAINED BY BY ATTACHED (DMKVDB). 00072000
  80. * 00073000
  81. * ENTRY CONDITIONS - 00074000
  82. * 00075000
  83. * GPR12 = DMKPGT BASE REGISTER 00076000
  84. * GPR13 = ADDRESS OF STANDARD SAVEAREA 00077000
  85. * 00078000
  86. * EXIT CONDITIONS - 00079000
  87. * 00080000
  88. * NORMAL - 00081000
  89. * IF A PAGE IS AVAILABLE, THE CALLER'S GPR1 WILL CONTAIN THE 00082000
  90. * COMPRESSED DASD ADDRESS OF THE PAGE IN THE FORM (CCPD), 00083000
  91. * WHERE CC IS THE CYLINDER NUMBER, P IS THE PAGE NUMBER ON THE 00084000
  92. * CYLINDER, AND D IS THE DEVICE CODE INDEX INTO THE OWNED LIST 00085000
  93. * 00086000
  94. * ERROR - 00087000
  95. * IF NO PAGE IS AVAILABLE, THE CALLER'S GPR1 IS SET TO ZERO 00088000
  96. * 00089000
  97. * CALLS TO OTHER ROUTINES - 00090000
  98. * 00091000
  99. * DMKFREE - TO OBTAIN FREE STORAGE IN WHICH TO CONSTRUCT NEW 00092000
  100. * RECORD ALLOCATION BLOKS 00093000
  101. * DMKQCNWT - TO WARN THE OPERATOR OF IMPENDING EXHAUSTION OF 00094000
  102. * SYSTEM SPOOL SPACE 00095000
  103. * 00096000
  104. * DMKSTKCP - TO STACK A CPEXBLOK 00097000
  105. EJECT 00098000
  106. * EXTERNAL REFERENCES - 00099000
  107. * 00100000
  108. * NONE 00101000
  109. * 00102000
  110. * TABLES / WORKAREAS 00103000
  111. * 00104000
  112. * NONE 00105000
  113. * 00106000
  114. * REGISTER USAGE - 00107000
  115. * 00108000
  116. * GPR0,1 ARE WORK REGISTERS 00109000
  117. * GPR2 = FUNCTION REGISTER FOR TRT 00110000
  118. * GPR3 = INDICATOR FOR SPOOLING OR PAGING ALLOCATION; FOR 00111000
  119. * VIRTUAL MEMORY PAGING, GPR3 = 0, FOR SPOOLING, 00112000
  120. * GPR3 = 4 00113000
  121. * GPR4 = ADDRESS OF POINTER TO CHAIN OF OWNED DEVICES 00114000
  122. * GPR5,6, AND 7 ARE WORK REGISTERS 00115000
  123. * GPR8 = ADDRESS OF RDEVBLOK FOR DEVICE ON WHICH SPACE IS 00116000
  124. * BEING ALLOCATED 00117000
  125. * GPR9 = BACKCHAIN POINTER FOR RECBLOKS 00118000
  126. * GPR10 = ADDRESS OF ALOCBLOK 00119000
  127. * GPR11 IS NOT USED 00120000
  128. * GPR12 = DMKPGT BASE REGISTER 00121000
  129. * GPR13 = ADDRESS OF STANDARD SAVEAREA 00122000
  130. * GPR14,15 USED FOR BALR LINKAGE TO FREE 00123000
  131. * 00124000
  132. * 00125000
  133. * NOTES - 00126000
  134. * 00127000
  135. * NONE 00128000
  136. * 00129000
  137. * OPERATION - 00130000
  138. * 00131000
  139. * 1. POINT TO FIRST DEVICE TYPE ANCHOR FOR OWNED DEVICES 00132000
  140. * 00133000
  141. * 2. LOCATE THE RDEVBLOK FOR THE NEXT DEVICE WITH TEMPSPACE 00134000
  142. * ALLOCATED ON IT 00135000
  143. * 00136000
  144. * 3. POINT TO THE PROPER RECBLOK ANCHOR (FOR EITHER PAGING OR 00137000
  145. * SPOOLING) AND LOCATE THE FIRST RECBLOK WITH AN AVAIL- 00138000
  146. * BLE PAGE. IF A RECBLOK IS FOUND, GO TO STEP 6 00139000
  147. * 00140000
  148. * 4. IF NO ALLOCATED CYLINDER HAS AN AVAILABLE PAGE, LOCATE THE 00141000
  149. * THE NEXT AVAILABLE CYLINDER, WORKING OUTWARD FROM THE 00142000
  150. * CENTER OF THE TEMPSPACE AREA. IF NO CYLINDER IS AVAILABLE, 00143000
  151. * GO TO STEP 2; OTHERWISE, CONTINUE 00144000
  152. * 00145000
  153. * 5. CONSTRUCT A NEW RECBLOK FOR THE ALLOCATED CYLINDER, AND 00146000
  154. * CHAIN IT TO THE END OF THE CURRENT CHAIN 00147000
  155. * 00148000
  156. * 6. CALCULATE THE ADDRESS OF THE ALLOCATED PAGE, MARK IT AS 00149000
  157. * ALLOCATED, AND PASS THE ADDRESS BACK TO THE CALLER 00150000
  158. * 00151000
  159. * MESSAGES - 00152000
  160. * DMKPGT401I SYSTEM TEMP SPACE 90 PERCENT FULL 00153000
  161. * DMKPGT400I SYSTEM TEMP SPACE FULL 00154000
  162. *. 00155000
  163. * 00156000
  164. SPACE 3 00157000
  165. USING *,R15 00158000
  166. DMKPGTPG STM R0,R15,BALRSAVE SAVE ALL REGS 00159000
  167. LR R12,R15 STANDARD ADDRESSABILITY 00160000
  168. DROP R15 00161000
  169. USING DMKPGT,R12 00162000
  170. SR R3,R3 CLEAR DEVICE CHAIN INDEX 00163000
  171. CLC CPID,=C'CPCP' ARE WE STILL WITHIN DMKCPI LOGIC 00164000
  172. BNE NOSPACE IF YES, DON'T INCREASE FREELIST PAGES 00165000
  173. LA R4,DMKPGTP5-4 POINT TO PAGING DEVICE CHAIN 00166000
  174. CLI DRMLIM,0 DRUM LIMITS? @V408246 00166100
  175. BE PGTINIT NO @V408246 00166200
  176. USING VMBLOK,R11 @V408246 00166300
  177. CLC VMPDRUM,DRMLIM+2 THIS USER AT LIMIT? @V408246 00166400
  178. BL PGTINIT NO @V408246 00166500
  179. DROP R11 @V408246 00166600
  180. LA R4,4(,R4) YES, BYPASS DRUM ALLOCATION @V408246 00166700
  181. B PGTINIT GO INITIALIZE BLOK REGS 00167000
  182. SPACE 3 00167100
  183. USING DMKPGTPM,R15 @V408246 00167200
  184. DMKPGTPM DS 0H @V408246 00167300
  185. STM R0,R15,BALRSAVE @V408246 00167400
  186. L R12,=A(DMKPGT) @V408246 00167500
  187. SR R3,R3 CLEAR FOR PAGE CHAIN @V408246 00167600
  188. B PGTINIX START SEARCH ON NON-PREFERED @V408246 00167700
  189. * DISKS 00167800
  190. SPACE 3 00168000
  191. ENTRY DMKPGTSG 00169000
  192. USING *,R15 00170000
  193. DMKPGTSG STM R0,R15,BALRSAVE ENTER HERE TO GET SPOOL SPACE 00171000
  194. L R12,=A(DMKPGT) STANDARD ADDRESSABILITY 00172000
  195. DROP R15 00173000
  196. USING DMKPGT,R12 00174000
  197. LA R3,4 SET DEVICE CHAIN INDEX FOR SPOOLING 00175000
  198. PGTINIX DS 0H PAGE ALLOCATION IN NON-PREFERED @V408246 00175100
  199. LA R4,DMKPGTT5-4 POINT TO START OF NON-PAGING SPACE 00176000
  200. PGTINIT EQU * HERE TO START ALLOCATING 00177000
  201. SR R15,R15 CLEAR 00178000
  202. SR R14,R14 RECBLOK SAVE REGISTERS 00179000
  203. EJECT 00180000
  204. NEXTYPE EQU * LOCATE THE NEXT AVAILABLE DEVICE WITH TEMPSPACE 00181000
  205. LA R4,4(,R4) INDEX TO NEXT DEVICE TYPE ANCHOR 00182000
  206. L R8,0(,R4) POINT TO RDEVBLOK 00183000
  207. LTR R8,R8 ANY DEVICES AVAILABLE ? 00184000
  208. BP CKREC YES -- GO FIND A PAGE 00185000
  209. BZ NEXTYPE NO -- GO CHECK NEXT SLOWER DEVICE TYPE 00186000
  210. B NOSPACE WE HIT THE FENCE AND ARE OUT OF SPACE 00187000
  211. SPACE 2 00188000
  212. NEXTDEV L R8,RDEVPNT POINT TO NEXT DEVICE OF THE SAME TYPE 00189000
  213. C R8,0(,R4) ALL DEVICES OF THIS TYPE FULL ? 00190000
  214. BNE CKREC @V408246 00191100
  215. LTR R3,R3 PAGING REQUEST? @V408246 00191200
  216. BNZ NEXTYPE NO @V408246 00191300
  217. C R4,=A(DMKPGTP5) FILLED UP 2305? @V408246 00191400
  218. BNE NEXTYPE NO @V408246 00191500
  219. L R8,=A(DMKPTRXX) POINTER TO FLAGS @V408246 00191600
  220. OI 1(R8),X'80' RAISE DRUM FULL FLAG @V408246 00191700
  221. B NEXTYPE @V408246 00191800
  222. SPACE 00192000
  223. CKREC LA R9,RDEVPAGE(R3) POINT TO START OF PAGING OR SPOOL 00193000
  224. * CHAIN (GPR3 SET AT ENTRY) 00194000
  225. LH R0,RDEVCYL GET POSITION OF ACCESS ARM @VA01629 00195000
  226. SPACE 00196000
  227. NEXTREC EQU * POINT TO NEXT RECORD ALLOCATION BLOK 00197000
  228. L R6,RECPNT-RECBLOK(,R9) POINT TO NEXT PAGE ALLOC. BLOK 00198000
  229. LTR R6,R6 ANY MORE BLOKS ? 00199000
  230. BZ CKCYL NO -- SEE IF A BLOK WAS FOUND 00200000
  231. LR R9,R6 SAVE BACK POINTER 00201000
  232. L R5,RDEVFIOB AND 1ST OF ANY CHAINED IOBLOKS 00202000
  233. B GETPAGE GO CHECK OUT THIS CYLINDER 00203000
  234. SPACE 00204000
  235. CKCYL LTR R6,R15 FIND AN ALLOCATION BLOK ON AN ACTIVE CYL 00205000
  236. BNZ GETREC YES -- ALLOCATE ON IT 00206000
  237. LTR R6,R14 FIND ANY AVAILABLE CYLINDER ?? 00207000
  238. BZ FINDCYL NO -- GO ALLOCATE ANOTHER CYLINDER 00208000
  239. SPACE 00209000
  240. GETREC SR R1,R1 CLEAR WORK REGISTER 00210000
  241. IC R1,RECUSED GET NUMBER OF RECORDS IN USE 00211000
  242. B UPREC AND GO ALLOCATE 00212000
  243. EJECT 00213000
  244. * HERE IF NO PAGE ALLOCATION BLOKS EXIST FOR THIS DEVICE -- 00214000
  245. * TRY TO ALLOCATE ANOTHER CYLINDER FOR THE REQUIRED FUNCTION 00215000
  246. SPACE 00216000
  247. FINDCYL EQU * 00217000
  248. L R10,RDEVALLN POINT TO ALLOCATION BLOK 00218000
  249. LH R1,ALOCUSED GET NUMBER OF CYLINDERS IN USE 00219000
  250. CH R1,ALOCMAX AND COMPARE TO MAX AVAILABLE 00220000
  251. BL FNDCYLA STILL SOME ROOM AVAILABLE @V408246 00221100
  252. TM RDEVFLAG,RDEVPREF PREFERED PAGING AREA? @V408246 00221200
  253. BZ NEXTDEV NO @V408246 00221300
  254. CLI RDEVTYPE,TYP2305 DRUM? @V408246 00221400
  255. BE NEXTDEV YES @V408246 00221500
  256. L R2,=A(DMKPTRXX) PAGING FLAGS @V408246 00221600
  257. OI 1(R2),X'40' RAISE PREFERRED PAGING FULL FLAG @V408246 00221700
  258. B NEXTDEV TRY NEXT DEVICE @V408246 00221800
  259. FNDCYLA DS 0H @V408246 00221900
  260. SPACE 00222000
  261. LA R1,1(,R1) BUMP NUMBER IN USE 00223000
  262. STH R1,ALOCUSED AND SAVE 00224000
  263. SPACE 00225000
  264. SR R2,R2 CLEAR TRT FUNCTION REGISTER 00226000
  265. SPACE 00227000
  266. SR R7,R7 CALCULATE LENGTH OF BIT MAP 00228000
  267. LH R6,ALOCMAX GET NUMBER OF CYLINDERS IN ALLOCATION MAP 00229000
  268. SRDL R6,3 NUMBER OF CYLINDERS/8 00230000
  269. LTR R7,R7 ANY REMAINDER ? 00231000
  270. BNZ *+6 YES -- 00232000
  271. BCTR R6,0 IF NOT, REDUCE LENGTH BY ONE 00233000
  272. SPACE 00234000
  273. LH R7,ALOCMAX Get ALOCMAX before altering R10 HRC106DK 00234100
  274. CH R6,=H'255' Length of ALOCMAP > 256 bytes? HRC106DK 00234200
  275. BNH SMALLDEV Dasd with 2048 or less cylinders HRC106DK 00234300
  276. TRT ALOCMAP(256),FREETABL Check first 256 bytes HRC106DK 00234400
  277. BNZ PGT1A Found a zero bit HRC106DK 00234500
  278. LA R10,256(,R10) Try 256 bytes further along HRC106DK 00234600
  279. SMALLDEV EQU * HRC106DK 00234700
  280. EX R6,GETCYL LOCATE AN UNUSED CYLINDER 00235000
  281. BNZ PGT1A MUST FIND ONE 00236000
  282. ABEND 1 OR DIE IN THE ATTEMPT 00237000
  283. PGT1A EQU * 00238000
  284. SPACE 2 00239000
  285. * MARK CYLINDER AS ALLOCATED, AND CALCULATE ITS ADDRESS 00240000
  286. IC R5,ALLOCTBL-1(R2) GET BIT MASK TO MARK CYL ALLOCATED 00241000
  287. EX R5,ALLOCATE AND DO IT 00242000
  288. LA R0,ALOCMAP GET ADDRESS OF START OF MAP 00243000
  289. SR R1,R0 GET DISPLACEMENT OF BYTE WITH 0 BIT 00244000
  290. SLL R1,3 TIMES 8 00245000
  291. AR R1,R2 GET BIT NUMBER ALLOCATED 00246000
  292. BCTR R1,0 RELATIVE TO 0 00247000
  293. EX R1,TESTODD SEE IF IT WAS ODD OR EVEN 00248000
  294. SRL R1,1 AND DIVIDE BY 2 00249000
  295. LR R5,R1 SAVE DISPLACEMEMT FROM CENTER 00250000
  296. BZ *+8 IF EVEN, LEAVE PLUS AND ZIG OUT 00251000
  297. LNR R1,R1 IF ODD, MAKE MINUS AND ZAG IN 00252000
  298. BCTR R1,R0 ONE EXTRA CYLINDER 00253000
  299. SPACE 00254000
  300. LR R6,R7 Retrieve saved ALOCMAX HRC106DK 00255100
  301. SRL R6,1 CALCULATE MIDDLE CYLINDER 00256000
  302. AR R6,R1 GET CYLINDER THAT WAS ALLOCATED 00257000
  303. SPACE 2 00258000
  304. * BUILD A NEW PAGE ALLOCATION BLOK FOR NEWLY ALLOCATED CYLINDER 00259000
  305. SPACE 2 00260000
  306. LA R10,FINDPAGE WHERE TO GO AFTER RECBLOK IS BUIL@V200820 00261000
  307. LA R7,24 NUMBER OF PAGES FOR A 2305 00262000
  308. CLI RDEVTYPE,TYP2305 IS IT A 2305?? 00263000
  309. BE GETCORE YES -- 00264000
  310. CLI RDEVTYPE,TYP3340 3340 DEVICE TYPE ? @V2A2029 00265000
  311. BE GETCORE YES - BRANCH (24 PAGES/CYL) @V2A2029 00266000
  312. LA R7,32 NUMBER OF PAGES/CYLINDER - 2314 00267000
  313. CLI RDEVTYPE,TYP2314 IS THAT RIGHT ?? 00268000
  314. BE GETCORE YES -- 00269000
  315. LA R7,120 NUMBER OF PAGES/CYLINDER - 3350 @V304498 00270000
  316. CLI RDEVTYPE,TYP3350 3350 DEVICE TYPE ? @V304498 00271000
  317. BE GETCORE YES, BUILD RECBLOK @V304498 00272000
  318. LA R7,96 Number of pages/cylinder - 3375 HRC106DK 00272100
  319. CLI RDEVTYPE,TYP3375 3375 device type ? HRC106DK 00272200
  320. BE GETCORE Yes, build RECBLOK HRC106DK 00272300
  321. LA R7,150 Number of pages/cylinder - 3380 HRC106DK 00272400
  322. CLI RDEVTYPE,TYP3380 3380 device type ? HRC106DK 00272500
  323. BE GETCORE Yes, build RECBLOK HRC106DK 00272600
  324. LA R7,57 NUMBER OF PAGES FOR A 3330 00273000
  325. SPACE 2 00274000
  326. GETCORE SLL R6,16 SHIFT CYLINDER INTO HIGH ORDER BYTES 00275000
  327. LR R2,R7 SAVE NUMBER OF PAGES AVAILABLE 00276000
  328. LA R7,X'100'(,R7) SET NUMBER IN USE TO ONE 00277000
  329. AR R7,R6 GET CYLINDER IN HIGH ORDER BYTES 00278000
  330. LA R0,RECSIZE GET LENGTH OF RECBLOK 00279000
  331. CALL DMKFREE OBTAIN NECESSARY STORAGE 00280000
  332. SR R6,R6 SET POINTER REGISTER 00281000
  333. STM R6,R7,RECPNT-RECBLOK(R1) SET UP POINTER, CYLINDER, U/M 00282000
  334. SPACE 00283000
  335. DROP R6 HRC106DK 00284100
  336. USING RECBLOK,R1 HRC106DK 00284300
  337. LM R6,R7,FFS Set R6 and R7 to all ones HRC106DK 00284500
  338. CH R2,=H'64' 'Small' no. of pages per cyl.? HRC106DK 00284700
  339. BL SMALLPPC Use the beginning of RECMAP HRC106DK 00284900
  340. CH R2,=H'128' 'Medium' no. of pages per cyl.? HRC106DK 00285100
  341. BL MIDPPC Use the middle of RECMAP HRC106DK 00285300
  342. SH R2,=H'128' Get rid of bits accounted for HRC106DK 00285500
  343. XC RECMAP(16),RECMAP Clear start, middle of RECMAP HRC106DK 00285700
  344. SRDL R6,0(R2) Insert one zero per avail. page HRC106DK 00285900
  345. STM R6,R7,RECMAP+16 Set up end of RECMAP HRC106DK 00286100
  346. B MAPFIN RECMAP completely set up HRC106DK 00286300
  347. MIDPPC SH R2,=H'64' Get rid of bits accounted for HRC106DK 00286500
  348. STM R6,R7,RECMAP+16 Set all bits at end of RECMAP HRC106DK 00286700
  349. SRDL R6,0(R2) Insert one zero per avail. page HRC106DK 00286900
  350. STM R6,R7,RECMAP+8 Set up middle of RECMAP HRC106DK 00287100
  351. XC RECMAP(8),RECMAP Clear beginning of RECMAP HRC106DK 00287300
  352. B MAPFIN RECMAP completely set up HRC106DK 00287500
  353. SMALLPPC STM R6,R7,RECMAP+16 Set all bits at end of RECMAP HRC106DK 00287700
  354. STM R6,R7,RECMAP+8 Set all bits in middle of RECMAP HRC106DK 00287900
  355. SRDL R6,0(R2) Insert one zero per avail. page HRC106DK 00288100
  356. STM R6,R7,RECMAP Set up beginning of RECMAP HRC106DK 00288300
  357. DROP R1 HRC106DK 00288500
  358. USING RECBLOK,R6 HRC106DK 00288700
  359. MAPFIN EQU * @V304498 00291000
  360. LR R6,R1 POINT TO NEW BLOK 00292000
  361. SPACE 00293000
  362. SR R1,R1 CLEAR WORK REGISTER 00294000
  363. CH R1,RECCYL ALLOCATING ON CYLINDER 0 ?? 00295000
  364. BNE CKPREF NO -- ALL SET THE WAY IT IS 00296000
  365. SPACE 00297000
  366. MVI RECMAP,B'11100000' FIRST 3 RECS ARE PERMANENTLY ALLOC. 00298000
  367. IC R1,RECMAX GET NUMBER OF AVAILABLE RECS 00299000
  368. CLI RECMAX,64 Is this a 'large' device? HRC106DK 00300100
  369. BH INITCYL0 Yes, initialise cyl 0 page map HRC106DK 00301100
  370. S R1,F3 DECREMENT BY 3 00302000
  371. CYLZERO EQU * @V304498 00303000
  372. STC R1,RECMAX AND SAVE 00304000
  373. SPACE 00305000
  374. CKPREF EQU * 00306000
  375. * CHAIN NEW RECBLOK TO ALLOCATION LIST AT PROPER POSITION, 00307000
  376. * BASED ON DISPLACEMENT FROM CENTER 00308000
  377. SPACE 00309000
  378. CLI RDEVTYPE,TYP2305 ALLOCATING ON FIXED HEAD DEVICE ? 00310000
  379. BE CHAINFXD YES -- 00311000
  380. B NONPREF NOT FIXED HEAD, SORT CHAIN @V408246 00312100
  381. SPACE 1 00322000
  382. INITCYL0 OI RECMAP,PAGE4 ALLOC FIRST 4 PAGES ON CYL 0 @V304498 00323000
  383. S R1,F4 DECREMENT BY 4 @V304498 00324000
  384. B CYLZERO COMPLETE UPDATE OF RECMAP @V304498 00325000
  385. SPACE 1 00326000
  386. NONPREF LA R9,RDEVPAGE(R3) POINT TO LIST ANCHOR @VA01097 00327000
  387. L R1,RDEVALLN GET POINTER TO ALLOCBLOK @VA04554 00328000
  388. LH R1,ALOCMAX-ALOCBLOK(R1) GET NUMBER OF CYL @VA03281 00329000
  389. SRL R1,1 GET MIDDLE CYLINDER 00330000
  390. SPACE 00331000
  391. CHAINLP L R2,RECPNT-RECBLOK(,R9) POINT TO NEXT BLOK ON LIST 00332000
  392. LTR R2,R2 AT THE END ?? 00333000
  393. BZ CHAINT YES 00334000
  394. LH R0,RECCYL-RECBLOK(,R2) GET CYLINDER OF NEXT BLOK 00335000
  395. SR R0,R1 GET DISPLACEMENT FROM CENTER 00336000
  396. LPR R0,R0 FORCE + 00337000
  397. CR R0,R5 COMPARE TO NEW BLOKS DISPLACEMENT 00338000
  398. BH CHAINT IF FARTHER FROM CENTER, CHAIN IN 00339000
  399. LR R9,R2 OTHERWISE, REMEMBER PREVIOUS BLOK 00340000
  400. B CHAINLP AND KEEP LOOKING 00341000
  401. SPACE 00342000
  402. CHAINFXD EQU * ALLOCATING ON FIXED HEAD DEVICE: 00343000
  403. L R2,RDEVPAGE(R3) GET TOP BLOK ON LIST 00344000
  404. LA R9,RDEVPAGE(R3) AND LIST ANCHOR 00345000
  405. * MAKE NEW (EMPTY) BLOK FIRST: 00346000
  406. SPACE 00347000
  407. CHAINT ST R2,RECPNT CHAIN NEXT BLOK 00348000
  408. CHAINP ST R6,RECPNT-RECBLOK(,R9) CHAIN IN PRIVIOUS 00349000
  409. SPACE 00350000
  410. * FIND OUT HOW CLOSE WE ARE TO RUNNING OUT OF SPACE 00351000
  411. * 00352000
  412. TM RDEVFLAG,RDEVPREF IF THIS DEVICE IS PREFERRED @VM01503 00353000
  413. * PAGING 00354000
  414. BCR 1,R10 THEN BYPASS SPACE ACCOUNTING @VM01503 00355000
  415. L R1,DMKPGTTU GET NUMBER OF CYLINDERS IN USE (TOTAL) 00356000
  416. A R1,F1 BUMP 00357000
  417. ST R1,DMKPGTTU AND SAVE 00358000
  418. C R1,DMKPGT90 COMPARE TO NUMBER THAT IS 90 PERCENT OF 00359000
  419. BCR 4,R10 (BL) TOTAL -- IF LOWER, CONTINUE@V200820 00360000
  420. TM MSGSW,X'80' OTHERWISE, SEE IF MESSAGE HAS BEEN GIVEN 00361000
  421. BCR 1,R10 (BO) WARNING ALREADY GIVEN @V200820 00362000
  422. SPACE 00363000
  423. LA R0,CPEXSIZE GET CORE FOR A CPEXBLOK 00364000
  424. CALL DMKFREE ... 00365000
  425. USING CPEXBLOK,R1 00366000
  426. LA R15,PGTMSG GET EXECUTION ADDRESS 00367000
  427. STM R15,R14,CPEXADD SAVE ALL REGS AND EXECUTION ADDRESS 00368000
  428. MVC CPEXR11(4),ASYSVM USER MAY LOG OFF BEFORE MSG. @VA08425 00368500
  429. CALL DMKSTKCP STACK FOR DELAYED EXECUTION 00369000
  430. OI MSGSW,X'80' INDICATE THAT MESSAGE HAS BEEN GIVEN 00370000
  431. BR R10 AND CONTINUE @V200820 00371000
  432. SPACE 2 00372000
  433. PGTMSG EQU * HERE TO GIVE MESSAGE 00373000
  434. MSG 'DMKPGT401I SYSTEM TEMP SPACE 90 PERCENT FULL' @VA04554 00374000
  435. CALL DMKQCNWT,PARM=OPERATOR+NORET+ALARM WARN THE OPERATOR 00375000
  436. GOTO DMKDSPCH WHEN FINISHED, EXIT TO DISPATCH @VA04554 00376000
  437. EJECT 00377000
  438. GETPAGE EQU * HERE TO ALLOCATE A PAGE ON THE CYLINDER 00378000
  439. SR R1,R1 CLEAR WORK REG 00379000
  440. IC R1,RECUSED GET NUMBER OF RECS IN USE 00380000
  441. EX R1,RECOMP ANY PAGES AVAILABLE ?? 00381000
  442. BE NEXTREC NO PAGES AVAILABLE -- 00382000
  443. SPACE 1 00382100
  444. TM APSTAT1,PROCIO EXECUTING ON AP @V4M0112 00382200
  445. BZ UPREC YES- BYPASS TRACKING ARM @V4M0112 00382300
  446. SPACE 00383000
  447. LTR R3,R3 SPOOL ALLOCATION ?? 00384000
  448. BNZ UPREC YES -- ALLOCATE HERE 00385000
  449. CLI RDEVTYPE,TYP2305 @V304498 00386000
  450. BE UPREC @V304498 00387000
  451. SPACE 00388000
  452. CH R0,RECCYL IS DEVICE POSITIONED AT THIS CYLINDER 00389000
  453. BE UPREC YES -- ALLOCATE HERE 00390000
  454. CLI RDEVTYPE,TYP3340 3340 DEVICE ? @V2A2029 00391000
  455. BNE CKACT NO -- CHECK FOR ACTIVE @V2A2029 00392000
  456. TM RDEVFTR,FTR70MB 3340 WITH 70MB DATA MODULE ? @V2A2029 00393000
  457. BZ CKACT NO - BRANCH @V2A2029 00394000
  458. X R0,F1 MAKE CYLINDER ODD OR EVEN @V2A2029 00395000
  459. CH R0,RECCYL IS DEVICE POSITIONED AT THIS @V2A2029 00396000
  460. * CYL ? 00397000
  461. BE UPREC YES -- @V2A2029 00398000
  462. CKACT LTR R15,R15 HAVE WE FOUND AN ACTIVE CYLINDER @V2A2029 00399000
  463. BNZ NEXTREC YES -- KEEP LOOKING FOR CURRENT 00400000
  464. LTR R14,R14 HAVE WE FOUND AN AVAILABLE CYLINDER 00401000
  465. BNZ CKIOB YES -- 00402000
  466. LR R14,R6 SAVE 1ST AVAILABLE CYLINDER 00403000
  467. SPACE 00404000
  468. CKIOB CR R5,R8 ANY MORE IOBLOKS QUEUED 00405000
  469. BE NEXTREC NO -- 00406000
  470. CLC IOBCYL-IOBLOK(2,R5),RECCYL IO ACTIVE FOR THIS CYL 00407000
  471. BE GETIOBR YES -- SAVE THIS BLOK 00408000
  472. L R5,IOBFPNT-IOBLOK(,R5) POINT TO NEXT BLOK 00409000
  473. B CKIOB AND KEEP LOOKING 00410000
  474. SPACE 00411000
  475. GETIOBR LR R15,R6 SAVE THIS RECBLOK 00412000
  476. B NEXTREC AND KEEP LOOKING 00413000
  477. SPACE 00414000
  478. UPREC LA R1,1(,R1) BUMP NUMBER OF RECORDS IN USE 00415000
  479. STC R1,RECUSED AND SAVE 00416000
  480. SPACE 00417000
  481. FINDPAGE EQU * CALCULATE NUMBER OF NEXT AVAILABLE PAGE ON CYLINDER 00418000
  482. SR R2,R2 CLEAR FUNCTION REGISTER FOR TRT 00419000
  483. TRT RECMAP,FREETABL FIND AN AVAILABLE PAGE 00420000
  484. BNZ PGT2A MUST BE ONE AVAILABLE 00421000
  485. ABEND 2 ELSE WE DIE HERE 00422000
  486. PGT2A EQU * 00423000
  487. SPACE 00424000
  488. IC R5,ALLOCTBL-1(R2) GET BIT MASK TO ALLOCATE PAGE 00425000
  489. EX R5,ALLOCATE AND DO IT 00426000
  490. LA R0,RECMAP POINT TO START OF BIT MAP 00427000
  491. SR R1,R0 GET DISPLACEMENT OF BYTE WITH 0 BIT 00428000
  492. SLL R1,3 TIMES 8 00429000
  493. AR R1,R2 GET RELATIVE PAGE NUMBER 00430000
  494. LH R2,RECCYL GET CYLINDER NUMBER 00431000
  495. SLL R2,8 SAVE 00432000
  496. AR R2,R1 INSERT PAGE NUMBER 00433000
  497. SLL R2,8 SAVE CYLINDER AND PAGE 00434000
  498. IC R2,RDEVCODE+1 INSERT DEVICE CODE 00435000
  499. L R8,RDEVPNT GET POINTER TO NEXT DEVICE ON CHAIN 00436000
  500. ST R8,0(,R4) AND ALLOCATE ON IT NEXT TIME 00437000
  501. LTR R3,R3 IS THIS A PAGING REQUEST? 00438000
  502. BNZ NOACNT1 NO, NO ACCOUNTING TO PERFORM 00439000
  503. TM RDEVTYPE,TYP2305 FAST PAGING DEVICE ? @V304498 00440000
  504. BZ ACNTDSK1 NOT A DRUM , ACCOUNT FOR DISK 00441000
  505. USING VMBLOK,R11 00442000
  506. LH R3,VMPDRUM ADD 1 TO COUNT OF USER PAGES 00443000
  507. LA R3,1(R3) ALLOCATED ON DRUM 00444000
  508. STH R3,VMPDRUM 00445000
  509. B NOACNT1 00446000
  510. ACNTDSK1 LH R3,VMPDISK ADD 1 TO COUNT OF USER PAGES 00447000
  511. LA R3,1(R3) ALLOCATED ON DISK 00448000
  512. STH R3,VMPDISK 00449000
  513. NOACNT1 EQU * 00450000
  514. SETADDR ST R2,BALR1 STORE IN CALLER'S GPR1 00451000
  515. LM R0,R15,BALRSAVE RESTORE REGS 00452000
  516. BR R14 AND EXIT 00453000
  517. SPACE 3 00454000
  518. NOSPACE EQU * HERE IF ALL TEMPSPACE IS GONE -- 00455000
  519. CLC CPID,=C'CPCP' RUNNING SYSTEM YET ?? 00456000
  520. BNE SET0 NO -- BYPASS MSG IF STILL IN CPINIT 00457000
  521. TM MSGSW,X'40' TEMP SPACE FULL MSG BEING SENT ? 00458000
  522. BO SET0 YES --FORGET IT THIS TIME 00459000
  523. OI MSGSW,X'40' INDICATE MSG BEING SENT 00460000
  524. LA R0,CPEXSIZE GET CORE FOR A CPEXBLOK 00461000
  525. CALL DMKFREE ... 00462000
  526. USING CPEXBLOK,R1 00463000
  527. LA R15,PGTMSG2 GET EXECUTION ADDRESS 00464000
  528. STM R15,R14,CPEXADD SAVE ALL REGS AND EXECUTION ADDRESS 00465000
  529. MVC CPEXR11(4),ASYSVM USER MAY LOG OFF BEFORE MSG. @VA08425 00465500
  530. CALL DMKSTKCP STACK BLOK FOR DEFERED EXECUTION 00466000
  531. SET0 SR R2,R2 SET ZERO ADDRESS 00467000
  532. B SETADDR AND EXIT 00468000
  533. SPACE 00469000
  534. PGTMSG2 EQU * HERE TO GIVE NO SPACE MESSAGE 00470000
  535. MSG 'DMKPGT400I SYSTEM TEMP SPACE FULL' @VA04554 00471000
  536. CALL DMKQCNWT,PARM=OPERATOR+ALARM WARN THE OPERATOR 00472000
  537. MSG2RET NI MSGSW,X'BF' RESET TEMP SPACE FULL MSG SWITCH 00473000
  538. GOTO DMKDSPCH AND LEAVE 00474000
  539. EJECT 00475000
  540. *. 00476000
  541. * 00477000
  542. * SUBROUTINE NAME - 00478000
  543. * 00479000
  544. * DMKPGTPR 00480000
  545. * 00481000
  546. * FUNCTION - 00482000
  547. * 00483000
  548. * TO DE-ALLOCATE A PAGE OF DASD SPACE THAT HAS BEEN USED FOR 00484000
  549. * VIRTUAL MEMORY PAGING 00485000
  550. * 00486000
  551. * ATTRIBUTES - 00487000
  552. * 00488000
  553. * SERIALLY REUSABLE, RESIDENT, CALLED VIA SVC 00489000
  554. * 00490000
  555. * ENTRY POINTS - 00491000
  556. * 00492000
  557. * DMKPGTPR 00493000
  558. * DMKPGTSD 00494000
  559. * DMKPGTSP 00495000
  560. * 00496000
  561. * ENTRY CONDITIONS - 00497000
  562. * 00498000
  563. * GPR5 = ADDRESS OF THE SWPTABLE ENTRY THAT CONTAINS THE COMP- 00499000
  564. * RESSED DASD ADDRESS OF THE PAGE TO BE RELEASED 00500000
  565. * GPR12 = DMKPGTPR BASE REGISTER 00501000
  566. * GPR13 = ADDRESS OF STANDARD SAVEAREA 00502000
  567. * 00503000
  568. * EXIT CONDITIONS - 00504000
  569. * 00505000
  570. * NORMAL - 00506000
  571. * THE PAGE IS MARKED AS DE-ALLOCATED, AND THE PROPER USE 00507000
  572. * COUNTS ARE UPDATED 00508000
  573. * 00509000
  574. * ERROR - 00510000
  575. * NONE 00511000
  576. * 00512000
  577. * CALLS TO OTHER ROUTINES - 00513000
  578. * 00514000
  579. * DMKFRET - TO RETURN TO FREE STORAGE ANY RECBLOKS WHOSE PAGES 00515000
  580. * ARE COMPLETELY DE-ALLOCATED 00516000
  581. * 00517000
  582. * EXTERNAL REFERENCES - 00518000
  583. * 00519000
  584. * THE SYSTEM OWNED VOLUME LIST (DMKSYSOW) IS REFERENCED TO 00520000
  585. * LOCATE THE RDEVBLOK FOR THE DEVICE ON WHICH A PAGE HAS BEEN 00521000
  586. * ALLOCATED 00522000
  587. * 00523000
  588. * TABLES / WORKAREAS - 00524000
  589. * 00525000
  590. * NONE 00526000
  591. EJECT 00527000
  592. * 00528000
  593. * REGISTER USAGE - 00529000
  594. * 00530000
  595. * GPR0,1,2,3, AND 4 ARE WORK REGISTERS 00531000
  596. * GPR5 = ADDRESS OF SWPTABLE ENTRY 00532000
  597. * GPR6 = ADDRESS OF RECBLOK 00533000
  598. * GPR7 IS NOT USED 00534000
  599. * GPR8 = ADDRESS OF RDEVBLOK 00535000
  600. * GPR9 IS NOT USED 00536000
  601. * GPR10 = ADDRESS OF ALLOCBLOK 00537000
  602. * GPR11 IS NOT USED 00538000
  603. * GPR12 = BASE ADDRESS FOR DMKPGTPG 00539000
  604. * GPR13 = ADDRESS OF STANDARD SAVEAREA 00540000
  605. * GPR14,15 ARE USED FOR BALR LINKAGE AND RETURN 00541000
  606. * 00542000
  607. * NOTES - 00543000
  608. * 00544000
  609. * NONE 00545000
  610. * 00546000
  611. * OPERATION - 00547000
  612. * 00548000
  613. * 1. IF THE PAGE HAS NOT YET BEEN ALLOCATED, SIMPLY RESET THE 00549000
  614. * SWPTABLE ENTRY TO ZERO; OTHERWISE, CONTINUE 00550000
  615. * 00551000
  616. * 2. LOCATE THE RDEVBLOK FOR THE DEVICE ON WHICH THE PAGE HAS 00552000
  617. * BEEN ALLOCATED BY INDEXING INTO THE OWNED LIST WITH THE 00553000
  618. * DEVICE CODE SUPPLIED IN THE DASD ADDRESS 00554000
  619. * 00555000
  620. * 3. LOCATE THE RECBLOK FOR THE CYLINDER ON WHICH THE PAGE IS 00556000
  621. * ALLOCATED 00557000
  622. * 00558000
  623. * 4. CALCULATE THE BIT WHICH REPRESENTS THE PAGE AND SET IT TO 00559000
  624. * ZERO; DECREMENT THE NUMBER OF PAGES IN USE 00560000
  625. * 00561000
  626. * 5. IF THE NUMBER IN USE IS ZERO, DE-ALLOCATE THE CYLINDER; 00562000
  627. * OTHERWISE CONTINUE 00563000
  628. * 00564000
  629. * 6. RESET THE SWPTABLE ENTRY TO ZERO, AND RETURN TO CALLER 00565000
  630. * 00566000
  631. *. 00567000
  632. EJECT 00568000
  633. USING SWPFLAG,R5 00569000
  634. ENTRY DMKPGTSD 00570000
  635. USING *,R15 00571000
  636. DMKPGTSD STM R0,R15,BALRSAVE ENTER AND SAVE REGS 00572000
  637. L R12,=A(DMKPGT) STANDARD ADDRESSABILITY 00573000
  638. DROP R15 00574000
  639. USING DMKPGT,R12 00575000
  640. LA R3,(RDEVRECS-RDEVPAGE) DISP TO RDEVRECS CHAIN 00576000
  641. B SPOOLDEL 00577000
  642. SPACE 2 00578000
  643. ENTRY DMKPGTSP @VM01002 00579000
  644. USING *,R15 @VM01002 00580000
  645. DMKPGTSP STM R0,R15,BALRSAVE ENTER AND SAVE REGISTERS @VM01002 00581000
  646. L R12,=A(DMKPGT) STANDARD ADDRESSABILITY @VM01002 00582000
  647. USING DMKPGT,R12 @VM01002 00583000
  648. SLR R3,R3 CLEAR INDEX FOR PAGING CHAIN @VM01002 00584000
  649. MVI UCTL,UCTLDR+UCTLSYS ACNT FOR PAGE+SYSTEM VMBLOK @VM01031 00585000
  650. B SPOOLDEL @VM01002 00586000
  651. SPACE 2 00587000
  652. ENTRY DMKPGTPR 00588000
  653. USING *,R15 00589000
  654. DMKPGTPR STM R0,R15,BALRSAVE ENTER AND SAVE REGS 00590000
  655. L R12,=A(DMKPGT) STANDARD ADDRESSABILITY 00591000
  656. DROP R15 00592000
  657. USING DMKPGT,R12 00593000
  658. SR R3,R3 CLEAR INDEX FOR PAGING CHAIN @VA04554 00594000
  659. OI UCTL,UCTLDR FLAG ENTRY FOR PAGING 00595000
  660. SPACE 2 00596000
  661. SPOOLDEL EQU * 00597000
  662. L R4,SWPCYL GET DASD ADDRESS 00598000
  663. BAL R14,FINDEVIC GO LOCATE RDEVBLOK FOR THIS PAGE 00599000
  664. SPACE 00600000
  665. LA R9,RDEVPAGE(R3) POINT TO PAGE OR SPOOL ALLOCATION CHAIN 00601000
  666. LR R15,R9 AND SAVE ADDRESS OF ANCHOR 00602000
  667. BAL R14,FINDREC AND GO FIND THE RECORD ALLOCATION BLOK 00603000
  668. SPACE 00604000
  669. SR R2,R2 CLEAR DIVIDEND REGISTER 00605000
  670. LR R7,R2 SAVE FOR CLEARING SWPTABLE 00606000
  671. IC R2,SWPDPAGE GET PAGE NUMBER 00607000
  672. BCTR R2,0 RELATIVE TO ZERO 00608000
  673. SRDL R2,3 DIVIDED BY 8 00609000
  674. SRL R3,29 GET REMAINDER 00610000
  675. LA R1,RECMAP(R2) POINT TO BYTE CONTAINING BIT FOR PAGE 00611000
  676. IC R3,ALLOCTBL(R3) GET BIT MASK TO DE-ALLOCATE 00612000
  677. EX R3,TEST IS PAGE ALLOCATED ?? 00613000
  678. BO PGT3A IT BETTER BE -- 00614000
  679. ABEND 3 OR WE ARE FATALLY ILL 00615000
  680. PGT3A EQU * 00616000
  681. SPACE 00617000
  682. EX R3,DEALLOC DE-ALLOCATE THE PAGE 00618000
  683. IC R3,RECUSED GET NUMBER OF PAGES IN USE 00619000
  684. S R3,F1 DECREMENT IN-USE COUNT 00620000
  685. STC R3,RECUSED AND SAVE IT 00621000
  686. BP RECLEFT IF SOME PAGES STILL IN USE, SKIP 00622000
  687. SPACE 00623000
  688. BAL R14,EMPTYCYL IF NO RECORDS IN USE, GO DEALLOCATE THE 00624000
  689. * CYLINDER 00625000
  690. B ZEROPAGE RESET SWPTABLE ENTRY 00626000
  691. SPACE 00627000
  692. RECLEFT EQU * AT LEAST ONE RECORD STILL IN USE: 00628000
  693. CLI RDEVTYPE,TYP2305 FIXED HEAD DEVICE ?? 00629000
  694. BNE ZEROPAGE NO -- LEAVE WELL ENOUGH ALONE 00630000
  695. L R0,RECPNT REMOVE PARTIALLY EMPTY BLOCK 00631000
  696. ST R0,RECPNT-RECBLOK(,R9) FROM CURRENT LIST POSITION 00632000
  697. L R0,0(,R15) AND PLACE IT 00633000
  698. ST R6,0(,R15) AT THE 00634000
  699. ST R0,RECPNT TOP OF THE LIST 00635000
  700. SPACE 00636000
  701. ZEROPAGE EQU * HERE TO CLEAR SWPTABLE ENTRY 00637000
  702. OI SWPFLAG,SWPRECMP PAGE MUST BE RE-ASSIGNED NEXT TIME 00638000
  703. ST R7,SWPCYL INDICATE ZERO PAGE 00639000
  704. TM UCTL,UCTLDR IS PAGE BEING RELEASED FOR PAGING? 00640000
  705. BZ NOACNT2 NO, SPOOLING, NO ACCOUNTING REQD. 00641000
  706. DROP R11 TEMPORALLY SWITCH VMBLOKS @VM01031 00642000
  707. USING VMBLOK,R4 @VM01031 00643000
  708. LR R4,R11 NORMAL CASE IS AGAINST THE USER @VM01031 00644000
  709. TM UCTL,UCTLSYS IS THIS THE NORMAL CASE? @VM01031 00645000
  710. BZ *+8 YES, BR. @VM01031 00646000
  711. L R4,ASYSVM NOPE, ACNT FOR PAGE AGAINST SYS @VM01031 00647000
  712. TM RDEVTYPE,TYP2305 FAST PAGING DEVICE ? @V304498 00648000
  713. BZ ACNTDSK2 NOT A DRUM, ACCOUNT FOR DISK 00649000
  714. LH R3,VMPDRUM SUBTRACT 1 FROM COUNT OF USER 00650000
  715. S R3,F1 PAGES ALLOCATED ON DRUM @VA04554 00651000
  716. BM NOACNT2 IF MINUS, LEAVE COUNT = 0 @VA04554 00651500
  717. STH R3,VMPDRUM 00652000
  718. B NOACNT2 00653000
  719. ACNTDSK2 LH R3,VMPDISK SUBTRACT 1 FROM COUNT OF USER 00654000
  720. S R3,F1 PAGES ALLOCATED ON DISK 00655000
  721. BM NOACNT2 IF MINUS, LEAVE COUNT = 0 @VA04554 00655500
  722. STH R3,VMPDISK 00656000
  723. NOACNT2 MVI UCTL,X'00' CLEAR FLAG @VM01031 00657000
  724. LM R0,R15,BALRSAVE RESTORE CALLER'S REGS 00658000
  725. BR R14 AND EXIT TO CALLER 00659000
  726. DROP R4 RETURN TO STANDARD VMBLOK USAGE @VM01031 00660000
  727. USING VMBLOK,R11 @VM01031 00661000
  728. EJECT 00662000
  729. *. 00663000
  730. * 00664000
  731. * SUBROUTINE NAME - 00665000
  732. * 00666000
  733. * DMKPGTSR 00667000
  734. * 00668000
  735. * FUNCTION - 00669000
  736. * 00670000
  737. * TO RELEASE A SET OF DASD PAGES THAT BELONG TO A SPOOL FILE 00671000
  738. * THAT IS NO LONGER NEEDED 00672000
  739. * 00673000
  740. * ATTRIBUTES - 00674000
  741. * 00675000
  742. * SERIALLY RE-USABLE, RESIDENT, CALLED VIA SVC 00676000
  743. * 00677000
  744. * ENTRY POINTS - 00678000
  745. * 00679000
  746. * DMKPGTSR 00680000
  747. * 00681000
  748. * ENTRY CONDITIONS - 00682000
  749. * 00683000
  750. * GPR1 = THE ADDRESS OF THE FIRST OF A CHAIN OF DUMMY 00684000
  751. * RECBLOKS. THE BIT MAP FOR EACH BLOK CONTAINS A 1 FOR 00685000
  752. * EVERY PAGE THAT IS TO BE RELEASED ON THE CYLINDER THAT 00686000
  753. * IT REPRESENTS 00687000
  754. * 00688000
  755. * EXIT CONDITIONS - 00689000
  756. * 00690000
  757. * NORMAL - 00691000
  758. * THE RELEASED PAGES ARE MARKED AS DE-ALLOCATED, AND THE 00692000
  759. * APPROPRIATE USED COUNTS ARE UPDATED 00693000
  760. * 00694000
  761. * ERROR - 00695000
  762. * NONE 00696000
  763. * 00697000
  764. * CALLS TO OTHER ROUTINES - 00698000
  765. * 00699000
  766. * DMKFRET - TO RETURN TO FREE STORAGE BOTH THE DUMMY RECBLOKS 00700000
  767. * AND ALSO ANY RECBLOKS WHOSE PAGES HAVE ALL BEEN DE- 00701000
  768. * ALLOCATED 00702000
  769. * 00703000
  770. * EXTERNAL REFERENCES - 00704000
  771. * 00705000
  772. * THE SYSTEM OWNED LIST (DMKSYSOW) IS REFERENCED TO LOCATE THE 00706000
  773. * THE RDEVBLOK FOR THE VOLUME CONTAINING THE PAGE 00707000
  774. * 00708000
  775. * TABLES / WORKAREAS - 00709000
  776. * 00710000
  777. * NONE 00711000
  778. EJECT 00712000
  779. * 00713000
  780. * REGISTER USAGE - 00714000
  781. * 00715000
  782. * SEE PROLOGUE TO DMKPGTPR ABOVE 00716000
  783. * 00717000
  784. * NOTES - 00718000
  785. * 00719000
  786. * NONE 00720000
  787. * 00721000
  788. * OPERATION - 00722000
  789. * 00723000
  790. * DMKPGTSR OPERATES IN ESSENTIALLY THE SAME MANNER AS DMKPGTPR, 00724000
  791. * WITH THE THE EXCEPTION THAT WHEN THE PROPER RDEVBLOK AND 00725000
  792. * RECBLOK HAVE BEEN LOCATED, THE BIT MASK IN THE DUMMY 00726000
  793. * RECBLOK IS EXCLUSIVE OR'ED AGAINST THE MAP IN THE 00727000
  794. * REAL BLOK TO ZERO OUT THE BITS FOR THE PAGES BEING DEALLOCATED 00728000
  795. * 00729000
  796. * DMKPGTPR AND DMKPGTSR USE SEVERAL COMMON SUBROUTINES TO LOCATE 00730000
  797. * THE RDEVBLOK FOR THE AFFECTED VOLUME, LOCATE THE RECBLOK 00731000
  798. * CONTAINING THE PAGE, AND TO DE-ALLOCATE A CYLINDER WHOSE 00732000
  799. * PAGES HAVE ALL BEEN FREED. 00733000
  800. * 00734000
  801. *. 00735000
  802. EJECT 00736000
  803. ENTRY DMKPGTSR 00737000
  804. USING *,R15 00738000
  805. DMKPGTSR STM R0,R15,BALRSAVE ENTER AND SAVE REGS 00739000
  806. L R12,=A(DMKPGT) STANDARD ADDRESSABILITY 00740000
  807. DROP R15 00741000
  808. USING DMKPGT,R12 00742000
  809. LR R5,R1 SAVE ADDRESS OF DUMMY BLOK 00743000
  810. SPACE 00744000
  811. SAVECYL L R4,RECCYL-RECBLOK(,R5) GET DASD PAGE ADDRESS 00745000
  812. LR R3,R4 AND SAVE IT 00746000
  813. BAL R14,FINDEVIC GO LOCATE THE PROPER RDEVBLOK 00747000
  814. SPACE 00748000
  815. LA R9,RDEVRECS POINT TO SPOOLING ALLOCATION CHAIN 00749000
  816. BAL R14,FINDREC GO LOCATE THE PROPER RECORD ALLOCATION 00750000
  817. SPACE 00751000
  818. XC RECMAP,RECMAP-RECBLOK(R5) REMOVE ALLOCATED PAGES 00752000
  819. N R3,=A(X'FF00') STRIP OUT ALL BUT NUMBER OF RECS DELETED 00753000
  820. SRL R3,8 PLACE IN LOW ORDER 00754000
  821. SR R2,R2 CLEAR WORK REGISTER 00755000
  822. IC R2,RECUSED GET NUMBER PREVIOUSLY IN USE 00756000
  823. SR R2,R3 DECREMENT 00757000
  824. STC R2,RECUSED AND SAVE 00758000
  825. BP NEXTSPL STILL RECORDS IN USE IN THIS BLOK 00759000
  826. BZ PGT4A ALL RECORDS DEALLOCATED 00760000
  827. ABEND 4 DE-ALLOCATE MORE THAN WE HAD 00761000
  828. PGT4A EQU * 00762000
  829. SPACE 00763000
  830. BAL R14,EMPTYCYL GO DE-ALLOCATE THE CYLINDER -- 00764000
  831. SPACE 00765000
  832. NEXTSPL LR R1,R5 POINT TO BLOK JUST USED 00766000
  833. L R5,RECPNT-RECBLOK(,R5) POINT TO NEXT BLOK TO DE-ALLOC. 00767000
  834. LA R0,RECSIZE GET LENGTH OF DUMMY BLOK 00768000
  835. CALL DMKFRET FRET IT 00769000
  836. LTR R5,R5 ANY MORE TO DO 00770000
  837. BNZ SAVECYL YES -- CONTINUE 00771000
  838. LM R0,R15,BALRSAVE RESTORE REGS 00772000
  839. BR R14 AND EXIT TO CALLER 00773000
  840. EJECT 00774000
  841. ***************************** 00775000
  842. * 00776000
  843. * COMMON SUBROUTINES FOR DMKPGTPR AND DMKPGTSR -- 00777000
  844. * 00778000
  845. ***************************** 00779000
  846. SPACE 3 00780000
  847. FINDEVIC EQU * HERE TO LOCATE THE RDEVBLOK WHICH HAS THE CHAIN 00781000
  848. * ANCHOR FOR THE PAGE TO BE DELETED -- AT ENTRY, 00782000
  849. * GPR4 MUST CONTAIN THE COMPRESSED DASD ADDRESS (CCPD) 00783000
  850. SPACE 00784000
  851. LA R8,X'FF' GET MASK TO STRIP ALL BUT DEVICE CODE 00785000
  852. NR R8,R4 GET DEVICE CODE IN GPR8 00786000
  853. SRL R4,16 SHIFT CYLINDER NUMBER TO LOW ORDER 00787000
  854. SLL R8,3 GET DEVICE CODE TIMES 8 00788000
  855. A R8,=A(DMKSYSOW) POINT TO CORRECT OWNED LIST ENTRY 00789000
  856. LH R8,OWNDRDEV-OWNDLIST(,R8) POINT TO RDEVLBOK 00790000
  857. SLL R8,3(0) CONVERT TO BYTE INDEX @V200820 00791000
  858. A R8,ARIODV --- 00792000
  859. BR R14 RETURN TO CALLER 00793000
  860. SPACE 3 00794000
  861. FINDREC EQU * HERE TO LOCATE THE PROPER RECORD ALLOCATION BLOK 00795000
  862. * AT ENTRY, GPR9 POINTS TO THE ALLOCATION CHAIN ANCHOR 00796000
  863. * AND GPR4 HAS THE CYLINDER NUMBER DESIRED -- 00797000
  864. L R6,RECPNT-RECBLOK(,R9) POINT TO NEXT BLOK ON CHAIN 00798000
  865. LTR R6,R6 IS THERE ONE ?? 00799000
  866. BNZ PGT5A YES-- 00800000
  867. ABEND 5 NO-- AARRRGGGHHHHH..... 00801000
  868. PGT5A EQU * 00802000
  869. SPACE 00803000
  870. CH R4,RECCYL IS THE BLOK FOR THIS CYLINDER ?? 00804000
  871. BCR 8,R14 YES -- EXIT TO CALLER 00805000
  872. LR R9,R6 SAVE BACK CHAIN 00806000
  873. B FINDREC AND KEEP LOOKING 00807000
  874. SPACE 3 00808000
  875. EMPTYCYL EQU * HERE TO DE-ALLOCATE AN EMPTY CYLINDER -- 00809000
  876. * AT ENTRY, GPR4 HAS THE CYLINDER TO DELETE -- 00810000
  877. * AND GPR6 AND 9 POINT TO CURRENT AND PREVIOUS BLOKS 00811000
  878. SPACE 00812000
  879. L R10,RDEVALLN GET POINTER TO ALOCBLOK 00813000
  880. LA R1,1 SET TENTATIVE DECREMENT 00814000
  881. LH R2,ALOCMAX GET NUMBER OF CYLINDERS 00815000
  882. SRL R2,1 DIVIDE BY 2 TO GET MIDDLE CYLINDER 00816000
  883. SPACE 2 00817000
  884. SR R2,R4 GET DISPLACEMENT FROM MIDDLE CYLINDER 00818000
  885. BP GETDISP IF DISPLACEMENT POSITIVE, BYPASS 00819000
  886. LPR R2,R2 FORCE POSITIVE DISPLACEMENT 00820000
  887. SR R1,R1 SET DECREMENT TO ZERO 00821000
  888. SPACE 2 00822000
  889. GETDISP EQU * CALCULATE BIT DISPLACEMENT IN MASK 00823000
  890. AR R2,R2 DOUBLE THE DISPLACEMENT FROM THE CENTER 00824000
  891. SR R2,R1 AND DECREMENT, IF NECESSARY 00825000
  892. SRDL R2,3 DIVIDE DISPLACEMENT BY 8 00826000
  893. SRL R3,29 AND SAVE REMAINDER 00827000
  894. IC R3,ALLOCTBL(R3) GET BIT MASK TO DE-ALLOCATE 00828000
  895. LA R1,ALOCMAP(R2) POINT TO BYTE TO TEST 00829000
  896. EX R3,TEST FIRST SEE IF CYLINDER IS ALLOCATED 00830000
  897. BO PGT6A IT HAD BETTER BE, 00831000
  898. ABEND 6 OR WE'RE IN TROUBLE 00832000
  899. PGT6A EQU * 00833000
  900. SPACE 00834000
  901. L R15,RECPNT GET POINTER TO NEXT BLOK ON LIST 00835000
  902. TM RDEVFLAG,RDEVPREF IS THIS A PREFERED VOLUME ? 00836000
  903. BZ UNCHAIN NO -- FREE THE CYLINDER 00837000
  904. LTR R15,R15 IF PREFERRED, UNCHAIN ONLY THE LAST BLOK 00838000
  905. BCR 7,R14 NOT THE LAST -- EXIT 00839000
  906. SPACE 00840000
  907. UNCHAIN EQU * HERE TO UNCHAIN THE BLOK AND DEALLOCATE 00841000
  908. EX R3,DEALLOC DE-ALLOCATE THE CYLINDER -- 00842000
  909. LH R3,ALOCUSED GET NUMBER OF CYLINDERS NOW IN USE -- 00843000
  910. BCTR R3,0 DECREMENT BY ONE 00844000
  911. STH R3,ALOCUSED AND SAVE 00845000
  912. TM RDEVFLAG,RDEVPREF IS THIS A PREFERED VOLUME ? @VA01097 00846000
  913. BO GETPNT YES - @VA01097 00847000
  914. SPACE 00848000
  915. L R1,DMKPGTTU GET NUMBER OF CYLINDERS INUSE 00849000
  916. BCTR R1,0 DECREMENT 00850000
  917. ST R1,DMKPGTTU AND SAVE 00851000
  918. C R1,DMKPGT90 LESS THAN 90 PERCENT IN USE ? 00852000
  919. BH GETPNT NO -- 00853000
  920. NI MSGSW,X'FF'-X'80' YES MAKE SURE MSG SWITCH IS OFF 00854000
  921. SPACE 00855000
  922. GETPNT EQU * 00856000
  923. ST R15,RECPNT-RECBLOK(,R9) UNCHAIN EMPTY BLOK 00857000
  924. LR R1,R6 GET POINTER TO EMPTY BLOK 00858000
  925. LA R0,RECSIZE GET ITS SIZE 00859000
  926. LR R3,R14 SAVE RETURN ADDRESS 00860000
  927. CALL DMKFRET RETURN THE BLOK TO FREE STORAGE 00861000
  928. BR R3 AND EXIT 00862000
  929. EJECT 00863000
  930. *. 00864000
  931. * SUBROUTINE NAME - 00865000
  932. * 00866000
  933. * DMKPGTCG - ALLOCATE CONTIGUOUS SPOOL AREA FOR 370X DUMP 00867000
  934. * 00868000
  935. * ENTRY CONDITIONS - 00869000
  936. * 00870000
  937. * GR0 = NUMBER OF SPOOL PAGES REQUESTED, MAX = 64 00871000
  938. * GR14 =RETURN ADDRESS 00872000
  939. * GR15 =ADDRESS OF DMKPGTCG 00873000
  940. * 00874000
  941. * EXIT CONDITIONS - 00875000
  942. * 00876000
  943. * GR0 = UNCHANGED 00877000
  944. * GR1 = COMPRESSED DASD ADDRESS OF FIRST PAGE ALLOCATED 00878000
  945. * GR8 = RDEVBLOK ADDRESS WHERE PAGES WERE ALLOCATED 00879000
  946. * OR 00880000
  947. * GR1 = 0 REQUESTED SPACE WAS NOT AVAILABLE 00881000
  948. * 00882000
  949. * CALLS TO OTHER ROUTINES - 00883000
  950. * 00884000
  951. * DMKFREE - TO BUILD RECBLOK'S FOR THE ALLOCATED CYLINDERS 00885000
  952. * DMKQCNWT - TO SEND WARNING MESSAGE IF TEMPSPACE FULL 00886000
  953. * DMKSTKCP - TO STACK CPEXBLOK FOR ABOVE CALL 00887000
  954. * 00888000
  955. * EXTERNAL REFERENCES - NONE 00889000
  956. * 00890000
  957. * TABLES / WORK AREAS - NONE 00891000
  958. * 00892000
  959. * REGISTER USAGE - 00893000
  960. * 00894000
  961. * GR14, 15 = WORK REGISTERS 00895000
  962. * GR13 = NUMBER OF CYLINDERS REQUIRED 00896000
  963. * GR12 = MODULE BASE REGISTER 00897000
  964. * GR11 = VMBLOK ADDRESSABILITY 00898000
  965. * GR10 = ALOCBLOK ADDRESSABILITY 00899000
  966. * GR9 = WORK REGISTER 00900000
  967. * GR8 = RDEVBLOK ADDRESSABILITY 00901000
  968. * GR7 = WORK REGISTER 00902000
  969. * GR6 = RECBLOK ADDRESSABILITY 00903000
  970. * GR0-5 = WORK REGISTERS 00904000
  971. * 00905000
  972. * NOTES - 00906000
  973. * 00907000
  974. * DMKPGTCG WILL ONLY ALLOCATE CONTIGUOUS AREAS WHICH FALL 00908000
  975. * IN THE CORRECT POSITION WITHIN AN ALOCMAP BYTE. THIS MAY 00909000
  976. * RESULT IN FALSE INDICATIONS OF NO AVAILABLE SPACE UNDER 00910000
  977. * CERTAIN CONDITIONS, BUT THIS SHOULD NOT BE A SIGNIFICANT 00911000
  978. * PERCENTAGE OF THE POSSIBLE SITUATIONS. (P < .05) 00912000
  979. * 00913000
  980. * OPERATION - 00914000
  981. * 00915000
  982. * 1. FIND A REAL DEVICE BLOCK WHICH HAS AT LEAST THE 00916000
  983. * REQUESTED NUMBER OF CYLINDERS AVAILABLE. 00917000
  984. * 2. SCAN THE ALOCBLOK FOR THE DEVICE TO DETERMINE IF 00918000
  985. * THE REQUEST CAN BE SATISFIED. IF NOT, REPEAT FROM 00919000
  986. * STEP 1. 00920000
  987. * 3. MARK THE CHOSEN CYLINDERS AS ALLOCATED, BUILD THE 00921000
  988. * 'CCPD' TO RETURN TO THE CALLER IN GR1. 00922000
  989. * 4. BUILD THE RECBLOK'S FOR THE ALLOCATED CYLINDERS 00923000
  990. * AND CHAIN THEM INTO THE RECBLOK CHAIN. 00924000
  991. * 5. CHECK TO SEE IF EITHER 90 PERCENT OF TEMP SPACE HAS 00925000
  992. * BEEN USED, OR IF ALL OF TEMPSPACE HAS BEEN USED. 00926000
  993. * IF YES, STACK A CPEXBLOK TO WARN THE SYSTEM OPERATOR. 00927000
  994. * 6. PASS RDEVBLOK ADDRESS AND 'CCPD' BACK TO CALLER, EXIT. 00928000
  995. *. 00929000
  996. SPACE 3 00930000
  997. ENTRY DMKPGTCG @V200820 00931000
  998. USING DMKPGTCG,R15 @V200820 00932000
  999. DMKPGTCG DS 0D ALLOCATE CONTIGUOUS DASD SPOOL SPACE @V200820 00933000
  1000. STM R0,R15,BALRSAVE @V200820 00934000
  1001. L R12,=A(DMKPGT) @V200820 00935000
  1002. DROP R15 @V200820 00936000
  1003. USING DMKPGT,R12 @V200820 00937000
  1004. SPACE 00938000
  1005. LTR R3,R0 KICK OUT INVALID REQUESTS @V200820 00939000
  1006. BNP CONFAIL @V200820 00940000
  1007. CH R3,=H'64' . . . @V200820 00941000
  1008. BH CONFAIL @V200820 00942000
  1009. LA R4,DMKPGTT5-4 ALLOCATE ON SPOOL DISKS ONLY @V200820 00943000
  1010. CONEXTT EQU * NEXT DEVICE TYPE FOR ALLOCATION @V200820 00944000
  1011. LA R4,4(0,R4) . . . @V200820 00945000
  1012. L R8,0(0,R4) FIRST RDEVBLOK ON THIS CHAIN @V200820 00946000
  1013. LTR R8,R8 @V200820 00947000
  1014. BP CONXTDV FOUND AN RDEVBLOK @V200820 00948000
  1015. BZ CONEXTT TRY THE NEXT DEVICE TYPE @V200820 00949000
  1016. B CONFAIL RAN OUT OF TYPES TO TRY @V200820 00950000
  1017. CONEXTD EQU * NEXT DEVICE OF THE SAME TYPE @V200820 00951000
  1018. L R8,RDEVPNT . . . @V200820 00952000
  1019. CL R8,0(0,R4) WRAP AROUND TO THE START ? @V200820 00953000
  1020. BE CONEXTT YES -- NEXT DEVICE TYPE @V200820 00954000
  1021. CONXTDV EQU * @V200820 00955000
  1022. LA R7,57(0) PAGES / CYLINDER FOR 3330 @V200820 00956000
  1023. CLI RDEVTYPE,TYP3330 . . . @V200820 00957000
  1024. BE CONNCYL @V200820 00958000
  1025. LA R7,120(0) PAGES / CYLINDER FOR 3350 @V304498 00959000
  1026. CLI RDEVTYPE,TYP3350 . . . @V304498 00960000
  1027. BE CONNCYL @V304498 00961000
  1028. LA R7,96(0) Pages / cylinder for 3375 HRC106DK 00961100
  1029. CLI RDEVTYPE,TYP3375 . . . HRC106DK 00961200
  1030. BE CONNCYL HRC106DK 00961300
  1031. LA R7,150(0) Pages / cylinder for 3380 HRC106DK 00961400
  1032. CLI RDEVTYPE,TYP3380 . . . HRC106DK 00961500
  1033. BE CONNCYL HRC106DK 00961600
  1034. LA R7,32(0) PAGES / CYLINDER FOR 2314 @V200820 00962000
  1035. CLI RDEVTYPE,TYP2314 . . . @V200820 00963000
  1036. BE CONNCYL @V200820 00964000
  1037. LA R7,24(0) PAGES / CYYLINDER FOR 2305/3340 @V2A2029 00965000
  1038. CLI RDEVTYPE,TYP3340 . . . @V2A2029 00966000
  1039. BE CONNCYL @V2A2029 00967000
  1040. CLI RDEVTYPE,TYP2305 . . . @V200820 00968000
  1041. BNE CONEXTT TRY NEXT DEVICE TYPE @V200820 00969000
  1042. CONNCYL EQU * CALCULATE NUMBER OF CYLINDERS @V200820 00970000
  1043. SLR R2,R2 @V200820 00971000
  1044. L R3,BALR0 NUMBER OF PAGES REQUESTED @V200820 00972000
  1045. DR R2,R7 DIVIDE BY PAGES / CYLINDER @V200820 00973000
  1046. LTR R2,R2 REMAINDER ? @V200820 00974000
  1047. BZ *+8 NO -- @V200820 00975000
  1048. LA R3,1(0,R3) BUMP NUMBER OF CYLINDERS @V200820 00976000
  1049. LA R6,0(R3,R3) GR6 = INDEX TO MASK BYTES @V200820 00977000
  1050. LA R6,CONMASK-2(R6) POINT TO THE CORRECT MASKS @V200820 00978000
  1051. L R10,RDEVALLN ALOCBLOK FOR THIS DEVICE @V200820 00979000
  1052. LH R9,ALOCMAX MAXIMUM NUMBER OF AVAILABLE CYLS @V200820 00980000
  1053. SH R9,ALOCUSED CHECK FOR ENOUGH REMAINING @V200820 00981000
  1054. BNP CONEXTD NOPE - NEXT DEVICE, SAME TYPE @V200820 00982000
  1055. CR R9,R3 ENOUGH TO FULFILL REQUEST ? @V200820 00983000
  1056. BL CONEXTD NOPE - NEXT DEVICE, SAME TYPE @V200820 00984000
  1057. LH R9,ALOCMAX MAXIMUM CYLINDERS AGAIN @V200820 00985000
  1058. SRL R9,3(0) CONVERT TO BYTE INDEX LIMIT @V200820 00986000
  1059. TM ALOCMAX+1,X'07' EVEN NUMBER OF BYTES IN MAP @V200820 00987000
  1060. BNZ *+6 NO -- O.K. AS IS @V200820 00988000
  1061. BCTR R9,0 STOP SHORT OF CYLINDER ZERO @V200820 00989000
  1062. LA R10,ALOCMAP POINT TO FIRST MAP BYTE @V200820 00990000
  1063. CONCYLF EQU * FIND THE UNUSED CYLINDERS @V200820 00991000
  1064. SR R0,R0 EVEN / ODD INDICATOR @V200820 00992000
  1065. IC R1,0(0,R6) PICK UP EVEN-BIT MASK @V200820 00993000
  1066. EX R1,TESTCYL TEST FOR UNUSED CYLINDERS @V200820 00994000
  1067. BZ CONFCYL FOUND THEM @V200820 00995000
  1068. LA R0,1(0) NOW TRY THE ODD BITS @V200820 00996000
  1069. IC R1,1(0,R6) . . . @V200820 00997000
  1070. EX R1,TESTCYL @V200820 00998000
  1071. BZ CONFCYL FOUND THEM @V200820 00999000
  1072. LA R10,1(0,R10) NEXT BYTE IN THE MAP @V200820 01000000
  1073. BCT R9,CONCYLF KEEP LOOKING @V200820 01001000
  1074. B CONEXTD NEXT DEVICE OF THE SAME TYPE @V200820 01002000
  1075. CONFCYL EQU * ALLOCATE OUR CYLINDERS @V200820 01003000
  1076. EX R1,TAKECYL MARK CYLINDERS IN USE @V200820 01004000
  1077. L R9,RDEVALLN RECOVER ALOCBLOK BASE ADDRESS @VM08819 01005000
  1078. LH R15,ALOCUSED-ALOCBLOK(,R9) NO. CYLS USED @VM08819 01006000
  1079. AR R15,R3 . . .WE TOOK THIS MANY @VM08819 01007000
  1080. STH R15,ALOCUSED-ALOCBLOK(,R9) NEW CYLS USED @VM08819 01008000
  1081. LH R5,ALOCMAX-ALOCBLOK(,R9) MAX. CYLINDER NUMBER @V200820 01009000
  1082. SRL R5,1(0) COMPUTE MIDDLE CYLINDER NUMBER @V200820 01010000
  1083. LA R9,ALOCMAP-ALOCBLOK(,R9) POINT TO START OF MAP @V200820 01011000
  1084. SR R10,R9 GR10 = DISPLACEMENT TO BYTE USED @V200820 01012000
  1085. SLL R10,2(0) . . .TIMES FOUR @VM08562 01013000
  1086. LTR R0,R0 EVEN BIT OR ODD BIT USED ? @V200820 01014000
  1087. BZ CONZGIN EVEN - OK AS IT IS @VM08562 01015000
  1088. LNR R10,R10 MAKE DISPLACEMENT NEGATIVE @V200820 01016000
  1089. SR R5,R3 R5 = LOWEST CYL USED. @VA01668 01017000
  1090. CONZGIN EQU * @VM08562 01018000
  1091. AR R5,R10 GR5 = CYLINDER NO. FOR BIT ZERO @V200820 01019000
  1092. STH R5,BALR1 BUILD 'CCPD' FOR THE CALLER @V200820 01020000
  1093. MVI BALR1+2,X'01' START AT PAGE ONE ON CYLINDER @V200820 01021000
  1094. LH R0,RDEVCODE @V200820 01022000
  1095. STC R0,BALR1+3 SET DEVICE CODE IN BALR1 @V200820 01023000
  1096. ST R8,BALR8 PASS BACK THE RDEVBLOK ADDRESS @V200820 01024000
  1097. LR R13,R3 NUMBER OF CYLINDERS USED @V200820 01025000
  1098. LR R4,R2 SAVE REMAINDER FROM DIVIDE @V200820 01026000
  1099. LR R6,R5 GR6 = FIRST CYLINDER USED @V200820 01027000
  1100. LA R3,4(0,0) GR3 = RDEVRECS INDEX @V200820 01028000
  1101. CONRBLD EQU * BUILD AND CHAIN RECBLOK'S @V200820 01029000
  1102. L R10,RDEVALLN ALOCBLOK POINTER ONCE MORE @V200820 01030000
  1103. LH R5,ALOCMAX CALCULATE MIDDLE CYLINDER @V200820 01031000
  1104. SRL R5,1(0) . . . @V200820 01032000
  1105. SR R5,R6 GR5 = DISPLACEMENT FROM CENTER @V200820 01033000
  1106. LPR R5,R5 FORCE POSITIVE @V200820 01034000
  1107. BAL R10,GETCORE BUILD AND CHAIN ONE RECBLOK @VM08534 01035000
  1108. BCT R13,CONFULL BRANCH IF FULL CYLINDER USED @V200820 01036000
  1109. LTR R4,R4 WAS THERE A REMAINDER ? @V200820 01037000
  1110. BNZ *+8 YES - NOT QUITE FULL CYLINDER @V200820 01038000
  1111. IC R4,RECMAX THIS ONE IS ALSO FULL @V200820 01039000
  1112. STC R4,RECUSED SET THE NUMBER OF PAGES USED @V200820 01040000
  1113. SLR R14,R14 CLEAR TWO REGS @V200820 01041000
  1114. SLR R15,R15 @V200820 01042000
  1115. ICM R14,8,=X'80' GET A HIGH-ORDER ONE BIT @V200820 01043000
  1116. BCTR R4,0 DECREMENT RECORD COUNT @V200820 01044000
  1117. CLM R4,B'0001',PAGE63 COUNT GREATER THAN 63 PAGES @V304498 01045000
  1118. BH OVFL64PG YES, EXTEND ALLOCATION @V304498 01046000
  1119. SRDA R14,0(R4) SHIFT TO PROPAGATE BITS @V200820 01047000
  1120. O R14,RECMAP ALLOCATE THE PAGES @V200820 01048000
  1121. O R15,RECMAP+4 . . . @V200820 01049000
  1122. STM R14,R15,RECMAP @V200820 01050000
  1123. CONEXIT EQU * @V200820 01051000
  1124. LM R0,R15,BALRSAVE RESTORE REGISTERS @V200820 01052000
  1125. BR R14 RETURN TO CALLER @V200820 01053000
  1126. OVFL64PG MVC RECMAP(8),FFS Propagate first 64 bits HRC106DK 01054100
  1127. S R4,=F'64' Determine middle (127-64) HRC106DK 01054200
  1128. CLM R4,B'0001',PAGE63 Count still > than 63 Pages? HRC106DK 01054300
  1129. BH OVF128PG Yes, extend allocation again HRC106DK 01054400
  1130. SRDA R14,0(R4) SHIFT TO PROPAGATE BITS @V304498 01055000
  1131. O R14,RECMAP+8 ALLOCATE THE BITS @V304498 01056000
  1132. O R15,RECMAP+12 . . . @V304498 01057000
  1133. STM R14,R15,RECMAP+8 . . . @V304498 01058000
  1134. B CONEXIT RESTORE REGISTERS @V304498 01060000
  1135. OVF128PG MVC RECMAP+8(8),FFS Propagate middle 64 bits HRC106DK 01060100
  1136. S R4,=F'64' Determine remainder (191-128) HRC106DK 01060200
  1137. SRDA R14,0(R4) Shift to propagate bits HRC106DK 01060300
  1138. O R14,RECMAP+16 Allocate the bits HRC106DK 01060400
  1139. O R15,RECMAP+20 . . . HRC106DK 01060500
  1140. STM R14,R15,RECMAP+16 . . . HRC106DK 01060600
  1141. B CONEXIT Restore registers HRC106DK 01060700
  1142. SPACE 01061000
  1143. CONFULL EQU * THIS CYLINDER IS COMPLETELY USED @V200820 01062000
  1144. IC R0,RECMAX MAXIMUM NUMBER OF PAGES @V200820 01063000
  1145. STC R0,RECUSED THEY ARE ALL IN USE @V200820 01064000
  1146. MVI RECMAP,X'FF' FILL IN RECMAP @V304498 01065000
  1147. MVC RECMAP+1(15),RECMAP PROPAGATE FOR 124 PAGES @V304498 01066000
  1148. MVC RECMAP+1(23),RECMAP Propagate for 188 pages HRC106DK 01066100
  1149. SLR R7,R7 .. @VM01056 01067000
  1150. IC R7,RECMAX GR7 = PAGES / CYLINDER @VM01056 01068000
  1151. LH R6,RECCYL CYLINDER FOR THIS RECBLOK @V200820 01069000
  1152. LA R6,1(0,R6) ADD ONE FOR NEXT CYLINDER USED @V200820 01070000
  1153. B CONRBLD GO BUILD ANOTHER RECBLOK @V200820 01071000
  1154. SPACE 01072000
  1155. CONFAIL EQU * TEMPSPACE IS NOT AVAILABLE @V200820 01073000
  1156. SLR R1,R1 @V200820 01074000
  1157. ST R1,BALR1 PASS CODE BACK TO CALLER @V200820 01075000
  1158. B CONEXIT . . . @V200820 01076000
  1159. SPACE 01077000
  1160. TESTCYL TM 0(R10),*-* EXECUTED TO FIND CYLINDERS @V200820 01078000
  1161. TAKECYL OI 0(R10),*-* EXECUTED TO ALLOCATE CYLINDERS @V200820 01079000
  1162. SPACE 01080000
  1163. CONMASK DC X'8040' EVEN / ODD MASKS FOR 1 CYLINDER @V200820 01081000
  1164. DC X'A050' FOR 2 CYLINDERS @V200820 01082000
  1165. DC X'A854' FOR 3 CYLINDERS @V200820 01083000
  1166. DC X'AA55' FOR 4 CYLINDERS @V200820 01084000
  1167. PAGE63 DC X'3F' CONSTANT - 63 PAGES @V304498 01085000
  1168. EJECT 01086000
  1169. *. 01087000
  1170. * 01088000
  1171. * SUBROUTINE NAME - 01089000
  1172. * 01090000
  1173. * DMKPGTVG 01091000
  1174. * 01092000
  1175. * FUNCTION - 01093000
  1176. * 01094000
  1177. * TO ALLOCATE A PAGE OF VIRTUAL STORAGE SPACE BELONGING 01095000
  1178. * TO THE CP PAGING VMBLOK 01096000
  1179. * 01097000
  1180. * ATTRIBUTES - 01098000
  1181. * 01099000
  1182. * SERIALLY REUSABLE, RESIDENT, CALLED VIA SVC 01100000
  1183. * 01101000
  1184. * ENTRY POINTS - 01102000
  1185. * 01103000
  1186. * DMKPGTVG 01104000
  1187. * 01105000
  1188. * ENTRY CONDITIONS - 01106000
  1189. * 01107000
  1190. * GPR12 = DMKPGTVG BASE ADDRESS 01108000
  1191. * GPR13 = ADDRESS OF STANDARD SAVEAREA 01109000
  1192. * 01110000
  1193. * EXIT CONDITIONS - 01111000
  1194. * 01112000
  1195. * NORMAL - 01113000
  1196. * CALLER'S GPR1 CONTAINS THE ADDRESS OF THE VIRTUAL PAGE 01114000
  1197. * THAT IS ALLOCATED 01115000
  1198. * 01116000
  1199. * ERROR - 01117000
  1200. * NONE 01118000
  1201. * 01119000
  1202. * CALLS TO OTHER ROUTINES - 01120000
  1203. * 01121000
  1204. * NONE 01122000
  1205. * 01123000
  1206. * EXTERNAL REFERENCES - 01124000
  1207. * 01125000
  1208. * NONE 01126000
  1209. * 01127000
  1210. * TABLES / WORKAREAS - 01128000
  1211. * 01129000
  1212. * PAGETABL IS AN ALLOCATION TABLE CONTAINING 640 BITS, 1 BYTE 01130000
  1213. * FOR EACH PAGE (DEPENDENT ON DMKPGTBN) AVAILABLE TO 01131000
  1214. * DMKPGTVG FOR ALLOCATION. IT IS REFERENCED AND UPDATED 01132000
  1215. * DURING ALLOCATION. 01133000
  1216. * 01134000
  1217. * DMKPGTBN IS A ONE BYTE COUNTER CONTAINING THE NUMBER 01135000
  1218. * OF BYTES (1 BYTE EQUALS 8 PAGES) IN PAGETABL TO BE USED FOR 01136000
  1219. * ALLOCATION. THIS COUNTER IS INITIALIZED TO 16 (128 PAGES) FOR 01137000
  1220. * REAL STORAGE SIZE OF 256K TO 655,360 BYTES. 01138000
  1221. * DMKCPI WILL MODIFY DMKPGTBN TO 40 (320 PAGES) FOR REAL 01139000
  1222. * STORAGE OF 655,361 TO 1.1MEG AND TO 80 (640 PAGES) 01140000
  1223. * FOR REAL STORAGE OVER 1.1MEG. 01141000
  1224. * 01142000
  1225. * NOTE - REAL STORAGE SIZE REFERS TO THE LOWEST VALUE 01143000
  1226. * VM SYSGEN SIZE VALUE OR REAL MACHINE STORAGE VALUE. 01144000
  1227. * 01145000
  1228. * REGISTER USAGE - 01146000
  1229. * 01147000
  1230. * GPR0,1 ARE WORK REGISTERS 01148000
  1231. * GPR2 = FUNCTION REGISTER FOR TRT 01149000
  1232. * GPR3,4 ARE WORK REGISTERS 01150000
  1233. * GPR5-11 ARE NOT USED 01151000
  1234. * GPR12 = DMKPGT BASE REGISTER 01152000
  1235. * GPR13 = ADDRESS OF STANDARD SAVEAREA 01153000
  1236. * GPR14,15 USED FOR BALR LINKAGE 01154000
  1237. * 01155000
  1238. * NOTES - 01156000
  1239. * 01157000
  1240. * NONE 01158000
  1241. * 01159000
  1242. * OPERATION - 01160000
  1243. * 01161000
  1244. * 1. PAGETABL IS SCANNED FOR A ZERO BIT. IF NO BITS ARE 01162000
  1245. * ARE ZERO, GO TO STEP 4; OTHERWISE, CONTINUE 01163000
  1246. * 01164000
  1247. * 2. MARK THE PAGE AS ALLOCATED BY SETTING THE BIT TO ONE 01165000
  1248. * 01166000
  1249. * 3. COMPUTE THE PAGE ADDRESS AND PASS IT BACK TO THE CALLER 01167000
  1250. * 01168000
  1251. *. 01169000
  1252. EJECT 01170000
  1253. ENTRY DMKPGTVG 01171000
  1254. USING DMKPGTVG,R15 @V304498 01172000
  1255. DMKPGTVG STM R0,R15,BALRSAVE ENTER AND SAVE REGS 01173000
  1256. L R12,=A(DMKPGT) STANDARD ADDRESSABILITY 01174000
  1257. DROP R15 01175000
  1258. USING DMKPGT,R12 01176000
  1259. SR R2,R2 CLEAR FUNCTION REGISTER FOR TRT 01177000
  1260. SR R4,R4 CLEAR COUNT REG @VA00919 01178000
  1261. IC R4,DMKPGTBN GET BUFFER NUMBER/8 VALUE @VA00919 01179000
  1262. BCT R4,*+10 COUNT -1 FOR TRT EXECUTE @VA00919 01180000
  1263. EXTRT TRT PAGETABL(0),FREETABL LOOK FOR AN UNUSED BUFFER @VA00919 01181000
  1264. EX R4,EXTRT EXEUTE TRT INSTRUCTION @VA00919 01182000
  1265. BNZ PGT8A GOOD IF WE HAVE ONE. @VA01261 01183000
  1266. ABEND 8 ABEND - NO VIRTUAL PAGE BUFFERS. @VA01261 01184000
  1267. PGT8A EQU * @VA01261 01185000
  1268. IC R3,ALLOCTBL-1(R2) GET BIT MASK TO MARK PAGE 01186000
  1269. * AS NOT AVAILABLE 01187000
  1270. EX R3,ALLOCATE AND DO IT 01188000
  1271. S R1,=A(PAGETABL) DISPLACEMENT OF BYTE IN PAGETABLE 01189000
  1272. SLL R1,3 MULTIPLY BY 8 FOR PAGE NUMBER 01190000
  1273. * R2 CONTAINS A VALUE 1 - 8 01191000
  1274. ALR R1,R2 GET PAGE NUMBER WITHIN 256K BLOCK 01192000
  1275. SLL R1,12 GET PAGE ADDRESS 01193000
  1276. AL R1,=A(DMKCKP) GET START OF SYSTEM'S VIRTUAL MEMORY 01194000
  1277. LTR R1,R1 SET CONDITION CODE 01195000
  1278. ST R1,BALR1 PASS BACK ADDRESS OF PAGE 01196000
  1279. B EXIT AND EXIT 01197000
  1280. EJECT 01198000
  1281. *. 01199000
  1282. * 01200000
  1283. * SUBROUTINE NAME - 01201000
  1284. * 01202000
  1285. * DMKPGTVR 01203000
  1286. * 01204000
  1287. * FUNCTION - 01205000
  1288. * 01206000
  1289. * TO RELEASE A PAGE OF VIRTUAL MEMORY SPACE 01207000
  1290. * 01208000
  1291. * ATTRIBUTES - 01209000
  1292. * 01210000
  1293. * SERIALLY REUSABLE, RESIDENT, CALLED VIA SVC 01211000
  1294. * 01212000
  1295. * ENTRY POINTS - 01213000
  1296. * 01214000
  1297. * DMKPGTVR 01215000
  1298. * 01216000
  1299. * ENTRY CONDITIONS - 01217000
  1300. * 01218000
  1301. * GPR1 = ADDRESS OF VIRTUAL PAGE TO BE RELEASED 01219000
  1302. * GPR12 = DMKPGTVR BASE REGISTER 01220000
  1303. * GPR14 = ADDRESS OF STANDARD SAVEAREA 01221000
  1304. * 01222000
  1305. * EXIT CONDITIONS - 01223000
  1306. * 01224000
  1307. * NORMAL - 01225000
  1308. * PAGETABL IS UPDATED 01226000
  1309. * 01227000
  1310. * ERROR - 01228000
  1311. * NONE 01229000
  1312. * 01230000
  1313. * CALLS TO OTHER ROUTINES - 01231000
  1314. * 01232000
  1315. * NONE 01233000
  1316. * 01234000
  1317. * EXTERNAL REFERENCES - 01235000
  1318. * 01236000
  1319. * NONE 01237000
  1320. * 01238000
  1321. * TABLES / WORKAREAS - 01239000
  1322. * 01240000
  1323. * PAGETABL IS UPDATED TO REFLECT THE AVAILABILITY OF THE 01241000
  1324. * RELEASED PAGE, UNLESS IT HAS BEEN ASSIGNED TO A DEFERED 01242000
  1325. * REQUEST 01243000
  1326. * 01244000
  1327. * REGISTER USAGE - 01245000
  1328. * 01246000
  1329. * GPR0-4 ARE WORK REGISTERS 01247000
  1330. * GPR5-11 ARE NOT USED 01248000
  1331. * GPR12 = DMKPGT BASE REGISTER 01249000
  1332. * GPR13 = ADDRESS OF STANDARD SAVEAREA 01250000
  1333. * GPR14,15 ARE USED FOR BALR LINKAGE AND RETURN 01251000
  1334. EJECT 01252000
  1335. * 01253000
  1336. * NOTES - 01254000
  1337. * 01255000
  1338. * NONE 01256000
  1339. * 01257000
  1340. * OPERATION - 01258000
  1341. * 01259000
  1342. * 1. VERIFY THAT PAGE TO BE DE-ALLOCATED IS IN FACT ALLOCATED 01260000
  1343. * 01261000
  1344. * 2. IF ANY DEFERED REQUESTS ARE QUEUED FROM VPAGQST, GO TO 01262000
  1345. * STEP 5; OTHERWISE, CONTINUE 01263000
  1346. * 01264000
  1347. * 3. LOCATE THE BIT THAT REPRESENTS THE PAGE BEING DEALLOCATED, 01265000
  1348. * AND SET IT ZERO 01266000
  1349. * 01267000
  1350. * 4. RETURN TO CALLER 01268000
  1351. * 01269000
  1352. *. 01270000
  1353. EJECT 01271000
  1354. ENTRY DMKPGTVR 01272000
  1355. USING *,R15 01273000
  1356. DMKPGTVR STM R0,R15,BALRSAVE ENTER AND STORE REGS 01274000
  1357. L R12,=A(DMKPGT) STANDARD ADDRESSABILITY 01275000
  1358. DROP R15 01276000
  1359. USING DMKPGT,R12 01277000
  1360. SPACE 01278000
  1361. LR R4,R1 SAVE PAGE ADDRESS 01279000
  1362. SL R1,=A(DMKCKP+4096) GET START OF SYSTEM'S VIRTUAL MEMORY 01280000
  1363. LR R2,R1 SET FOR DOUBLE REGISTER SHIFT 01281000
  1364. SRDL R2,15 GET PAGE NUMBER/8 01282000
  1365. SRL R3,29 AND REMAINDER 01283000
  1366. IC R3,ALLOCTBL(R3) GET BIT MASK FOR ALLOCATED PAGE 01284000
  1367. LA R1,PAGETABL(R2) POINT TO CORRECT BYTE TO TEST 01285000
  1368. EX R3,TEST AND SEE IF PAGE IS ALLOCATED 01286000
  1369. BNZ PGT7A PAGE IN USE -- 01287000
  1370. ABEND 7 TRYING TO DE-ALLOCATE PAGE NOT IN USE 01288000
  1371. PGT7A EQU * 01289000
  1372. EX R3,DEALLOC DE-ALLOCATE THE PAGE BUFFER @VA01261 01290000
  1373. EXIT LM R0,R15,BALRSAVE RESTORE REGS 01291000
  1374. BR R14 AND EXIT TO CALLER 01292000
  1375. EJECT 01293000
  1376. ****************************** 01294000
  1377. * 01295000
  1378. * CONSTANTS, TABLES AND EXECUTED INSTRUCTIONS -- 01296000
  1379. * 01297000
  1380. ****************************** 01298000
  1381. SPACE 3 01299000
  1382. RECOMP CLI RECMAX,0 EXECUTED TO SEE IF ANY PAGES IN THE 01300000
  1383. * REFERENCED BLOK ARE AVAILABLE 01301000
  1384. SPACE 01302000
  1385. GETCYL TRT ALOCMAP(*-*),FREETABL EXECUTED TO LOCATE AN UNUSED 01303000
  1386. * CYLINDER IN AN ALOCBLOK 01304000
  1387. SPACE 01305000
  1388. ALLOCATE OI 0(R1),0 EXECUTED TO MARK A PAGE OR CYLINDER 01306000
  1389. * ALLOCATED (IE, SET BIT = 1) 01307000
  1390. SPACE 01308000
  1391. TESTODD TM FREETABL,0 EXECUTED TO SEE IF THE NUMBER IN THE 01309000
  1392. * EXECUTION REGISTER IS ODD (IF IT IS, 01310000
  1393. * THE TM WILL RETURN A CONDITION CODE OF 1) 01311000
  1394. SPACE 01312000
  1395. TEST TM 0(R1),0 EXECUTED TO TEST IF THE PAGE OR CYLINDER 01313000
  1396. * THAT IS ABOUT TO BE DE-ALLOCATED HAS 01314000
  1397. * BEEN ALLOCATED (IF IT HAS, THE TM WILL 01315000
  1398. * RETURN A CONDITION CODE OF 1) 01316000
  1399. SPACE 01317000
  1400. DEALLOC XI 0(R1),0 EXECUTED TO DE-ALLOCATE THE ALLOCATED 01318000
  1401. * PAGE OR CYLINDER (IE, SET BIT = 0) 01319000
  1402. SPACE 01320000
  1403. FREETABL EQU * TRT FUNCTION TABLE USED TO LOCATE THE RELATIVE BIT 01321000
  1404. * POSITION OF THE FIRST ZERO BIT IN AN ALLOCATION MAP 01322000
  1405. DC 128X'01' FIRST BIT IS 0 01323000
  1406. DC 64X'02' SECOND BIT IS 0 01324000
  1407. DC 32X'03' AND SO ON -- 01325000
  1408. DC 16X'04' 01326000
  1409. DC 8X'05' 01327000
  1410. DC 4X'06' 01328000
  1411. DC 2X'07' 01329000
  1412. DC X'08' 01330000
  1413. DC X'00' NO BIT IS 0 -- 01331000
  1414. SPACE 01332000
  1415. ALLOCTBL EQU * BIT MAP TABLE WHOSE ENTRIES ARE LOCATED BY INDEXING 01333000
  1416. * WITH THE FUNCTION RETURNED IN GPR2 AFTER TRTING 01334000
  1417. * AGAINST FREETABL (ABOVE). EACH ENTRY CONTAINS THE 01335000
  1418. * BIT TO BE TURNED ON (OR OFF) BY EXECUTING ONE OF 01336000
  1419. * THE 'ALLOCATE' OR 'DEALLOC' INSTRUCTIONS ABOVE -- 01337000
  1420. DC X'8040201008040201' 01338000
  1421. SPACE 01339000
  1422. PAGETABL EQU * VIRTUAL PAGE ALLOCATION TABLE - EACH BIT REPRESENTS 01340000
  1423. * A PAGE OF VIRTUAL STORAGE BELONGING TO THE DUMMY 01341000
  1424. * USERTHAT CONTROLS CP PAGING 01342000
  1425. DC XL160'00' 1280 VIRTUAL PAGE MAX @VA06119 01343000
  1426. DMKPGTBN DC AL1(16) NUMBER OF VIRTUAL BUFFERS/8 (128 @VA00919 01344000
  1427. * DEFAULT VAULE - MODIFIED BY DMKCPI 01345000
  1428. EJECT 01346000
  1429. * PAGING AND SPOOLING ALLOCATION CHAIN ANCHORS 01347000
  1430. SPACE 01348000
  1431. DMKPGTP5 DC A(0) PREFERRED PAGING DEVICES - 2305 01349000
  1432. DMKPGTP0 DC A(0) PREFERRED PAGING DEVICES - 3330 01350000
  1433. DMKPGT4P DC A(0) PREFERRED PAGING DEVICES - 3340 @V2A2029 01351000
  1434. DMKPGT5P DC A(0) PREFERRED PAGING DEVICES - 3350 @VA08602 01352000
  1435. DMKPGT7P DC A(0) Preferred paging devices - 3375 HRC106DK 01352100
  1436. DMKPGT8P DC A(0) Preferred paging devices - 3380 HRC106DK 01352200
  1437. DMKPGTP4 DC A(0) PREFERRED PAGING DEVICES - 2314 01353000
  1438. SPACE 01354000
  1439. DMKPGTT5 DC A(0) GENERAL SPOOLING/PAGING DEVICES - 2305 01355000
  1440. DMKPGTT0 DC A(0) GENERAL SPOOLING/PAGING DEVICES - 3330 01356000
  1441. DMKPGT4T DC A(0) GENERAL SPOOLING/PAGING - 3340 @V2A2029 01357000
  1442. DMKPGT5T DC A(0) GENERAL SPOOLING/PAGING - 3350 @VA08602 01358000
  1443. DMKPGT7T DC A(0) General spooling/paging - 3375 HRC106DK 01358100
  1444. DMKPGT8T DC A(0) General spooling/paging - 3380 HRC106DK 01358200
  1445. DMKPGTT4 DC A(0) GENERAL SPOOLING/PAGING DEVICES - 2314 01359000
  1446. SPACE 01360000
  1447. DC F'-1' FENCE 01361000
  1448. SPACE 3 01362000
  1449. DMKPGTTU DC F'0' NUMBER OF TEMPORARY CYLINDERS IN USE 01363000
  1450. SPACE 01364000
  1451. DMKPGTTM DC F'0' MAXIMUM NUMBER OF CYLINDERS AVAILABLE 01365000
  1452. SPACE 01366000
  1453. DMKPGT90 DC F'0' 90 PERCENT OF AVAILABLE CYLINDERS 01367000
  1454. SPACE 3 01368000
  1455. MSGSW DC X'00' 01369000
  1456. UCTL DC X'00' USER STORAGE ALLOCATION FLAGS 01370000
  1457. UCTLDR EQU X'80' DO VMPDISK/VMPDRUM ACCOUNTING @VM01031 01371000
  1458. UCTLSYS EQU X'40' USE SYS VMBLOK FOR THE ACCOUNTING@VM01031 01372000
  1459. PAGE4 EQU X'10' 3350 CYLINDER 0 PAGE 4 SLOT @V304498 01373000
  1460. SPACE 3 01374000
  1461. * 01374400
  1462. DRMLIM DS 0H @V408246 01374600
  1463. DMKPGTDF DC XL2'0',H'0' DRUM LIMIT FLAGS AND COUNT @V408246 01374800
  1464. SPACE 2 01375000
  1465. LTORG 01376000
  1466. EJECT 01377000
  1467. COPY SAVE 01378000
  1468. COPY ALLOC 01379000
  1469. COPY CORE 01380000
  1470. COPY RBLOKS 01381000
  1471. PSA 01382000
  1472. COPY IOBLOKS 01383000
  1473. COPY VMBLOK 01384000
  1474. COPY DEVTYPES 01385000
  1475. COPY EQU 01386000
  1476. END 01387000