Table of Contents

DMSSSK Source

References

Source Listing

DMSSSK.ASSEMBLE.txt
  1. SSK TITLE 'DMSSSK (CMS) VM/370 - RELEASE 6' 00001000
  2. *. 00002000
  3. * MODULE NAME - 00003000
  4. * 00004000
  5. * DMSSSK 00005000
  6. * 00006000
  7. * FUNCTION - 00007000
  8. * 00008000
  9. * SET STORAGE PROTECT KEYS FOR A SPECIFIED SAVED SYSTEM 00009000
  10. * 00010000
  11. * ATTRIBUTES - 00011000
  12. * 00012000
  13. * DISK RESIDENT, EXECUTES IN THE TRANSIENT AREA 00013000
  14. * 00014000
  15. * ENTRY POINTS - 00015000
  16. * 00016000
  17. * DMSSSK 00017000
  18. * 00018000
  19. * ENTRY CONDITIONS - 00019000
  20. * 00020000
  21. * GPR 1 CONTAINS THE ADDRESS OF A PARAMETER LIST 00021000
  22. * CONTAINING THE FOLLOWING: 00022000
  23. * SETKEY - CL8'SETKEY' 00023000
  24. * KEY - STORAGE KEY (DEC 0 - 15) 00024000
  25. * NAME - SAVED SYSTEM NAME 00025000
  26. * STADR - START ADDRESS IN HEX (OPTIONAL) 00026000
  27. * X'FF' - FENCE 00027000
  28. * 00028000
  29. * EXIT CONDITIONS - 00029000
  30. * NORMAL 00030000
  31. * GPR 15 = 0 EXECUTION SUCCESSFUL 00031000
  32. * 00032000
  33. * ERROR 00033000
  34. * MESSAGES 00034000
  35. * DMSSSK070E INVALID PARAMETER ... GPR15=24 00035000
  36. * DMSSSK362E INVALID STORAGE PROTECT KEY ... GPR15=24 00036000
  37. * DMSSSK363E INVALID STARTING ADDRESS ... GPR15=24 00037000
  38. * DMSSSK364E VM STORAGE SIZE ERROR GPR15=24 00038000
  39. * DMSSSK365E SYSTEM NAME NOT SPECIFIED GPR15=24 00039000
  40. * DMSSSK400S SYSTEM ... DOES NOT EXIST GPR15=44 00040000
  41. * DMSSSK410S CP ERROR INDICATION ... GPR15=174 OR 171 00041000
  42. * 00042000
  43. * CALLS TO OTHER ROUTINES - 00043000
  44. * 00044000
  45. * DMSERR 00045000
  46. * 00046000
  47. * EXTERNAL REFERENCES - 00047000
  48. * 00048000
  49. * NONE 00049000
  50. * 00050000
  51. * TABLES / WORKAREAS - 00051000
  52. * 00052000
  53. * NONE 00053000
  54. * 00054000
  55. * REGISTER USAGE - 00055000
  56. * 00056000
  57. * NONE 00057000
  58. * 00058000
  59. * NOTES - 00059000
  60. * 00060000
  61. * NONE 00061000
  62. * 00062000
  63. * OPERATION - 00063000
  64. * 00064000
  65. * THIS MODULE WILL SET STORAGE PROTECT KEYS FOR A 00065000
  66. * BLOCK OF STORAGE OCCUPIED BY A SAVED SYSTEM. THE 00066000
  67. * STARTING ADDRESS MAY BE SPECIFIED BY THE CALLER AS 00067000
  68. * LONG AS IT FALLS WITHIN THE RANGE OF THE SYSTEM 00068000
  69. * LOAD EXTENTS. 00069000
  70. * 00070000
  71. * DMSSSK VALIDATES THE KEY ENTRY IN THE PARAMETER LIST 00071000
  72. * BY ENSURING THAT IT IS A ONE OR TWO DIGIT NUMBER 00072000
  73. * BETWEEN 0 AND 15. 00073000
  74. * 00074000
  75. * A FINDSYS IS THEN DONE FOR THE NAME PROVIDED WHICH 00075000
  76. * PROVIDES THE LOAD RANGE OF THE SAVED SYSTEM. 00076000
  77. * 00077000
  78. * IF AN ADDRESS HAS BEEN INCLUDED IN THE PARAMETER 00078000
  79. * LIST, IT IS CHECKED TO ENSURE THAT IT FALLS WITHIN 00079000
  80. * THE LOAD RANGE OF THE SAVED SYSTEM. 00080000
  81. * THE COMPLETE RANGE OF THE SAVED SYSTEM MUST ALSO 00081000
  82. * FALL WITHIN THE V.M. STORAGE SIZE. 00082000
  83. * 00083000
  84. * AN SSK INSTRUCTION IS THEN DONE FOR EACH 2048 BYTE 00084000
  85. * BLOCK IN THE RANGE SPECIFIED. 00085000
  86. *. 00086000
  87. EJECT 00087000
  88. DMSSSK CSECT @V305614 00088000
  89. SPACE 1 00089000
  90. USING *,R12 @V305614 00090000
  91. USING NUCON,R0 @V305614 00091000
  92. LR R12,R15 TRANSFER BASE @V305614 00092000
  93. LR R2,R1 GET NEW PLIST POINTER @V305614 00093000
  94. LA R2,8(,R2) POINT TO THE KEY ENTRY @V305614 00094000
  95. SPACE 1 00095000
  96. SR R3,R3 INITIALIZE KEY COUNT @V305614 00096000
  97. CLI 1(R2),X'40' ONE DIGIT KEY ? @V305614 00097000
  98. BNE TWODIG NO, BR @V305614 00098000
  99. CLI 0(R2),X'F9' MUST BE 9 OR LESS @V305614 00099000
  100. BH KEYERR ELSE ERROR @V305614 00100000
  101. B ONEDIG SKIP MAX CHECK @V305614 00101000
  102. SPACE 1 00102000
  103. TWODIG CLC 0(3,R2),MAXKEY CHECK FOR MAXIMUM POSSIBLE KEY @V305614 00103000
  104. BH KEYERR BR, IF INVALID KEY @V305614 00104000
  105. ONEDIG CLI 0(R2),X'F0' CAN'T BE LESS THAN 0 @V305614 00105000
  106. BL KEYERR ERROR IF SO @V305614 00106000
  107. SPACE 1 00107000
  108. CLI 1(R2),X'40' 2 DIGIT KEY ? @V305614 00108000
  109. BE KEYCVB NO, GO CONVERT TO BINARY @V305614 00109000
  110. CLI 1(R2),X'F0' THIS ONE HAS TO BE 0 TO 5 @V305614 00110000
  111. BL KEYERR ERROR IF NOT @V305614 00111000
  112. SPACE 1 00112000
  113. CLI 2(R2),X'40' 3RD CHARACTER MUST BE BLANK @V305614 00113000
  114. BNE KEYERR ELSE ERROR @V305614 00114000
  115. LA R3,1 INDICATE 2 DIGIT KEY @V305614 00115000
  116. SPACE 1 00116000
  117. KEYCVB LA R3,112(,R3) SET PACK L1 TO 7 @V305614 00117000
  118. EX R3,PACKEY PACK STORAGE KEY @V305614 00118000
  119. CVB R3,DECKEY GET BINARY STORAGE KEY @V305614 00119000
  120. SLL R3,4 MOVE KEY TO RIGHT PLACE FOR SSK @V305614 00120000
  121. SPACE 1 00121000
  122. LA R2,8(,R2) BUMP SCAN POINTER @V305614 00122000
  123. CLI 0(R2),X'FF' NAME PARAMETER SHOULD BE THERE @V305614 00123000
  124. BE NAMERR BR, IF NOT @V305614 00124000
  125. MVC SEGNAME(8),0(R2) GET PLIST SEGMENT NAME @V305614 00125000
  126. LA R4,SEGNAME POINT TO IT @V305614 00126000
  127. LA R5,12 INDICATE FINDSYS @V305614 00127000
  128. DC X'83450064' FINDSYS @V305614 00128000
  129. BC 2,FINDERR BR, IF UNSUCCESSFUL @V305614 00129000
  130. SPACE 1 00130000
  131. LA R2,8(,R2) BUMP SCAN POINTER @V305614 00131000
  132. CLI 0(R2),X'FF' WAS THAT ALL ? @V305614 00132000
  133. BE READY YES, TIME TO EXECUTE @V305614 00133000
  134. SR R6,R6 CLEAR THE ADDRESS BYTE REG @V305614 00134000
  135. SR R8,R8 AND THE RESULT REGISTER @V305614 00135000
  136. LR R9,R2 LOAD UP BYTE POINTER @V305614 00136000
  137. SPACE 1 00137000
  138. LOOP CLI 0(R9),X'40' IS THIS THE END ? @V305614 00138000
  139. BE ADRDONE YES, BR @V305614 00139000
  140. CLI 0(R9),X'FF' SHOULDN'T HAPPEN, BUT.. @V305614 00140000
  141. BE ADRDONE GO THROUGH THE MOTIONS @V305614 00141000
  142. SPACE 1 00142000
  143. IC R6,0(,R9) TAKE THE BYTE.. @V305614 00143000
  144. CLI 0(R9),C'0' COULD IT BE 'A'-'F' ? @V305614 00144000
  145. BL AFCHK YES, BR @V305614 00145000
  146. CLI 0(R9),C'9' IS IT > 9 ? @V305614 00146000
  147. BH ADRERR ERROR IF SO @V305614 00147000
  148. SPACE 1 00148000
  149. SH R6,CLR1 ..STRIP THE 'F'.. @V305614 00149000
  150. LOOP1 SLL R8,4 ..MAKE ROOM FOR THE DIGIT.. @V305614 00150000
  151. AR R8,R6 ..AND INSERT IT.. @V305614 00151000
  152. LA R9,1(,R9) POINT TO THE NEXT ONE @V305614 00152000
  153. B LOOP AND DO IT AGAIN @V305614 00153000
  154. SPACE 1 00154000
  155. AFCHK CLI 0(R9),C'A' HAS TO BE @V305614 00155000
  156. BL ADRERR IN 'A' TO 'F' @V305614 00156000
  157. CLI 0(R9),C'F' RANGE @V305614 00157000
  158. BH ADRERR ELSE ERROR @V305614 00158000
  159. SPACE 1 00159000
  160. SH R6,CLR2 'TRANSLATE' TO HEX @V305614 00160000
  161. B LOOP1 AND CONTINUE @V305614 00161000
  162. SPACE 1 00162000
  163. ADRDONE LA R6,1 MAKE SURE THE ADDRESS IS @V305614 00163000
  164. SLL R6,24 VALID @V305614 00164000
  165. CR R8,R6 CAN'T BE GREATER THAN 6 DIGITS @V305614 00165000
  166. BNL ADRERR ..... @V305614 00166000
  167. SPACE 1 00167000
  168. CR R8,R4 MUST NOT BE < FINDSYS START ADR @V305614 00168000
  169. BL ADRERR NOR @V305614 00169000
  170. CR R8,R5 GREATER THAN FINDSYS END ADR @V305614 00170000
  171. BH ADRERR ..... @V305614 00171000
  172. LR R4,R8 TRANSFER IF OK @V305614 00172000
  173. SPACE 1 00173000
  174. LA R2,8(,R2) BUMP SCAN POINTER @V305614 00174000
  175. CLI 0(R2),X'FF' NO MORE PARAMETERS @V305614 00175000
  176. BNE INVPARM ALLOWED @V305614 00176000
  177. SPACE 1 00177000
  178. READY EQU * @V305614 00178000
  179. C R5,VMSIZE MAKE SURE WE DON'T ISSUE SSK'S @V305614 00179000
  180. BH SIZERR OUTSIDE VIRTUAL STORAGE @V305614 00180000
  181. N R4,SSKSET STRIP BITS @V305614 00181000
  182. N R5,SSKSET NOT USED @V305614 00182000
  183. LA R6,2048 LOAD UP ADR INCREMENTER @V305614 00183000
  184. SPACE 1 00184000
  185. SSKLOOP CR R4,R5 PAST THE ENDING ADDRESS ? @V305614 00185000
  186. BH SSKDONE YES, BRANCH @VA05503 00186000
  187. SSK R3,R4 SET STORAGE KEY @V305614 00187000
  188. AR R4,R6 INCREMENT TARGET ADDRESS @V305614 00188000
  189. B SSKLOOP AND DO IT AGAIN @V305614 00189000
  190. SPACE 1 00190000
  191. SSKDONE SR R15,R15 SET ZERO RETURN CODE @V305614 00191000
  192. BR R14 AND RETURN TO CALLER @V305614 00192000
  193. SPACE 1 00193000
  194. KEYERR EQU * @V305614 00194000
  195. DMSERR NUM=362,LET=E,SUB=(CHARA,(R2)),TEXT='INVALID STORAGE PRX00195000
  196. OTECT KEY ''........''' @V305614 00196000
  197. LA R15,24 SET RETURN CODE 24 @V305614 00197000
  198. BR R14 AND RETURN TO CALLER @V305614 00198000
  199. SPACE 1 00199000
  200. FINDERR EQU * @V305614 00200000
  201. C R5,NONE NONEXISTENT SYSTEM ? @V305614 00201000
  202. BNE CPERR NO, BR @V305614 00202000
  203. DMSERR NUM=400,LET=S,SUB=(CHARA,(R2)),TEXT='SYSTEM ''........'X00203000
  204. ' DOES NOT EXIST' @V305614 00204000
  205. LR R15,R5 SHIFT RETURN CODE REGISTER @VM03156 00205000
  206. BR R14 RETURN TO CALLER @V305614 00206000
  207. SPACE 1 00207000
  208. CPERR DMSERR NUM=410,LET=S,SUB=(DEC,(R5)),TEXT='CONTROL PROGRAM ERROX00208000
  209. R INDICATION ''......''' @V305614 00209000
  210. LR R15,R5 SHIFT RETURN CODE REGISTERS @VM03156 00210000
  211. BR R14 RETURN TO CALLER @V305614 00211000
  212. SPACE 1 00212000
  213. ADRERR EQU * @V305614 00213000
  214. DMSERR NUM=363,LET=E,SUB=(CHARA,(R2)),TEXT='INVALID STARTING AX00214000
  215. DDRESS ''........''' @V305614 00215000
  216. LA R15,24 SET RETURN CODE 24 @V305614 00216000
  217. BR R14 AND RETURN TO CALLER @V305614 00217000
  218. SPACE 1 00218000
  219. INVPARM EQU * @V305614 00219000
  220. DMSERR NUM=070,LET=E,SUB=(CHARA,(R2)),TEXT='INVALID PARAMETER *00220000
  221. ''........''' @V305614 00221000
  222. LA R15,24 SET RETURN CODE 24 @V305614 00222000
  223. BR R14 AND RETURN TO CALLER @V305614 00223000
  224. SPACE 1 00224000
  225. SIZERR EQU * @V305614 00225000
  226. DMSERR NUM=364,LET=E,SUB=(HEX,(R4),HEX,(R5)),TEXT='V.M. STORAGX00226000
  227. E NOT LARGE ENOUGH TO CONTAIN SYSTEM LOADING AT ...... TX00227000
  228. O ......',RENT=NO @V305614 00228000
  229. LA R15,24 SET RETURN CODE 24 @V305614 00229000
  230. BR R14 AND RETURN TO CALLER @V305614 00230000
  231. SPACE 1 00231000
  232. NAMERR EQU * @V305614 00232000
  233. DMSERR NUM=365,LET=E,TEXT='SYSTEM NAME NOT SPECIFIED' @V305614 00233000
  234. LA R15,24 SET RETURN CODE 24 @V305614 00234000
  235. BR R14 AND RETURN TO CALLER @V305614 00235000
  236. SPACE 1 00236000
  237. PACKEY PACK DECKEY(*-*),0(*-*,R2) @V305614 00237000
  238. SPACE 1 00238000
  239. MAXKEY DC X'F1F540' MAXIMUM POSSIBLE KEY @V305614 00239000
  240. CLR1 DC H'240' =X'00F0' @V305614 00240000
  241. CLR2 DC H'183' =H'00B7' @V305614 00241000
  242. DECKEY DS 1D DECIMAL KEY CONVERSION AREA @V305614 00242000
  243. SEGNAME DS 1D SAVED SEGMENT NAME @V305614 00243000
  244. DS 0F @V305614 00244000
  245. SSKSET DC X'00FFF800' @V305614 00245000
  246. NONE DC F'44' CP RETURN FOR NONEXISTENT SYSTEM @V305614 00246000
  247. NUCON @V305614 00247000
  248. REGEQU @V305614 00248000
  249. END 00249000