User Tools

Site Tools


ibm:vm370-lib:cms:dmsres.assemble_src

DMSRES Source

References

Source Listing

DMSRES.ASSEMBLE.txt
  1. RES TITLE 'DMSRES - CMS RESIDENT CORE LIBRARY PROCESSOR' DMS00010
  2. *MODULE NAME - DMS00020
  3. * DMS00030
  4. * DMSRES DMS00040
  5. * DMS00050
  6. *FUNCTION - DMS00060
  7. * DMS00070
  8. * TO ASSIST A USER IN MAINTAINING A RESIDENT CORE LIBRARY. DMS00080
  9. * DMS00090
  10. *ENTRY POINTS - DMS00100
  11. * DMS00110
  12. * DMSRES DMS00120
  13. * DMS00130
  14. *ENTRY CONDITIONS - DMS00140
  15. * DMS00150
  16. * R1 - A(CMS PLIST) DMS00160
  17. * R13 - A(SAVE AREA) DMS00170
  18. * R14 - RETURN ADDRESS DMS00180
  19. * R15 - ENTRY POINT ADDRESS DMS00190
  20. * DMS00200
  21. *EXIT CONDITIONS - DMS00210
  22. * DMS00220
  23. * R15 - RETURN CODE: DMS00230
  24. * = 0 -> FUNCTION COMPLETED. DMS00240
  25. * > 0 -> FUNCTION NOT COMPLETED. DMS00250
  26. * DMS00260
  27. *MODULE ATTRIBUTES - DMS00270
  28. * DMS00280
  29. * TRASIENT AREA, SYSTEM KEY, SERIALLY REUSEABLE, CALLED VIA SVC DMS00290
  30. * 202 AS FOLLOWS: DMS00300
  31. * DMS00310
  32. * R1 -> DC CL8'RESLIB' DMS00320
  33. * DC CL8'ALLOCATE' (ALLOCATE PROTECTED STORAGE) DMS00330
  34. * DC CL8'<PAGES>' (NUMBER OF 4K PAGES TO ALLOCATE, MUS DMS00340
  35. * MUST BE 1 TO 256) DMS00350
  36. * DC CL8'(' (OPTION SEPARATOR) DMS00360
  37. * DC CL8'KEY <NN>' (STORAGE PKEY TO ASSIGN TO AREA) DMS00370
  38. * DC CL8'PERM' (PROTECT AGAINST DEL *) DMS00380
  39. * DC XL8'FF' DMS00390
  40. * DMS00400
  41. * R1 -> DC CL8'RESLIB' DMS00410
  42. * DC CL8'DELETE' (DELETE PREVIOUS ALLOC OR LOAD) DMS00420
  43. * DC CL8'<ID | *> (ALLOCATE OR LOAD ID. IF *, THEN DMS00430
  44. * DELETE ALL BUT PERM SPACE) DMS00440
  45. * DC XL8'FF' DMS00450
  46. EJECT DMS00460
  47. * R1 -> DC CL8'RESLIB' DMS00470
  48. * DC CL8'LIST' (DISPLAY ONE OR MORE ENTRIES) DMS00480
  49. * DC CL8'<ID | *> (ALLOCATE OR LOAD ID. IF *, THEN DMS00490
  50. * DISPLAY ALL ENTRIES) DMS00500
  51. * DC CL8'(' (OPTION SEPARATOR) DMS00510
  52. * DC CL8'STACK' (STACK OUTPUT FIFO, NOTYPE DFLT) DMS00520
  53. * DC CL8'TYPE' (TYPE THE DISPLAY, NORMAL DFLT) DMS00530
  54. * DC CL8'NOTYPE' (SUPPRESS TYPE OUT) DMS00540
  55. * DC XL8'FF' DMS00550
  56. * DMS00560
  57. * R1 -> DC CL8'RESLIB' DMS00570
  58. * DC CL8'LOAD' (LOAD A PROGRAM INTO PROT STORE) DMS00580
  59. * DC CL8'<ID>' (FNAME OF TEXT BECOMES AREA ID) DMS00590
  60. * DC CL8'(' (OPTION SEPARATOR) DMS00600
  61. * DC CL8'NAME <NAME>' (TRUE NAME OF ENTRY) DMS00610
  62. * DC CL8'PERM' (PROTECT FROM DEL *) DMS00620
  63. * DC CL8'SYSTEM' (LEAVE AREA IN KEY F. WHEN CALLED, DMS00630
  64. * PSW KEY=0, MASK=DISABLED. ELSE STORE DMS00640
  65. * KEY=E, PSW KEY=E, MASK=ENABLED) DMS00650
  66. * DC XL8'FF' DMS00660
  67. * DMS00670
  68. *GENERAL COMMAND SYNTAX: DMS00680
  69. * DMS00690
  70. * ALLOCATE <ID> <( NAME . KEY . PERM < ) >> DMS00700
  71. * DELETE <ID | * > DMS00710
  72. * LIST <ID | * > <( STACK TYPE NOTYPE < ) >> DMS00720
  73. * RESLIB LOAD <ID> <( PERM SYSTEM NAME ...< ) >> DMS00730
  74. * DMS00740
  75. *MINIMUM ABBREVIATIONS - DMS00750
  76. * DMS00760
  77. * ALLOCATE -> A DELETE -> D LIST -> L DMS00770
  78. * LOAD -> LO DMS00780
  79. * DMS00790
  80. * KEY -> KEY NAME -> NAME NOTYPE -> NOT DMS00800
  81. * PERM -> PERM STACK -> STACK SYSTEM -> SYS DMS00810
  82. * TYPE -> T DMS00820
  83. EJECT DMS00830
  84. *NOTES - DMS00840
  85. * DMS00850
  86. * 1. THIS ROUTINE MUST BE LOADED IN THE TRANSIENT AREA AND DMS00860
  87. * GENERATED WITH A NAME OF RESLIB WITH THE SYSTEM OPTION. DMS00870
  88. * DMS00880
  89. * 2. THE ALLOCATE, LOAD, AND LIST FUNCTION RETURN THE ADDRESS DMS00890
  90. * OF THE RELEVANT AREA IN R1. DMS00900
  91. * DMS00910
  92. * 3. DUPLICATE OPTIONS ARE ACCEPTED. THE RIGHTMOST IS USED. DMS00920
  93. * DMS00930
  94. *LOCALLY ISSUED MESSAGES: DMS00940
  95. * DMS00950
  96. * DMSRES003E INVALID OPTION '........' RC=24 DMS00960
  97. * DMSRES005E NO 'KEY | NAME' SPECIFIED RC=24 DMS00970
  98. * DMSRES014E INVALID FUNCTION '........' RC=24 DMS00980
  99. * DMSRES026W '........' NOT IN LIBRARY RC=4 DMS00990
  100. * DMSRES026E INVALID ........ '........' FOR '........' FUNCTION RC=24 DMS01000
  101. * DMSRES027W NO PRIVATE CORE IMAGE LIBRARY RC=4 DMS01010
  102. * DMSRES029E INVALID PARAMETER '....' IN THE '....' OPTION FIELD RC=24 DMS01020
  103. * DMSRES047E NO FUNCTION SPECIFIED RC=24 DMS01030
  104. * DMSRES050E PARAMETER MISSING AFTER ........ RC=24 DMS01040
  105. * DMSRES070E INVALID PARAMETER '........' RC=24 DMS01050
  106. * DMSRES109S VIRTUAL STORAGE CAPACITY EXCEEDED RC=104 DMS01060
  107. * DMSRES224E '........ ALREADY IN USE' RC=24 DMS01070
  108. * DMS01080
  109. *LOGIC - DMS01090
  110. * DMS01100
  111. * DOCUMENTED AT EACH MAJOR PORTION OF THE PROGRAM. DMS01110
  112. SPACE 3 DMS01120
  113. *********************************************************************** DMS01130
  114. * * DMS01140
  115. * S E T C D E P E N D I N G O N C M S L E V E L * DMS01150
  116. * * DMS01160
  117. *********************************************************************** DMS01170
  118. SPACE DMS01180
  119. GBLC &STATE DMS01190
  120. &STATE SETC 'ASTATE' FOR REL < 6.0 OR ANY W/O BSEP | SEP DMS01200
  121. *STATE SETC 'AESTATE' FOR REL >=6.0 WITH BSEP OR SEP DMS01210
  122. EJECT DMS01220
  123. *STEP 1: PERFORM ENTRY INITIALIZATION DMS01230
  124. * DMS01240
  125. DMSRES CSECT DMS01250
  126. PRINT NOGEN DMS01260
  127. USING NUCON,R0 DMS01270
  128. USING FUNCBLOK,R3 DMS01280
  129. USING LIBNTRY,R7 DMS01290
  130. USING *,R12 DMS01300
  131. SPACE DMS01310
  132. LR R12,R15 SET BASE REGISTER DMS01320
  133. LR R11,R14 SAVE RETURN ADDRESS DMS01330
  134. LA R8,8(,R1) SET PLIST POINTER DMS01340
  135. MVI FBITS,0 CLEAR THE FBITS DMS01350
  136. MVI OBITS,0 CLEAR THE OBITS DMS01360
  137. MVI LKEY,X'0E' SET USER KEY DMS01370
  138. SPACE DMS01380
  139. *STEP 2: SETUP TO SCAN FOR FUNCTION NAME DMS01390
  140. * DMS01400
  141. BAL R10,GETLEN GET LEN-1 DMS01410
  142. LM R3,R5,=A(FUNCTAB,FUNCTABL,FUNCTABE) GET FUNCTION PNTRS DMS01420
  143. SPACE DMS01430
  144. *STEP 3: SCAN FOR A VALID FUNCTION DMS01440
  145. * DMS01450
  146. CHKFUNC1 EX R1,CLCFUNC IF FUNCTION NAMES THE SAME DMS01460
  147. BE GOTFUNC THEN PROCESS IT DMS01470
  148. BXLE R3,R4,CHKFUNC1 ELSE KEEP LOOKING DMS01480
  149. SPACE DMS01490
  150. *STEP 4: NO VALID FUNCTION NAME FOUND. CHECK TYPE OF ERR MSG TO GIVE DMS01500
  151. * DMS01510
  152. CLC 0(2,R8),=C'(' IF OPTION LIST FOUND DMS01520
  153. BE NOFUNC THEN NO FUNCTION SPECIFIED DMS01530
  154. CLI 0(R8),X'FF' ELSE END OF PLIST DMS01540
  155. BE NOFUNC THEN NO FUNCTION FOUND DMS01550
  156. B BADFUNC ELSE IT IS AN INVALID ONE DMS01560
  157. EJECT DMS01570
  158. *STEP 5: CHECK IF REMAINDER OF PLIST IS TO BE PROCESSED DMS01580
  159. * DMS01590
  160. GOTFUNC LA R8,8(,R8) POINT TO START OF PARMS DMS01600
  161. TM FUNCFLAG,NOFPROC IF NO PLIST PROCESSING DMS01610
  162. BO FUNCXEQ THEN EXECUTE THE FUNCTION DMS01620
  163. SPACE DMS01630
  164. *STEP 6: CHECK IF ENTRY ID SPECIFIED AND IF SO, GET IT DMS01640
  165. * DMS01650
  166. BAL R10,SCANP SCAN PLIST FOR END DMS01660
  167. BZ CHKNAME IF END, THEN CHECK IF FNAME NEEDED DMS01670
  168. MVC LOADTXTN(8),0(R8) ELSE GET FNAME DMS01680
  169. LA R8,8(,R8) POINT TO NEXT TOKEN DMS01690
  170. B CHKXEQ AND CHECK FOR FURTHER PROCESSING DMS01700
  171. SPACE DMS01710
  172. *STEP 7: NO <ID> SPECIFIED, CHECK IF THIS IS ACCEPTABLE DMS01720
  173. * DMS01730
  174. CHKNAME TM FUNCFLAG,SKPNAME IF NAME NOT OPTIONAL DMS01740
  175. BNO NOPARM THEN ERROR DMS01750
  176. MVC LOADTXTN(2),=C'* ' ELSE INDICATE STAR DMS01760
  177. SPACE DMS01770
  178. *STEP 8: CHECK IF IMMEDIATE XEQ REQUIRED OR OPTION CHECKING DMS01780
  179. * DMS01790
  180. CHKXEQ TM FUNCFLAG,IXEQ IF NOT IMMED XEQ DMS01800
  181. BNO GETOP THEN PROCESS THE OPTIONS DMS01810
  182. B FUNCXEQ ELSE EXECUTE THE FUNCTION DMS01820
  183. EJECT DMS01830
  184. *********************************************************************** DMS01840
  185. * * DMS01850
  186. * O P T I O N L I S T P R O C E S S I N G * DMS01860
  187. * * DMS01870
  188. *********************************************************************** DMS01880
  189. SPACE DMS01890
  190. *STEP 1: CHECK IF WE ACTUALLY HAVE A VALID OPTION LIST DMS01900
  191. * DMS01910
  192. GETOP CLI 0(R8),X'FF' IF END OF PLIST DMS01920
  193. BE FUNCXEQ THEN START XEQ DMS01930
  194. CLC 0(2,R8),=C'( ' IF TOKEN ยฌ= '(' DMS01940
  195. BNE CONFLCTP THEN INVALID PARAMETER DMS01950
  196. SPACE DMS01960
  197. *STEP 2: BUMP TO NEXT TOKEN AND CHECK IF OPTION LIST HAS ENDED DMS01970
  198. * DMS01980
  199. GETOP1 LA R8,8(,R8) BUMP TO NEXT TOKEN DMS01990
  200. CLI 0(R8),X'FF' IF END OF PLIST DMS02000
  201. BE FUNCXEQ THEN EXCUTE FUNCTION DMS02010
  202. CLC 0(2,R8),=C') ' IF CLOSE PAREN DMS02020
  203. BE FUNCXEQ THEN EXECUTE FUNCTION DMS02030
  204. SPACE DMS02040
  205. *STEP 3: PREPARE TO SCAN THE OPTION TABLE DMS02050
  206. * DMS02060
  207. LA R2,7(,R8) POINT TO LAST BYTE OF OPTION DMS02070
  208. BAL R10,GETLEN GET LEN-1 DMS02080
  209. LM R5,R7,=A(OPTABLE,OPTABLN,OPTABND) GET TBL PNTRS DMS02090
  210. USING OPTBLOK,R5 DMS02100
  211. SPACE DMS02110
  212. *STEP 4: SCAN FOR VALID OPTION DMS02120
  213. * DMS02130
  214. GETOP2 CLM R1,B'0001',OPTLEN IF OUR STRING IS TO SHORT DMS02140
  215. BL GETOP2A THEN SKIP IT DMS02150
  216. EX R1,CLCOPT ELSE IF OPTION NAMES COMPARE DMS02160
  217. BE GETOP3 THEN FOUND OPTION DMS02170
  218. GETOP2A BXLE R5,R6,GETOP2 ELSE LOOK AT NEXT ONE DMS02180
  219. B BADOPT INVALID OPTION DMS02190
  220. SPACE DMS02200
  221. *STEP 5: CHECK IF OPTION VALID FOR FUNCTION AND SET INDICATOR IF SO DMS02210
  222. * DMS02220
  223. GETOP3 MVC 0(1,R13),FUNCOPT GET VALID OPTION BITS DMS02230
  224. NC 0(1,R13),OPTVALID IF OPTION NOT ONE OF THEM DMS02240
  225. BZ CONFLCTO THEN OPTION/FUNCTION CONFLICT DMS02250
  226. NC OBITS(1),OPTMASK REMOVE TOGGLE OPTIONS DMS02260
  227. OC OBITS(1),OPTBITS SET OPTION INDICATOR DMS02270
  228. EJECT DMS02280
  229. *STEP 6: CHECK FOR 'NAME' OPTION AND PROCESS DMS02290
  230. * DMS02300
  231. CLC CHKNAMO(8),0(R5) IF NOT THE NAME OPTION DMS02310
  232. BNE GETOP4 THEN CHECK FOR KEY OPTION DMS02320
  233. LA R8,8(,R8) ELSE POINT TO NEXT OPTION DMS02330
  234. BAL R10,SCANP CHECK IF END OF PLIST HERE DMS02340
  235. BZ NOPTV IF SO, THEN NAME NOT SPECIFIED DMS02350
  236. MVC NEWNAME(8),0(R8) ELSE SET NEW NAME DMS02360
  237. B GETOP1 GET NEXT OPTION DMS02370
  238. SPACE DMS02380
  239. *STEP 7: CHECK IF 'KEY' SPECIFIED AND PROCESS DMS02390
  240. * DMS02400
  241. GETOP4 CLC CHKKEY(8),0(R8) IF KEY NOT SPECIFIED DMS02410
  242. BNE GETOP1 THEN GET NEXT OPTION DMS02420
  243. LA R8,8(,R8) ELSE POINT TO NEXT TOKEN DMS02430
  244. BAL R10,SCANP CHECK IF AT END OF PLIST DMS02440
  245. BZ NOPTV IF AT END, THEN ERROR DMS02450
  246. BAL R10,GETLEN ELSE GET LEN-1 OF TOKEN DMS02460
  247. BAL R10,GETNUM CONVERT IT DMS02470
  248. BNZ BADVAL IF INVALID, THEN ERROR DMS02480
  249. CH R15,=H'15' IF KEY > X'0F' DMS02490
  250. BH BADVAL THEN INVALID DMS02500
  251. STC R15,LKEY ELSE SET KEY VALUE DMS02510
  252. B GETOP1 AND GET NEXT OPTION DMS02520
  253. DROP R5 DMS02530
  254. EJECT DMS02540
  255. *********************************************************************** DMS02550
  256. * * DMS02560
  257. * A L L O C A T E F U N C T I O N P R O C E S S I N G * DMS02570
  258. * * DMS02580
  259. *********************************************************************** DMS02590
  260. SPACE DMS02600
  261. *STEP 1: GET THE NUMBER OF PAGES TO BE ALLOCATED DMS02610
  262. * DMS02620
  263. ALO LA R8,LOADTXTN POINT TO NUMBER OF PAGES DMS02630
  264. BAL R10,GETLEN GET LEN-1 DMS02640
  265. BAL R10,GETNUM CONVERT IT TO BINARY DMS02650
  266. BNZ CONFLCTP IF INVALID, THEN EXIT DMS02660
  267. STH R15,SAVENUM SAVE THE NUMBER DMS02670
  268. SPACE DMS02680
  269. *STEP 2: CHECK IF USER TRYING TO ALLOCATE DUPLICATE ID DMS02690
  270. * DMS02700
  271. TM OBITS,OPTNAM IF NAME NOT SPECIFIED DMS02710
  272. BNO ALO01 THEN SKIP DUP ID CHECK DMS02720
  273. MVC LOADTXTN(8),NEWNAME ELSE SUPPLY NAME DMS02730
  274. BAL R10,SCANTAB FIND ID IN LIB TABLE DMS02740
  275. BZ DUPID IF FOUND, THEN ERROR DMS02750
  276. SPACE DMS02760
  277. *STEP 3: ALLOCATE A NEW LIB TABLE ENTRY AND CHECK IF UNIQUE ID NEEDED DMS02770
  278. * DMS02780
  279. ALO01 SR R0,R0 GET FREE LIB ENTRY DMS02790
  280. BAL R10,SCANTABA VIA SPECIAL SEARCH DMS02800
  281. BNZ NOSTOR IF NONE, THEN TABLE IS FULL DMS02810
  282. TM OBITS,OPTNAM IF NAME SPECIFIED DMS02820
  283. BO ALO03 THEN SKIP THE ID GENERATION DMS02830
  284. LR R5,R15 SAVE THE ENTRY NUMBER DMS02840
  285. STM R0,R7,STSAVE SAVE SOME REGS DMS02850
  286. NI FBITS,255-SEEKADR RESET SEEK BIT DMS02860
  287. SPACE DMS02870
  288. *STEP 4: CONSTRUCT A UNIQUE ID FOR THE USER DMS02880
  289. * DMS02890
  290. ALO02 STCK DTEMP SAVE CURRENT TOD DMS02900
  291. STC R5,DTEMP+7 INSERT ENTRY ID DMS02910
  292. UNPK 0(9,R13),DTEMP+4(5) BREAK OUT ALL DIGITS DMS02920
  293. MVC LOADTXTN(8),0(R13) MOVE OVER RELEVANT PORTION DMS02930
  294. NC LOADTXTN(8),=8X'0F' ISOLATE THE DIGITS DMS02940
  295. TR LOADTXTN(8),=C'ABCDEFGHJKMNPQRS' CREATE NAME DMS02950
  296. BAL R10,SCANTAB FIND THE ENTRY DMS02960
  297. BZ ALO02 IF FOUND, GENERATE A NEW ONE DMS02970
  298. MVC NEWNAME(8),LOADTXTN ELSE MAKE THIS THE NAME DMS02980
  299. LM R0,R7,STSAVE RESTORE THE REGS DMS02990
  300. EJECT DMS03000
  301. *STEP 5: ALLOCATE STORAGE BASED ON NUMBER OF PAGES WANTED DMS03010
  302. * DMS03020
  303. ALO03 LH R2,SAVENUM GET NUMBER OF PAGES DMS03030
  304. SLL R2,12 MULTIPLY BY 4096 DMS03040
  305. BAL R10,GETCORE GET THE STORAGE DMS03050
  306. BNZ NOSTOR IF NOT ENOUGH FREE AREA, ERROR DMS03060
  307. SPACE DMS03070
  308. *STEP 6: ENTER THE AREA IN THE LIB TABLE AND RETURN EPA TO USER DMS03080
  309. * DMS03090
  310. LR R1,R3 R1 <- EPA (SAME AS START LOC) DMS03100
  311. BAL R10,ADDNTRY ADD THE ENTRY DMS03110
  312. BAL R10,RETNTRY RETURN IT TO USER VIA R1 DMS03120
  313. B EXIT00 ALL DONE DMS03130
  314. EJECT DMS03140
  315. *********************************************************************** DMS03150
  316. * * DMS03160
  317. * D E L E T E F U N C T I O N P R O C E S S I N G * DMS03170
  318. * * DMS03180
  319. *********************************************************************** DMS03190
  320. SPACE DMS03200
  321. *STEP 1: CHECK IF '*' SPECIFIED INDICATING ALL NON-PERM DELETES DMS03210
  322. * DMS03220
  323. DELT CLC LOADTXTN(2),=C'* ' IF STAR NOT GIVEN DMS03230
  324. BNE DELT03 THEN DELETE ONLY ONE ENTRY DMS03240
  325. BAL R14,GETLIB ELSE GET A(LIB TABLE) DMS03250
  326. BNZ EXIT00 IF NONE, THEN ALL DONE DMS03260
  327. LA R5,LIBMAXN ELSE DELETE ALL POSSIBLE ENTRIES DMS03270
  328. SPACE DMS03280
  329. *STEP 2: DELETE ALL APPLICABLE ENTRIES DMS03290
  330. * DMS03300
  331. DELT01 CLI LIBID,0 IF NULL ENTRY HIT DMS03310
  332. BE EXIT00 THEN ALL DONE DMS03320
  333. TM LIBFLAGS,LIBPERM IF THIS IS NOT A PERM ENTRY DMS03330
  334. BNO DELT02 THEN DELETE DMS03340
  335. LA R7,LIBSIZE(,R7) ELSE POINT TO NEXT ENTRY DMS03350
  336. BCT R5,DELT01 AND CHECK IT OUT DMS03360
  337. B EXIT00 ALL DONE DMS03370
  338. SPACE DMS03380
  339. *STEP 3: FREE THE ENTRY STORAGE AND DELETE FROM LIB TABLE DMS03390
  340. * DMS03400
  341. DELT02 LM R2,R3,LIBLEN GET LEN & ADDRESS DMS03410
  342. BAL R10,RELCORE RELEASE THE STORAGE DMS03420
  343. BAL R10,RELNTRY RELEASE THE LIB TABLE ENTRY DMS03430
  344. BNZ DELT01 IF MORE LEFT, CHECK THEM OUT DMS03440
  345. B EXIT00 ELSE ALL DONE DMS03450
  346. SPACE DMS03460
  347. *STEP 4: FIND MATCHING ENTRY ID ENTRY IN LIB TABLE DMS03470
  348. * DMS03480
  349. DELT03 BAL R10,SCANTAB SCAN LIB TABLE DMS03490
  350. BNZ NOTXT IF NOT FOUND, THEN ERROR DMS03500
  351. SPACE DMS03510
  352. *STEP 5: ENTRY FOUND, RELEASE ITS STORAGE AND DELETE THE TABLE ENTRY DMS03520
  353. * DMS03530
  354. BAL R10,RELCORE RELEASE ENTRY STORAGE DMS03540
  355. BAL R10,RELNTRY RELEASE THE ENTRY DMS03550
  356. B EXIT00 AND EXIT WITH RC=0 DMS03560
  357. EJECT DMS03570
  358. *********************************************************************** DMS03580
  359. * * DMS03590
  360. * L O A D F U N C T I O N P R O C E S S I N G * DMS03600
  361. * * DMS03610
  362. *********************************************************************** DMS03620
  363. SPACE DMS03630
  364. *STEP 1: CHECK IF NAME TO BE ENTERED IS A DUPLICATE DMS03640
  365. * DMS03650
  366. LOADF MVC STSAVE(8),LOADTXTN SAVE CURRENT NAME DMS03660
  367. TM OBITS,OPTNAM IF 'NAME' NOT SPECIFIED DMS03670
  368. BNO *+10 THEN ALL IS WELL DMS03680
  369. MVC LOADTXTN(8),NEWNAME ELSE SET NEW NAME DMS03690
  370. BAL R10,SCANTAB TRY TO FIND THE ENTRY DMS03700
  371. BZ DUPID IF FOUND, THEN ERROR DMS03710
  372. MVC NEWNAME(8),LOADTXTN ELSE SET THE ENTRY NAME DMS03720
  373. MVC LOADTXTN(8),STSAVE RESTORE LOAD NAME DMS03730
  374. SPACE DMS03740
  375. *STEP 2: GET A LIB TABLE ENTRY & LOAD ROUTINE INTO LOW STORAGE FIRST DMS03750
  376. * SO THAT WE CAN COMPUTE THE AMOUNT OF STORAGE NEEDED FOR IT. DMS03760
  377. * DMS03770
  378. SR R0,R0 LOOK FOR EMPTY SLOT DMS03780
  379. BAL R10,SCANTABA VIA SCANTAB ONCE MORE DMS03790
  380. BNZ NOSTOR IF NONE, TABLE IS FULL DMS03800
  381. L R3,MAINHIGH ELSE GET A CLEAR STORAGE AREA DMS03810
  382. BAL R10,LOADTXT DO INITIAL LOAD DMS03820
  383. BNZ EXITRC IF ERROR, EXIT W/ LOADER RC DMS03830
  384. SPACE DMS03840
  385. *STEP 3: COMPUTE THE AMOUNT OF STORAGE NEEDED BASED OF STARTING DMS03850
  386. * LOCATION AND ENDING LOCATION AS COMPUTE BY THE LOADER. DMS03860
  387. * DMS03870
  388. LR R2,R0 R2 <- ENDING ADDRESS DMS03880
  389. SR R2,R3 SIZE = LOCCNT - START ADDRESS DMS03890
  390. TM OBITS,OPTSYS IF SYSTEM OPTION NOT SPECIFIED DMS03900
  391. BNO *+8 THEN KEY VALUE IS CORRECT DMS03910
  392. MVI LKEY,X'0F' ELSE SET STORAGE TO KEY X'F' DMS03920
  393. BAL R10,GETCORE ALLOCATE STORAGE DMS03930
  394. BNZ NOSTOR IF NONE, THEN ERROR DMS03940
  395. SPACE DMS03950
  396. *STEP 4: LOAD THE FILE IN HIGH STORAGE ONCE AGAIN. IF ERROR, RELEASE DMS03960
  397. * THE STORAGE WE GOT BEFORE WE EXIT. DMS03970
  398. * DMS03980
  399. BAL R10,LOADTXT LOAD THE FILE DMS03990
  400. BZ LOADF01 IF IT WAS LOADED, WE ARE ALL SET DMS04000
  401. LR R9,R15 ELSE GET RC DMS04010
  402. BAL R10,RELCORE RELEASE THE STORAGE DMS04020
  403. LR R15,R9 RESTORE THE LOADER RC DMS04030
  404. B EXITRC AND EXIT DMS04040
  405. SPACE DMS04050
  406. *STEP 5: ADD NEW ENTRY INTO THE LIB TABLE AND RETURN ADDR TO USER DMS04060
  407. * DMS04070
  408. LOADF01 L R1,STRTADDR GET ENTRY POINT ADDRESS DMS04080
  409. BAL R10,ADDNTRY ADD IT TO THE LIB TABLE DMS04090
  410. BAL R10,RETNTRY SUPPLY EPA VIA R1 DMS04100
  411. OI LIBFLAGS,LIBCMD FLAG AS A RESIDENT COMMAND DMS04110
  412. B EXIT00 AND EXIT DMS04120
  413. EJECT DMS04130
  414. *********************************************************************** DMS04140
  415. * * DMS04150
  416. * L I S T F U N C T I O N P R O C E S S I N G * DMS04160
  417. * * DMS04170
  418. *********************************************************************** DMS04180
  419. SPACE DMS04190
  420. *STEP 1: SET CORRECT OPTIONS BASED ON SPECIFIED OPTIONS DMS04200
  421. * DMS04210
  422. LST TM OBITS,OPTYPE+OPNTYPE IF TYPE | NOTYPE SPECIFIED DMS04220
  423. BNZ LST00 THEN OPTIONS ARE SET DMS04230
  424. OI OBITS,OPTYPE ELSE FORCE TYPING DMS04240
  425. TM OBITS,OPTSTK IF STACK NOT SPECIFIED DMS04250
  426. BNO LST00 THEN OPTIONS ARE SET DMS04260
  427. NI OBITS,255-OPTYPE ELSE RESET TYPING DMS04270
  428. OI OBITS,OPNTYPE AND INDICATE NOTYPING DMS04280
  429. SPACE DMS04290
  430. *STEP 2: CHECK IF '*' SPECIFIED FOR FNAME (IF IT WAS, USER WANTS A DMS04300
  431. * COMPLETE LIST OF THE LIB TABLE). ELSE TYPE SINGLE ENTRY. DMS04310
  432. * DMS04320
  433. LST00 CLC LOADTXTN(2),=C'* ' IF STAR SPECIFIED DMS04330
  434. BE LST01 THEN GIVE COMPLETE LIST DMS04340
  435. BAL R10,SCANTAB ELSE FIND THE MATCHING ENTRY DMS04350
  436. BNZ NOTXTL IF NONE, THEN ERROR DMS04360
  437. BAL R10,RETNTRY ELSE RETURN EPA FOR USER DMS04370
  438. BAL R10,TYPENTRY TYPE THE INFO DMS04380
  439. B EXIT00 AND EXIT WITH RC = 0 DMS04390
  440. SPACE DMS04400
  441. *STEP 3: SCAN COMPLETE LIB TABLE TYPING ALL VALID ENTRIES DMS04410
  442. * DMS04420
  443. LST01 LA R5,LIBMAXN DO ALL OF THE ENTRIES DMS04430
  444. BAL R14,GETLIB GET A(LIB TABLE) DMS04440
  445. BNZ NOTXTA IF NONE, GIVE WARNING MESSAGE DMS04450
  446. SPACE DMS04460
  447. LST01A CLI LIBID,0 IF ENTRY IS NULL DMS04470
  448. BE LST01B THE SKIP IT DMS04480
  449. BAL R10,TYPENTRY ELSE TYPE IT DMS04490
  450. SPACE DMS04500
  451. LST01B LA R7,LIBSIZE(,R7) ELSE POINT TO NEXT ENTRY DMS04510
  452. BCT R5,LST01A AND TYPE IT IF NOT NULL DMS04520
  453. SPACE DMS04530
  454. *STEP 4: CHECK IF ANYTHING ACTUALLY TYPED AND EXIT CORRECTLY DMS04540
  455. * DMS04550
  456. TM FBITS,HDR IF SOMETHING WAS TYPED DMS04560
  457. BO EXIT00 THEN EXIT NORMALLY DMS04570
  458. TM OBITS,OPTYPE IF NOTYPE IN EFFECT DMS04580
  459. BNO EXIT04 THEN JUST EXIT DMS04590
  460. B NOTXTA ELSE ISSUE ERROR MESSAGE DMS04600
  461. EJECT DMS04610
  462. *********************************************************************** DMS04620
  463. * * DMS04630
  464. * E R R O R M E S S A G E S * DMS04640
  465. * * DMS04650
  466. *********************************************************************** DMS04660
  467. SPACE DMS04670
  468. * DMSRES003E DMS04680
  469. * DMS04690
  470. BADOPT DMSERR TEXT='INVALID OPTION ''........''',NUM=3,LET=E, XDMS04700
  471. SUB=(CHARA,(R8)) DMS04710
  472. B EXIT24 DMS04720
  473. SPACE DMS04730
  474. * DMSRES005E DMS04740
  475. * DMS04750
  476. NOPTV DMSERR TEXT='NO ''....'' SPECIFIED',NUM=5,LET=E, XDMS04760
  477. SUB=(CHARA,(R5)) DMS04770
  478. B EXIT24 DMS04780
  479. SPACE DMS04790
  480. * DMSRES014E DMS04800
  481. * DMS04810
  482. BADFUNC DMSERR TEXT='INVALID FUNCTION ''........''',NUM=14,LET=E, XDMS04820
  483. SUB=(CHARA,(R8)) DMS04830
  484. B EXIT24 DMS04840
  485. SPACE DMS04850
  486. * DMSRES026W DMS04860
  487. * DMS04870
  488. NOTXTL TM OBITS,OPTYPE IF TYPE IS SUPPRESSED DMS04880
  489. BNO EXIT04 THEN SKIP THE MESSAGE DMS04890
  490. NOTXT DMSERR TEXT='''........'' NOT IN LIBRARY',NUM=26,LET=W, XDMS04900
  491. SUB=(CHARA,LOADTXTN) DMS04910
  492. B EXIT04 DMS04920
  493. SPACE DMS04930
  494. * DMSRES026E DMS04940
  495. * DMS04950
  496. CONFLCTO LA R2,=CL9'OPTION' OPTION/FUNCTION CONFLICT DMS04960
  497. B CONFLCT DMS04970
  498. CONFLCTP LA R2,=CL9'PARAMETER' PARAMETER/FUNCTION CONFLICT DMS04980
  499. SPACE DMS04990
  500. CONFLCT DMSERR TEXT='INVALID ......... ''........'' FOR ''........'' XDMS05000
  501. FUNCTION',NUM=26,LET=E,SUB=(CHARA,(R2),CHARA,(R8), XDMS05010
  502. CHARA,FUNCNAME),RENT=NO DMS05020
  503. B EXIT24 DMS05030
  504. SPACE DMS05040
  505. * DMSRES027W DMS05050
  506. * DMS05060
  507. NOTXTA TM OBITS,OPTYPE IF NOTYPING WANTED DMS05070
  508. BNO EXIT04 THEN JUST EXIT DMS05080
  509. DMSERR TEXT='NO PRIVATE CORE IMAGE LIBRARY',NUM=27,LET=W DMS05090
  510. B EXIT04 DMS05100
  511. EJECT DMS05110
  512. * DMSRES029E DMS05120
  513. * DMS05130
  514. BADVAL DMSERR TEXT='INVALID PARAMETER ''........'' IN THE OPTION ''.XDMS05140
  515. .......'' FIELD',NUM=29,LET=E,RENT=NO, XDMS05150
  516. SUB=(CHARA,(R8),CHARA,(R5)) DMS05160
  517. B EXIT24 DMS05170
  518. SPACE DMS05180
  519. * DMSRES047E DMS05190
  520. * DMS05200
  521. NOFUNC DMSERR TEXT='NO FUNCTION SPECIFIED',NUM=47,LET=E DMS05210
  522. B EXIT24 DMS05220
  523. SPACE DMS05230
  524. * DMSRES050E DMS05240
  525. * DMS05250
  526. NOPARM DMSERR TEXT='PARAMETER MISSING AFTER ........',NUM=50,LET=E, XDMS05260
  527. SUB=(CHARA,FUNCNAME) DMS05270
  528. B EXIT24 DMS05280
  529. SPACE DMS05290
  530. * DMSRES109S DMS05300
  531. * DMS05310
  532. NOSTOR DMSERR TEXT='VIRTUAL STORAGE CAPACITY EXCEEDED',NUM=109,LET=S DMS05320
  533. B EXIT104 DMS05330
  534. SPACE DMS05340
  535. * DMSRES224E DMS05350
  536. * DMS05360
  537. DUPID DMSERR TEXT='........ ALREADY IN USE',NUM=224,LET=E, XDMS05370
  538. SUB=(CHARA,LOADTXTN) DMS05380
  539. B EXIT24 DMS05390
  540. SPACE DMS05400
  541. * EXIT HERE FOR RC = 0 DMS05410
  542. * DMS05420
  543. EXIT00 SR R15,R15 RC = 0 DMS05430
  544. EXITRC BR R11 RETURN TO CMS DMS05440
  545. SPACE DMS05450
  546. * EXIT HERE FOR RC = 4 DMS05460
  547. * DMS05470
  548. EXIT04 LA R15,4 RC = 4 DMS05480
  549. BR R11 RETURN DMS05490
  550. SPACE DMS05500
  551. * EXIT HERE FOR RC = 24 DMS05510
  552. * DMS05520
  553. EXIT24 LA R15,24 RC = 24 DMS05530
  554. BR R11 EXIT DMS05540
  555. SPACE DMS05550
  556. * EXIT HERE FOR RC = 104 DMS05560
  557. * DMS05570
  558. EXIT104 LA R15,104 RC = 104 DMS05580
  559. BR R11 EXIT DMS05590
  560. EJECT DMS05600
  561. *SUBROUTINE - DMS05610
  562. * SCANTAB DMS05620
  563. * SCANTABA DMS05630
  564. * DMS05640
  565. *FUNCTION - DMS05650
  566. * SCAN THE LIB TABLE FOR A NAME (SCANTAB) OR ADDRESS (SCANTABA) DMS05660
  567. * DMS05670
  568. *ENTRY CONDITIONS - DMS05680
  569. * R10 - RETURN ADDRESS DMS05690
  570. * ADDITIONALLY: DMS05700
  571. * IF FBITS = SEEKADR THEN R0 CONTAINS ADDRESS TO SEEK FOR. DMS05710
  572. * THIS ADDRESS CORRESPONDS TO THE LIBADR FIELD. DMS05720
  573. * IF FBITS ยฌ SEEKADR THEN AREA LOADTXTN CONTAINS AN 8 CHAR DMS05730
  574. * NAME TO BE FOUND IN THE LIB TABLE. DMS05740
  575. * DMS05750
  576. *EXIT CONDITIONS - DMS05760
  577. * CC = 0 -> ENTRY FOUND, REGISTERS CONTAIN: DMS05770
  578. * R1 - A(MODULE ENTRY POINT) DMS05780
  579. * R2 - LENGTH OF STORAGE AREA ALLOCATED DMS05790
  580. * R3 - A(STORAGE AREA ALLOCATED) DMS05800
  581. * R7 - A(LIB TABLE ENTRY) DMS05810
  582. * R15- UNIQUE ENTRY NUMBER DMS05820
  583. * DMS05830
  584. * CC ยฌ 0 -> MATCHING ENTRY NOT FOUND. DMS05840
  585. * DMS05850
  586. *NOTES - DMS05860
  587. * 1. IF THERE IS NO LIB TABLE ALLOCATED, THIS ROUTINE WILL GET DMS05870
  588. * ONE. THE LIB TABLE IS 4K LONG AND HOLDS ALL THE NAME TO DMS05880
  589. * ADDRESS MAPPINGS. DONE ONLY IF R0 = 0 AND SEEKADR SET ON. DMS05890
  590. * DMS05900
  591. * 2. IN ALL CASES, R0 - R3, R7, R14, R15 ARE MODIFIED. DMS05910
  592. * DMS05920
  593. * 3. EXIT MAY BE MADE DIRECTLY TO VARIOUS ERROR MESSAGES. DMS05930
  594. * DMS05940
  595. * 4. ENTRY SCANTABA MAY BE USED TO SET THE SEEKADR BIT ON. DMS05950
  596. SPACE DMS05960
  597. *STEP 1: GET A(LIB TABLE) AND CHECK IF ALLOCATED YET DMS05970
  598. * DMS05980
  599. SCANTABA OI FBITS,SEEKADR SET ADDRESS SEARCH ON DMS05990
  600. SPACE DMS06000
  601. SCANTAB BAL R14,GETLIB GET A(LIB TABLE) DMS06010
  602. BZ SCANTAB1 IF PRESENT, START SCAN DMS06020
  603. SPACE DMS06030
  604. *STEP 2: ALLOCATE A LIB TABLE ONLY IF SEARCHING FOR A FREE ENTRY DMS06040
  605. * DMS06050
  606. LTR R0,R0 IF NOT SEARCHING FOR 0 ENTRY DMS06060
  607. BNZR R10 THEN RETURN, NOTHING FOUND DMS06070
  608. TM FBITS,SEEKADR IF SEEKING BY ADDRESS DMS06080
  609. BO SCANTAB0 THEN GO ALLOCATE LIB TABLE DMS06090
  610. LTR R12,R12 ELSE SET CCยฌ0 DMS06100
  611. BR R10 AND RETURN DMS06110
  612. EJECT DMS06120
  613. *STEP 3: LIB TABLE IS NOT YET ALLOCATED, ALLOCATE IT DMS06130
  614. * DMS06140
  615. SCANTAB0 L R2,=F'4096' GET 4K FOR LIB TABLE DMS06150
  616. IC R7,LKEY GET WANTED KEY DMS06160
  617. MVI LKEY,0 PLACE LIB TABLE IN KEY 0 DMS06170
  618. ST R10,0(,R13) SAVE THE RPA REG DMS06180
  619. BAL R10,GETCORE ALLOCATE THE STORAGE DMS06190
  620. L R10,0(,R13) RESTORE RPA REG DMS06200
  621. STC R7,LKEY RESTORE WANTED KEY DMS06210
  622. BNZ NOSTOR IF NOT ALLOCATED, THEN ERROR DMS06220
  623. SPACE DMS06230
  624. *STEP 4: LOAD SPECIAL COMMAND PROCESSING ROUTINE AT START OF LIB TABLE DMS06240
  625. * DMS06250
  626. MVC ASTATE2(4),&STATE SET STATE ADDRESS IN CODE DMS06260
  627. ST R3,&STATE SET ANCHOR IN NUCON DMS06270
  628. LR R0,R3 R0 <- A(LIB TABLE) DMS06280
  629. LA R1,DMSRESRL R1 <- LENGTH(CODE) DMS06290
  630. LA R14,DMSRESRC R14 <- A(LOCAL CODE) DMS06300
  631. LR R15,R1 R15 <- LENGTH(CODE) DMS06310
  632. MVCL R0,R14 MOVE CODE OVER DMS06320
  633. LR R7,R0 SET STARTING ADDR OF LIBTABLE DMS06330
  634. SR R0,R0 CLEAR R0 ONCE AGAIN DMS06340
  635. SPACE DMS06350
  636. *STEP 5: SCAN THE LIB TABLE FOR THE MATCHING ENTRY DMS06360
  637. * DMS06370
  638. SCANTAB1 LA R15,LIBMAXN SCAN MAX ENTRIES DMS06380
  639. SPACE DMS06390
  640. SCANTAB2 LM R1,R3,LIBEPA ASSUME ENTRY WILL MATCH DMS06400
  641. TM FBITS,SEEKADR IF SEEKING BY ADDRESS DMS06410
  642. BO SCANTAB3 THEN PERFORM ADDRESS MATCH DMS06420
  643. CLC LIBID(8),LOADTXTN ELSE IF NAMES MATCH DMS06430
  644. BER R10 THEN RETURN W/ INFO DMS06440
  645. CLI LIBID,X'01' IF LIBENTRY IS NULL DMS06450
  646. BLR R10 THEN RETURN, END OF TABLE DMS06460
  647. B SCANTAB4 ELSE GO TO NEXT ENTRY DMS06470
  648. SPACE DMS06480
  649. SCANTAB3 CL R0,LIBADR IF ADDRESSES MATCH DMS06490
  650. BER R10 THEN RETURN WITH INFO DMS06500
  651. CLI LIBID,X'01' IF LIBENTRY IS NULL DMS06510
  652. BLR R10 THEN RETURN, END OF TABLE DMS06520
  653. SPACE DMS06530
  654. *STEP 6: BUMP TO NEXT LIB TABLE ENTRY AND PROCESS DMS06540
  655. * DMS06550
  656. SCANTAB4 LA R7,LIBSIZE(,R7) BUMP TO NEXT ENTRY DMS06560
  657. BCT R15,SCANTAB2 SCAN THE TABLE DMS06570
  658. BR R10 RETURN, NOT FOUND, CCยฌ=0 DMS06580
  659. EJECT DMS06590
  660. *SUBROUTINE - DMS06600
  661. * ADDNTRY DMS06610
  662. * DMS06620
  663. *FUNCTION - DMS06630
  664. * TO COMPLETE A LIB TABLE ENTRY DMS06640
  665. * DMS06650
  666. *ENTRY CONDITIONS - DMS06660
  667. * R1 - A(MODULE E.P.A) DMS06670
  668. * R2 - LENGTH OF STORAGE AREA DMS06680
  669. * R3 - A(STORAGE AREA) DMS06690
  670. * R7 - A(LIB TABLE ENTRY TO BE USED) DMS06700
  671. * ADDITIONALLY: AREA AT NEWNAME CONTAINS THE FNAME; DMS06710
  672. * LKEY CONTAINS THE STORAGE PROTECT KEY. DMS06720
  673. * DMS06730
  674. *EXIT CONDITIONS - DMS06740
  675. * NONE. DMS06750
  676. * DMS06760
  677. *NOTES - DMS06770
  678. * 1. LIBFLAGS ARE SET ACCORDING TO INDICATORS IN OBITS. DMS06780
  679. SPACE DMS06790
  680. *STEP 1: COMPLETE THE LIB TABLE ENTRY DMS06800
  681. * DMS06810
  682. ADDNTRY MVC LIBID(8),NEWNAME SUPPLY REAL NAME DMS06820
  683. STM R1,R3,LIBEPA SET EPA, LEN, ADDR DMS06830
  684. MVC LIBKEY(1),LKEY SET THE PKEY DMS06840
  685. MVI LIBFLAGS,0 CLEAR FLAGS DMS06850
  686. SPACE DMS06860
  687. *STEP 2: SET ENTRY FLAGS DMS06870
  688. * DMS06880
  689. TM OBITS,OPTPERM IF NOT PERM ENTRY DMS06890
  690. BNO *+8 THEN SKIP THE SET DMS06900
  691. OI LIBFLAGS,LIBPERM ELSE INDICATE PERM DMS06910
  692. TM OBITS,OPTSYS IF NOT SYSTEM SPACE DMS06920
  693. BNOR R10 THEN RETURN, ALL DONE DMS06930
  694. OI LIBFLAGS,LIBSYS ELSE INDICATE SYSTEM SPACE DMS06940
  695. BR R10 AND RETURN DMS06950
  696. EJECT DMS06960
  697. *SUBROUTINE - DMS06970
  698. * GETCORE DMS06980
  699. * DMS06990
  700. *FUNCTION - DMS07000
  701. * TO ALLOCATE ONE OR MORE PAGES OF NUCLEUS HIGH STORAGE DMS07010
  702. * PROTECTED PRIVATE (HIDDEN FROM CMS) STORAGE. DMS07020
  703. * DMS07030
  704. *ENTRY CONDITIONS - DMS07040
  705. * R2 - LENGTH, IN BYTES, TO BE ALLOCATED. DMS07050
  706. * R10 - RETURN ADDRESS DMS07060
  707. * DMS07070
  708. *EXIT CONDITIONS - DMS07080
  709. * CC = 0 -> STORAGE ALLOCATED, REGISTERS CONTAIN: DMS07090
  710. * R2 - LENGTH, IN BYTES, ACTUALLY ALLOCATED. DMS07100
  711. * R3 - A(STORAGE AREA) ALLOCATED. DMS07110
  712. * CC ยฌ 0 -> INSUFFICIENT STORAGE. DMS07120
  713. * DMS07130
  714. *NOTES - DMS07140
  715. * 1. R0 - R3, R14, R15 MODIFIED. DMS07150
  716. SPACE DMS07160
  717. *STEP 1: ROUND REQUESTORS LENGTH TO NEAREST 4K SIZE. WE CAN ONLY DMS07170
  718. * ALLOCATE STORAGE IN UNITS OF PAGES. DMS07180
  719. * DMS07190
  720. GETCORE LA R2,4095(,R2) ADD A TAD LESS THAN 4K DMS07200
  721. SRL R2,12 SHIFT DOWN DMS07210
  722. SLL R2,12 AND UP, WE NOW HAVE A GOOD NUMBER DMS07220
  723. SPACE DMS07230
  724. *STEP 2: ADD 4K MORE TO IT SO THAT WE CAN BE ASSURED THAT WHEN WE DMS07240
  725. * TRIM THE EXCESS THE RESULTING AREA WILL WIND UP ON A PAGE DMS07250
  726. * BOUNDARY. ONCE DONE, ALLOCATE HIGH NUCLEUS STORAGE. DMS07260
  727. * DMS07270
  728. AL R2,=F'4096' ADD 4K TO REQUESTED SIZE DMS07280
  729. LR R0,R2 COPY IT DMS07290
  730. SRL R0,3 CONVERT TO DWORDS FOR DMSFREE DMS07300
  731. DMSFREE DWORDS=(0),TYPE=NUCLEUS,AREA=HIGH,ERR=GETCORE6 DMS07310
  732. SPACE DMS07320
  733. *STEP 3: CHECK IF CMS ALLOCATED ON A PAGE BOUNDARY. IF IT DID THEN DMS07330
  734. * WE JUST NEED TO TRIM THE TOP 4K OFF. ELSE, WE MUST TRIM DMS07340
  735. * STORAGE ON BOTH SIDE OF THE AREA. DMS07350
  736. * DMS07360
  737. LA R1,0(,R1) CLEAR TOP BYTE DMS07370
  738. LA R3,4095(,R1) ADD A TAD LESS THAN 4K TO ADDRESS DMS07380
  739. N R3,=X'00FFF000' STRIP LOW 12 BITS DMS07390
  740. CLR R1,R3 IF RESULT IS NOT THE SAME AS ORGINAL DMS07400
  741. BNE GETCORE2 THEN AREA WAS NOT ON PAGE BOUNDARY DMS07410
  742. EJECT DMS07420
  743. *STEP 4: RELEASE THE 1ST 4K OF THE STORAGE AREA AND ADJUST THE DMS07430
  744. * STRTING ADDRESS AND LENGTH BY THE SAME AMOUNT. DMS07440
  745. * DMS07450
  746. L R0,=F'4096' GET 4K DMS07460
  747. ALR R3,R0 ADJUST STARTING ADDRESS DMS07470
  748. SLR R2,R0 DECREASE THE LENGTH BY 4K DMS07480
  749. SRL R0,3 COMPUTE DWORDS TO RELEASE DMS07490
  750. DMSFRET DWORDS=(0),LOC=(1) FREE 1ST 4K DMS07500
  751. B GETCORE3 GO FINISH UP DMS07510
  752. SPACE DMS07520
  753. *STEP 5: RELEASE AS MUCH STORAGE AS NECESSARY (LESS THAN 4K GAURENTEED) DMS07530
  754. * SO THAT THE ALLOCATED STORAGE AREA START ON A PAGE BNDRY. DMS07540
  755. * NOTE THAT WE HAVE IN R3 THE ADDRESS WE WOULD LIKE THE AREA DMS07550
  756. * TO START AT AND R1 CONTAINS THE ORGINAL ADDRESS. THUS THE DMS07560
  757. * DIFFERENCE WILL BE THE AMOUNT WE HAVE TO RELEASE. DMS07570
  758. * DMS07580
  759. GETCORE2 LR R0,R3 R0 <- WANTED STARTING ADDRESS DMS07590
  760. SR R0,R1 LESS ACTUAL ADDRESS YIELDS EXCESS DMS07600
  761. SR R2,R0 SUBTRACT EXCESS FROM AREA LENGTH DMS07610
  762. SRL R0,3 COMPUTE DWORDS DMS07620
  763. DMSFRET DWORDS=(0),LOC=(1) FREE THE STORAGE AREA DMS07630
  764. SPACE DMS07640
  765. *STEP 6: WE MUST NOW FREE THE EXCESS AT THE END OF OUR STORAGE AREA. DMS07650
  766. * THIS IS EASILY COMPUTED SINCE WE KNOW THAT THE LENGTH OF THE DMS07660
  767. * STORAGE AREA MUST BE EXACTLY A MULTIPLE OF 4K, WE NEED ONLY DMS07670
  768. * TO RELEASE THE AMOUNT INDICATED IN THE LOW ORDER 12 BITS OF DMS07680
  769. * THE ACTUAL LENGTH QUANTITY AND ADJUST THE LENGTH BY THAT DMS07690
  770. * AMOUNT. THIS THE STORAGE AREA WILL BE IN PAGE CIRCUMSCRIBED DMS07700
  771. * BOUNDARIES. DMS07710
  772. * DMS07720
  773. LR R0,R2 R0 <- CURRENT LENGTH OF AREA DMS07730
  774. N R0,=F'4095' ISOLATE LOW ORDER 12 BITS DMS07740
  775. SR R2,R0 SUBTRACT EXCESS OF ORIGINAL LENGTH DMS07750
  776. LR R1,R3 R1 <- A(STORAGE AREA) DMS07760
  777. ALR R1,R2 POINT TO STARTING AREA TO FREE DMS07770
  778. SRL R0,3 GET DWORDS DMS07780
  779. DMSFRET DWORDS=(0),LOC=(1) FREE THE STORAGE AREA DMS07790
  780. SPACE DMS07800
  781. *STEP 7: WE MUST NOW ADJUST THE AMOUNT CMS KEEPS TRACK OF AS SYSTEM DMS07810
  782. * ALLOCATED BY THE AMOUNT WE HAVE ALLOCATED FOR OURSELVES. DMS07820
  783. * THIS WILL PREVENT CMS FROM EVER MISSING THE STORAGE AREA. DMS07830
  784. * DMS07840
  785. GETCORE3 L R15,ADMSFRT GET A(FRETAB) DMS07850
  786. USING FRDSECT,R15 DMS07860
  787. L R1,FREELOW1 GET ORIGINAL HIGH WATER MARK DMS07870
  788. SLR R1,R2 ADJUST BY THE AMOUNT WE ALLOCATED DMS07880
  789. ST R1,FREELOW1 AND UPDATE IT DMS07890
  790. DROP R15 DMS07900
  791. EJECT DMS07910
  792. *STEP 8: CLEAR THE STORAGE AREA TO ZEROES DMS07920
  793. * DMS07930
  794. LR R0,R3 R0 <- A(AREA) DMS07940
  795. LR R1,R2 R1 <- L(AREA) DMS07950
  796. SR R15,R15 ZERO FOR PAD MVCL DMS07960
  797. MVCL R0,R14 CLEAR THE AREA DMS07970
  798. SPACE DMS07980
  799. *STEP 9: SET PROTECT KEYS AND RETURN DMS07990
  800. * DMS08000
  801. BAL R14,SETKEY SET PKEYS DMS08010
  802. SR R15,R15 SET CC=0 DMS08020
  803. BR R10 AND RETURN DMS08030
  804. SPACE DMS08040
  805. *STEP 10: ON ERROR, RETURN WITH CC ยฌ= 0 DMS08050
  806. * DMS08060
  807. GETCORE6 LTR R12,R12 SET CC ยฌ 0 DMS08070
  808. BR R10 AND RETURN DMS08080
  809. EJECT DMS08090
  810. *SUBROUTINE - DMS08100
  811. * SETKEY DMS08110
  812. * DMS08120
  813. *FUNCTION - DMS08130
  814. * TO SET STORAGE PROTECT KEYS DMS08140
  815. * DMS08150
  816. *ENTRY CONDITIONS - DMS08160
  817. * R2 - LENGTH(AREA) IN BYTES DMS08170
  818. * R3 - A(AREA) DMS08180
  819. * R14 - RETURN ADDRESS DMS08190
  820. * *** - LKEY CONTAINS THE PROTECT KEY RIGHT JUSTIFIED. DMS08200
  821. * DMS08210
  822. *EXIT CONDITIONS - DMS08220
  823. * NONE. DMS08230
  824. SPACE DMS08240
  825. *STEP 1: SET UP FOR SSK INSTRUCTION DMS08250
  826. * DMS08260
  827. SETKEY LR R0,R2 R0 <- L(AREA) DMS08270
  828. SRL R0,11 CONVERT TO NUMBER OF PAGES * 2 DMS08280
  829. LR R1,R3 R1 <- A(AREA) DMS08290
  830. IC R15,LKEY GET PROTECT KEY DMS08300
  831. SLL R15,4 SHIFT INTO CORRECT POSITION DMS08310
  832. SPACE DMS08320
  833. *STEP 2: SET STORAGE TO CORRECT PROTECT KEY DMS08330
  834. * DMS08340
  835. SETKEY01 SSK R15,R1 SET PROTECT KEY DMS08350
  836. LA R1,2048(,R1) NEXT 2K BOUNDARY DMS08360
  837. BCT R0,SETKEY01 DO ALL PAGES DMS08370
  838. BR R14 AND RETURN DMS08380
  839. EJECT DMS08390
  840. *SUBROUTINE - DMS08400
  841. * RELNTRY DMS08410
  842. * DMS08420
  843. *FUNCTION - DMS08430
  844. * TO RELEASE A LIBRARY ENTRY AND IF LAST ONE RELEASED, TO DMS08440
  845. * TO RELEASE THE LIBRARY DIRECTORY PAGE. DMS08450
  846. * DMS08460
  847. *ENTRY CONDITIONS - DMS08470
  848. * R7 - A(LIB ENTRY) TO FREE DMS08480
  849. * R10 - RETURN ADDRESS DMS08490
  850. * DMS08500
  851. *EXIT CONDITIONS - DMS08510
  852. * CC = 0 -> LIBRARY DIRECTORY PAGE RELEASED, R7 IS ZERO. DMS08520
  853. * CC ยฌ 0 -> LIBRARY ENTRY RELEASED, DIRECTORY NOT EMPTY. DMS08530
  854. * R7 HOLDS NEXT ENTRY ADDRESS. DMS08540
  855. * DMS08550
  856. *NOTES - DMS08560
  857. * 1. R0 - R3, R14, R15 MODIFIED. DMS08570
  858. SPACE DMS08580
  859. *STEP 1: COMPUTE NUMBER OF BYTES LEFT AFTER CURRENT ENTRY DMS08590
  860. * DMS08600
  861. RELNTRY LA R1,LIBTLEN R1 <- LEN(LIB TAB) DMS08610
  862. AL R1,&STATE R1 <- A(LAST LIB TABLE BYTE)-PREFIX DMS08620
  863. LA R1,DMSRESRL(,R1) R1 <- A(LAST LIB TABLE BYTE) + 1 DMS08630
  864. SLR R1,R7 R1 <- ENDLOC - CURLOC (NUM BYTES) DMS08640
  865. LR R0,R7 R0 <- A(CURRENT ENTRY) DMS08650
  866. SPACE DMS08660
  867. *STEP 2: COMPUTE NUMBER OF BYTES TO BE MOVED AT ENTRY+1 DMS08670
  868. * DMS08680
  869. LA R14,LIBSIZE R1 <- SIZE(EACH ENTRY) DMS08690
  870. LR R15,R1 R15<- TOTAL LENGTH INC CUR_ENTRY DMS08700
  871. SLR R15,R14 R15<- TOTAL LENGTH AFTER CURRENT ENT DMS08710
  872. ALR R14,R0 R14<- A(NEXT ENTRY) DMS08720
  873. SPACE DMS08730
  874. *STEP 3: COMPRESS OUT THE DELETED ENTRY AND CHECK IF LIB TABLE EMPTY DMS08740
  875. * DMS08750
  876. MVCL R0,R14 COMPRESS LIB TABLE DMS08760
  877. L R3,&STATE R3 <- A(LIB TABLE) DMS08770
  878. CLI DMSRESRL(R3),0 IF FIRST ENTRY IS NOT NULL DMS08780
  879. BNER R10 THEN RETURN, ALL DONE DMS08790
  880. SPACE DMS08800
  881. *STEP 4: LIB TABLE IS EMPTY, RELEASE ITS STORAGE DMS08810
  882. * DMS08820
  883. MVC &STATE.(4),ASTATE2-DMSRESRC(R3) RESET STATE ADDRESS DMS08830
  884. L R2,=F'4096' GET SIZE(LIB TABLE) DMS08840
  885. ST R10,0(,R13) SAVE RPA DMS08850
  886. BAL R10,RELCORE RELEASE THE STORAGE DMS08860
  887. L R10,0(,R13) RESTORE RPA DMS08870
  888. SR R7,R7 NULL OUT ENTRY POINTER DMS08880
  889. BR R10 RETURN WITH CC = 0 DMS08890
  890. EJECT DMS08900
  891. *SUBROUTINE - DMS08910
  892. * RETNTRY DMS08920
  893. * DMS08930
  894. *FUNCTION - DMS08940
  895. * TO PLACE A VALUE IN THE CALLER'S REG 1. DMS08950
  896. * DMS08960
  897. *ENTRY CONDITIONS - DMS08970
  898. * R1 - VALUE TO BE RETURNED DMS08980
  899. * R10 - RETURN ADDRESS DMS08990
  900. * DMS09000
  901. *EXIT CONDITIONS - DMS09010
  902. * NONE. DMS09020
  903. * DMS09030
  904. *NOTES - DMS09040
  905. * 1. R15 MODIFIED. DMS09050
  906. SPACE DMS09060
  907. *STEP 1: RETURN VALUE TO CALLER DMS09070
  908. * DMS09080
  909. RETNTRY L R15,ASVCSECT GET A(SVCSECT) DMS09090
  910. L R15,CURRALOC-SVCSECT(,R15) GET A(SSAVE) DMS09100
  911. ST R1,EGPR1-SSAVE(,R15) SET NEW VALUE DMS09110
  912. BR R10 AND RETURN DMS09120
  913. EJECT DMS09130
  914. *SUBROUTINE - DMS09140
  915. * SCANP DMS09150
  916. * DMS09160
  917. *FUNCTION - DMS09170
  918. * TO CHECK IF WE ARE POINTING TO THE END OF THE PARAMS. DMS09180
  919. * DMS09190
  920. *ENTRY CONDITIONS - DMS09200
  921. * R8 - A(CURRENT TOKEN) DMS09210
  922. * R10 - RETURN ADDRESS DMS09220
  923. * DMS09230
  924. *EXIT CONDITIONS - DMS09240
  925. * CC = 0 -> END OF PARAM DATA FOUND. DMS09250
  926. * CC ยฌ 0 -> MORE PARAM DATA EXISTS DMS09260
  927. SPACE DMS09270
  928. *STEP 1: SET CC BASED ON CONTENTS OF TOKEN DMS09280
  929. * DMS09290
  930. SCANP CLI 0(R8),X'FF' IF PLIST END DMS09300
  931. BER R10 THEN RETURN W/ CC=0 DMS09310
  932. CLC 0(2,R8),=C'( ' IF OPTION LIST STARTING DMS09320
  933. BR R10 THEN RETURN, AS CC IS SET DMS09330
  934. EJECT DMS09340
  935. *SUBROUTINE - DMS09350
  936. * GETLIB DMS09360
  937. * DMS09370
  938. *FUNCTION - DMS09380
  939. * TO GET A(LIB TABLE) DMS09390
  940. * DMS09400
  941. *ENTRY CONDITIONS - DMS09410
  942. * R14 - RETURN ADDRESS DMS09420
  943. * DMS09430
  944. *EXIT CONDITIONS - DMS09440
  945. * CC = 0 -> LIB TABLE ALLOCATED; R7 HOLDS THE ADDRESS. DMS09450
  946. * CC ยฌ 0 -> LIB TABLE NOT ALLOCATED; R7 MEANINGLESS. DMS09460
  947. SPACE DMS09470
  948. *STEP 1: GET THE A(LIB TABLE PREFIX) AND COMPUTE THE TRUE ADDRESS DMS09480
  949. * DMS09490
  950. GETLIB L R7,&STATE GET A(CODE AREA) DMS09500
  951. LA R7,DMSRESRL(,R7) POINT TO START OF TABLE DMS09510
  952. SPACE DMS09520
  953. *STEP 2: CHECK IF LIB TABLE TRULY ALLOCATED DMS09530
  954. * DMS09540
  955. CL R7,AUSRAREA IF A(LIB TABLE) < USER AREA DMS09550
  956. BLR R14 THEN RETURN DMS09560
  957. CL R7,VMSIZE IF A(LIB TABLE) > LAST LOC DMS09570
  958. BHR R14 THEN RETURN DMS09580
  959. CLR R14,R14 ELSE SET CC = 0 DMS09590
  960. BR R14 AND RETURN DMS09600
  961. EJECT DMS09610
  962. *SUBROUTINE - DMS09620
  963. * GETLEN DMS09630
  964. * DMS09640
  965. *FUNCTION - DMS09650
  966. * TO COMPUTE THE LEN-1 OF A TOKEN. DMS09660
  967. * DMS09670
  968. *ENTRY CONDITIONS - DMS09680
  969. * R8 - A(TOKEN TO SCAN) DMS09690
  970. * R10 - RETURN ADDRESS DMS09700
  971. * DMS09710
  972. *EXIT CONDITIONS - DMS09720
  973. * R1 - LENGTH-1(TOKEN) DMS09730
  974. * R2 - A(LAST NON-BLANK CHAR) IN TOKEN DMS09740
  975. SPACE DMS09750
  976. *STEP 1: SCAN BACKWARDS FOR FIRTS NON-BLANK DMS09760
  977. * DMS09770
  978. GETLEN LA R1,7 SET UP FOR LEN COMP DMS09780
  979. LA R2,7(,R8) POINT TO LAST CHAR IN TOKEN DMS09790
  980. SPACE DMS09800
  981. GETLENA CLI 0(R2),C' ' IF CHAR ยฌ= ' ' DMS09810
  982. BNER R10 THEN DONE, FOUND THE LEN-1 DMS09820
  983. BCTR R2,0 ELSE BACK UP 1 CHAR DMS09830
  984. BCT R1,GETLENA AND CHECK CHAR OUT (DEC COUNT) DMS09840
  985. BR R10 ALL DONE, RETURN DMS09850
  986. EJECT DMS09860
  987. *SUBROUTINE - DMS09870
  988. * GETNUM DMS09880
  989. * DMS09890
  990. *FUNCTION - DMS09900
  991. * TO COMPUTE THE BINARY VALUE OF AN EBCDIC STRING. DMS09910
  992. * DMS09920
  993. *ENTRY CONDITIONS - DMS09930
  994. * R1 - LEN-1(TOKEN) DMS09940
  995. * R8 - A(TOKEN) TO CONVERT DMS09950
  996. * R10 - RETURN ADDRESS DMS09960
  997. * DMS09970
  998. *EXIT CONDITIONS - DMS09980
  999. * CC = 0 -> NUMBER CONVERTED, R15 HOLDS VALUE. DMS09990
  1000. * CC ยฌ 0 -> NUMBER INVALID OR GREATER THAN 256. DMS10000
  1001. * DMS10010
  1002. *NOTES - DMS10020
  1003. * 1. R0 IS MODIFIED. DMS10030
  1004. SPACE DMS10040
  1005. *STEP 1: PREPARE TO SCAN FOR INVALID DIGITS DMS10050
  1006. * DMS10060
  1007. GETNUM LA R0,1(,R1) GET FULL LENGTH DMS10070
  1008. LR R15,R8 R15 <- A(TOKEN) DMS10080
  1009. SPACE DMS10090
  1010. *STEP 2: MAKE SURE ALL DIGITS ARE VALID DMS10100
  1011. * DMS10110
  1012. GETNUM1 CLI 0(R15),C'0' IF CHAR < '0' DMS10120
  1013. BLR R10 THEN INVALID DMS10130
  1014. CLI 0(R15),C'9' IF CHAR > '9' DMS10140
  1015. BHR R10 THEN INVALID DMS10150
  1016. LA R15,1(,R15) ELSE BUMP TO NEXT ONE DMS10160
  1017. BCT R0,GETNUM1 AND CHECK NEXT ONE OUT DMS10170
  1018. SPACE DMS10180
  1019. *STEP 3: CONVERT THE ACTUAL STRING TO BINARY DMS10190
  1020. * DMS10200
  1021. EX R1,PACK PACK THE VALUE DMS10210
  1022. CP 0(8,R13),=PL2'256' IF VALUE > 256 DMS10220
  1023. BHR R10 THEN INVALID DMS10230
  1024. CVB R15,0(,R13) ELSE CONVERT TO BINARY DMS10240
  1025. LA R0,1 GET A COMPARE CONSTANT DMS10250
  1026. CR R15,R0 IF VALUE < 1 DMS10260
  1027. BLR R10 THEN ZERO AND IS INVALID DMS10270
  1028. SR R0,R0 ELSE SET CC = 0 DMS10280
  1029. BR R10 AND RETURN DMS10290
  1030. EJECT DMS10300
  1031. *SUBROUTINE - DMS10310
  1032. * RELCORE DMS10320
  1033. * DMS10330
  1034. *FUNCTION - DMS10340
  1035. * TO RELEASE PRIVATE STORAGE GOTTEN BY GETCORE. DMS10350
  1036. * DMS10360
  1037. *ENTRY CONDITIONS - DMS10370
  1038. * R2 - AMOUNT OF BYTES, TRUE, TO BE FREED. DMS10380
  1039. * R3 - A(STORAGE AREA) TO BE FREED. DMS10390
  1040. * R10 - RETURN ADDRESS. DMS10400
  1041. * DMS10410
  1042. *EXIT CONDITIONS - DMS10420
  1043. * NONE. DMS10430
  1044. SPACE DMS10440
  1045. *STEP 1: RESET THE PROTECT KEYS AND FREE THE STORAGE AREA DMS10450
  1046. * DMS10460
  1047. RELCORE MVI LKEY,X'0F' SET KEY X'F0' DMS10470
  1048. BAL R14,SETKEY SET THE PKEYS DMS10480
  1049. LR R0,R2 COPY BYTES DMS10490
  1050. SRL R0,3 GET DWORDS DMS10500
  1051. LR R1,R3 GET ADDRESS DMS10510
  1052. DMSFRET DWORDS=(0),LOC=(1) DMS10520
  1053. SPACE DMS10530
  1054. *STEP 2: ADJUST THE CMS FREETAB SO THAT CMS WILL GET ITS STORAGE DMS10540
  1055. * BACK. IF WE DID NOT, CMS WOULD DIE. DMS10550
  1056. * DMS10560
  1057. L R15,ADMSFRT GET A(FREETAB) DMS10570
  1058. USING FRDSECT,R15 DMS10580
  1059. L R1,FREELOW1 GET LOW WATER MARK DMS10590
  1060. ALR R1,R2 ADJUST IT UPWARDS DMS10600
  1061. ST R1,FREELOW1 UPDATE IT DMS10610
  1062. BR R10 AND RETURN DMS10620
  1063. DROP R15 DMS10630
  1064. EJECT DMS10640
  1065. *SUBROUTINE - DMS10650
  1066. * LOADTXT DMS10660
  1067. * DMS10670
  1068. *FUNCTION - DMS10680
  1069. * TO LOAD A TEXT DECK INTO PRIVATE STORAGE. DMS10690
  1070. * DMS10700
  1071. *ENTRY CONDITIONS - DMS10710
  1072. * R3 - ADDRESS AT WHICH THE ROUTINE IS TO BE LOADED. DMS10720
  1073. * R10 - RETURN ADDRESS DMS10730
  1074. * DMS10740
  1075. *EXIT CONDITIONS - DMS10750
  1076. * CC = 0 -> ROUTINE LOADED. REGISTERS CONTAIN: DMS10760
  1077. * R0 - A(NEXT LOAD POINT) DMS10770
  1078. * R1 - ENTRY POINT ADDRESS FROM THE LOADER. DMS10780
  1079. * CC ยฌ 0 -> ERROR DURING LOAD. DMS10790
  1080. * DMS10800
  1081. *NOTES - DMS10810
  1082. * 1. IN ALL CASES, R0, R1, R14, R15 ARE MODIFIED. DMS10820
  1083. SPACE DMS10830
  1084. *STEP 1: PLUG IN THE ORIGIN ADDRESS INTO THE COMMAND LINE DMS10840
  1085. * DMS10850
  1086. LOADTXT LINEDIT TEXT='........',BUFFA=LOADTXTA,DOT=NO,DISP=NONE, XDMS10860
  1087. SUB=(HEX,(R3)) DMS10870
  1088. MVI LOADTXTA,C' ' REMOVE THE LENGTH FIELD DMS10880
  1089. SPACE DMS10890
  1090. *STEP 2: INDICATE THAT IT IS OK TO LOAD ANYWHERE AND ISSUE THE LOAD DMS10900
  1091. * COMMAND VIA SVC 202. NOTE THAT THE CALLER MUST HAVE FILLED DMS10910
  1092. * IN THE NAME OF THE TEXT DECK TO BE LOADED AT LOADTXTN. DMS10920
  1093. * DMS10930
  1094. OI MODFLGS,SYSLOAD TELL LOADER TO SKIP CHECKS DMS10940
  1095. LA R1,LOADTXTC POINT TO COMMAND LINE DMS10950
  1096. SVC 202 ISSUE COMMAND SVC DMS10960
  1097. DC AL4(*+4) DMS10970
  1098. SPACE DMS10980
  1099. *STEP 3: PICK UP THE EPA THAT THE LOADER LEFT IN NUCON AND ZERO OUT DMS10990
  1100. * THE LOCATION COUNTER SO THAT THE NEXT LOAD DOES NOT FAIL DMS11000
  1101. * BECAUSE THE LOADER WILL TRY TO LOAD AFTER THAT LOC. THEN DMS11010
  1102. * EXIT BASED ON THE RC FROM THE LOADER. DMS11020
  1103. * DMS11030
  1104. L R0,LOCCNT GET NEXT LOAD POINT DMS11040
  1105. L R1,STRTADDR GET EPA DMS11050
  1106. XC LOCCNT(4),LOCCNT ZERO OUT LOC COUNTER DMS11060
  1107. LTR R15,R15 SET CC BASED ON RC DMS11070
  1108. BR R10 AND RETURN DMS11080
  1109. EJECT DMS11090
  1110. *SUBROUTINE - DMS11100
  1111. * TYPENTRY DMS11110
  1112. * DMS11120
  1113. *FUNCTION - DMS11130
  1114. * TO TYPE OR STACK A LIB TABLE ENTRY DMS11140
  1115. * DMS11150
  1116. *ENTRY CONDITIONS - DMS11160
  1117. * R7 - A(LIB TABLE ENTRY) DMS11170
  1118. * R10 - RETURN ADDRESS DMS11180
  1119. * DMS11190
  1120. *EXIT CONDITIONS - DMS11200
  1121. * IF SOMETHING WAS STACKED OR TYPED, HDR FLAG IS SET. DMS11210
  1122. * DMS11220
  1123. *NOTES - DMS11230
  1124. * 1. THE CALLER MUST INDICATE IF TYPING OR STACKING IS DMS11240
  1125. * WANTED BY THE OPTSTK & OPTYPE FLAG IN OBITS. DMS11250
  1126. * DMS11260
  1127. * 2. R0 - R4, R14, R15 MODIFIED. DMS11270
  1128. SPACE DMS11280
  1129. *STEP 1: CHECK IF A HEADER LINE IS TO BE TYPED. DMS11290
  1130. * DMS11300
  1131. TYPENTRY TM FBITS,HDR IF WE TYPED A HDR DMS11310
  1132. BO TYPENTRX THEN SKIP TYPING IT AGAIN DMS11320
  1133. OI FBITS,HDR ELSE INDICATE WE HAVE TYPED DMS11330
  1134. TM OBITS,OPNTYPE IF NOTYPE IS REQUESTED DMS11340
  1135. BO TYPENTRX THEN SKIP THE HEADER LINE DMS11350
  1136. WRTERM 'ENTRY ID E.P.A. PAGE AMT KEY ATTRIBUTES' DMS11360
  1137. SPACE DMS11370
  1138. *STEP 2: GATHER ALL INFORMATION TO BE TYPED OR STACKED DMS11380
  1139. * DMS11390
  1140. TYPENTRX TM OBITS,OPTYPE+OPTSTK IF NOTYPE & NOSTACK DMS11400
  1141. BZR R10 THEN ALL DONE DMS11410
  1142. MVC STSAVE(8),=8C' ' ELSE CLEAR AREA DMS11420
  1143. TM LIBFLAGS,LIBPERM IF FLAG NOT SET DMS11430
  1144. BNO *+10 THEN NOT PERM DMS11440
  1145. MVC STSAVE(4),=C'PERM' ELSE INDICATE PERM DMS11450
  1146. TM LIBFLAGS,LIBSYS IF INDICATOR NOT SET DMS11460
  1147. BNO *+10 THEN NOT SYSTEM ROUTINE DMS11470
  1148. MVC STSAVE+5(3),=C'SYS' ELSE INDICATE SYSTEM DMS11480
  1149. LM R2,R3,LIBLEN GET LENGTH AND LOC DMS11490
  1150. SRL R2,12 COMPUTE NUMBER OF PAGES DMS11500
  1151. SRL R3,12 COMPUTE PAGE NUMBER DMS11510
  1152. SR R4,R4 PREPARE FOR IC DMS11520
  1153. IC R4,LIBKEY GET STORAGE KEY DMS11530
  1154. EJECT DMS11540
  1155. *STEP 3: FORMAT THE DATA TO BE TYPED DMS11550
  1156. * DMS11560
  1157. LINEDIT TEXT='........ ...... ... ... .. ........', XDMS11570
  1158. DOT=NO,COMP=NO,RENT=NO,DISP=NONE,BUFFA=BUFFER, XDMS11580
  1159. SUB=(CHARA,LIBID,HEXA,LIBEPA,HEX,(R3),DEC,(R2), XDMS11590
  1160. DEC,(R4),CHARA,STSAVE) DMS11600
  1161. SPACE DMS11610
  1162. *STEP 4: CHECK IS WE MUST TYPE THE RESULTING DATA DMS11620
  1163. * DMS11630
  1164. TM OBITS,OPTYPE IF NOTYPING DMS11640
  1165. BNO TYPENTRW THEN SKIP THE WRTERM DMS11650
  1166. SR R2,R2 ELSE PREPARE FOR IC DMS11660
  1167. IC R2,BUFFER GET THE ACTUAL LENGTH DMS11670
  1168. WRTERM BUFFER+1,(2) WRITE THE LINE DMS11680
  1169. SPACE DMS11690
  1170. *STEP 4: CHECK IF WE MUST STACK THE LINE DMS11700
  1171. * DMS11710
  1172. TYPENTRW TM OBITS,OPTSTK IF STACK NOT WANTED DMS11720
  1173. BNOR R10 THEN RETURN DMS11730
  1174. MVC TYPENTRL(1),BUFFER ELSE SET THE LENGTH DMS11740
  1175. LA R1,TYPENTRP POINT TO STACK PLIST DMS11750
  1176. SVC 202 STACK THE LINE DMS11760
  1177. BR R10 AND RETURN DMS11770
  1178. SPACE 2 DMS11780
  1179. * STACK PLIST DMS11790
  1180. * DMS11800
  1181. TYPENTRP DC CL8'ATTN',C'FIFO' DMS11810
  1182. TYPENTRL DC AL4(BUFFER+1) DMS11820
  1183. EJECT DMS11830
  1184. *********************************************************************** DMS11840
  1185. * * DMS11850
  1186. * S T O R A G E A R E A S & C O N S T A N T S * DMS11860
  1187. * * DMS11870
  1188. *********************************************************************** DMS11880
  1189. SPACE DMS11890
  1190. * EXECUTED COMMANDS DMS11900
  1191. * DMS11910
  1192. PACK PACK 0(8,R13),0(0,R8) PACK A VALUE DMS11920
  1193. CLCOPT CLC OPTNAME-OPTBLOK(*-*,R5),0(R8) CHECK OPTIONA NAME DMS11930
  1194. CLCSYN CLC LOADTXTN(*-*),8(R3) LOOK FOR SYNONYM DMS11940
  1195. CLCFUNC CLC FUNCNAME(*-*),0(R8) CHECK FUNCTION NAME DMS11950
  1196. SPACE DMS11960
  1197. * LOAD COMMAND LINE DMS11970
  1198. * DMS11980
  1199. LOADTXTC DC CL8'LOAD' DMS11990
  1200. LOADTXTN DC 8C' ',CL8'(',CL8'NOMAP',CL7'ORIGIN' DMS12000
  1201. LOADTXTA DC 9C' ',8X'FF' DMS12010
  1202. SPACE DMS12020
  1203. * VALID FUNCTION TABLE DMS12030
  1204. * DMS12040
  1205. FUNCTAB DC CL8'ALLOCATE',AL1(NAMOK+PERMOK+KEYOK,0) DMS12050
  1206. B ALO -> FUNCTION DMS12060
  1207. DC CL8'DELETE',AL1(0,0) DMS12070
  1208. B DELT -> FUNCTION DMS12080
  1209. DC CL8'LIST',AL1(TYPOK+STKOK,SKPNAME) DMS12090
  1210. B LST DMS12100
  1211. FUNCTABE DC CL8'LOAD',AL1(PERMOK+SYSOK+NAMOK,0) DMS12110
  1212. B LOADF DMS12120
  1213. SPACE DMS12130
  1214. * VALID OPTION TABLE DMS12140
  1215. * DMS12150
  1216. OPTABLE DC CL8'KEY',AL1(KEYOK,OPTKEY,255,2) DMS12160
  1217. CHKKEY EQU OPTABLE DMS12170
  1218. CHKNAMO DC CL8'NAME',AL1(NAMOK,OPTNAM,255,3) DMS12180
  1219. DC CL8'NOTYPE',AL1(TYPOK,OPNTYPE,255-OPTYPE,2) DMS12190
  1220. DC CL8'PERM',AL1(PERMOK,OPTPERM,255,3) DMS12200
  1221. DC CL8'STACK',AL1(STKOK,OPTSTK,255,4) DMS12210
  1222. DC CL8'SYSTEM',AL1(SYSOK,OPTSYS,255,2) DMS12220
  1223. OPTABND DC CL8'TYPE',AL1(TYPOK,OPTYPE,255-OPNTYPE,0) DMS12230
  1224. EJECT DMS12240
  1225. * MISC. DMS12250
  1226. * DMS12260
  1227. SAVENUM DC H'0' SAVE AREA FOR NUMBER DMS12270
  1228. NEWNAME DC 8C' ' NEW NAME FOR NAME OPTION DMS12280
  1229. LKEY DC X'00' REQUESTED PROTECT KEY DMS12290
  1230. SPACE DMS12300
  1231. OBITS DC X'00' OPTION FLAG BYTE DMS12310
  1232. OPTPERM EQU X'01' PERM OPTION IN EFFECT DMS12320
  1233. OPTSTK EQU X'02' STACK OPTION IN EFFECT DMS12330
  1234. OPTYPE EQU X'04' TYPE OPTION IN EFFECT DMS12340
  1235. OPNTYPE EQU X'08' NOTYPE OPTION SPECIFIED DMS12350
  1236. OPTSYS EQU X'10' SYSTEM OPTION IN EFFECT DMS12360
  1237. OPTNAM EQU X'20' NAME OPTION IN EFFECT DMS12370
  1238. OPTKEY EQU X'40' KEY OPTION IN EFFECT DMS12380
  1239. SPACE DMS12390
  1240. FBITS DC X'00' MORE FLAGS DMS12400
  1241. HDR EQU X'10' HEADER HAS BEEN TYPED DMS12410
  1242. SEEKADR EQU X'20' SCANTAB TO SEARCH VIA ADDRESS DMS12420
  1243. SPACE DMS12430
  1244. BUFFER DC 50C' ' DMS12440
  1245. DTEMP DS 1D DOUBLEWORD WORK AREA DMS12450
  1246. SPACE DMS12460
  1247. LTORG DMS12470
  1248. EJECT DMS12480
  1249. *********************************************************************** DMS12490
  1250. * * DMS12500
  1251. * R E S I D E N T C O M M A N D P R O C E S S I N G * DMS12510
  1252. * * DMS12520
  1253. *********************************************************************** DMS12530
  1254. SPACE DMS12540
  1255. *STEP 1: MAKE SURE THAT ENTRY IS FROM DMSMOD VIA DMSITS DMS12550
  1256. * DMS12560
  1257. DS 0D ALIGN ON CORRECT BOUNDARY DMS12570
  1258. USING *,R15 DMS12580
  1259. DMSRESRC STM R0,R7,STSAVE SAVE SOME REGS DMS12590
  1260. LA R0,0(,R11) CLEAR TOP BYTE OF RETADDR DMS12600
  1261. CL R0,ACMSRET IF RETADDR >= DMSITS RPA DMS12610
  1262. BNL FINDRES4 THEN NOT PROPER CALL DMS12620
  1263. CLR R0,R5 IF RETADDR < DMSITS BASE ADDRESS DMS12630
  1264. BNH FINDRES4 THEN NOT PROPER CALL DMS12640
  1265. SPACE DMS12650
  1266. *STEP 2: MAKE SURE THAT THIS IS A PROPER DMSMOD CALLING SEQUENCE DMS12660
  1267. * DMS12670
  1268. CL R10,AFVS IF R10 ยฌ- A(FVSECT) DMS12680
  1269. BNE FINDRES4 THEN INVALID CALL DMS12690
  1270. LA R0,0(,R7) GET PARM ADDRESS DMS12700
  1271. L R3,ASVCSECT GET A(SVCSECT) DMS12710
  1272. LA R2,MODLIST-SVCSECT(,R3) POINT TO DMSITS PLIST DMS12720
  1273. CLR R2,R0 IF NOT CORRECT PLIST DMS12730
  1274. BNE FINDRES4 THEN BAG IT DMS12740
  1275. SPACE DMS12750
  1276. *STEP 3: INITIALIZE FOR DMSRESRC PROCESSING DMS12760
  1277. * DMS12770
  1278. LA R7,DMSRESRL(,R15) POINT TO START OF TABLE DMS12780
  1279. LA R0,LIBMAXN GET MAX NUMBER OF ENTRIES DMS12790
  1280. SPACE DMS12800
  1281. *STEP 4: ATTEMPT TO FIND RESIDENT COMMAND IN LIB TABLE DMS12810
  1282. * DMS12820
  1283. FINDRES1 CLC LIBID(8),8(R1) IF COMMAND NAMES THE SAME DMS12830
  1284. BE FINDRES2 THEN POSSIBLE MATCH DMS12840
  1285. CLI LIBID,X'01' IF END OF LIST FOUND DMS12850
  1286. BL FINDRES4 THEN COMMAND NOT FOUND DMS12860
  1287. LA R7,LIBSIZE(,R7) ELSE BUMP TO NEXT ENTRY DMS12870
  1288. BCT R0,FINDRES1 AND LOOK AT IT DMS12880
  1289. B FINDRES4 COMMAND NOT FOUND DMS12890
  1290. EJECT DMS12900
  1291. *STEP 5: CHECK IF ENTRY TRULY A COMMAND AND IF SO, PROCESS IT DMS12910
  1292. * DMS12920
  1293. FINDRES2 TM LIBFLAGS,LIBCMD IF NOT A COMMAND DMS12930
  1294. BNO FINDRES4 THEN IGNORE IT DMS12940
  1295. MVC STRTADDR(4),LIBEPA ELSE SET ENTRY POINT DMS12950
  1296. NI PROTFLAG,255-PRFUSYS ASSUME USER COMMAND DMS12960
  1297. TM LIBFLAGS,LIBSYS IF NOT SYSTEM DMS12970
  1298. BNO FINDRES3 THEN ASSUMPTION CORRECT DMS12980
  1299. OI SFLAG-SVCSECT(R3),SFSYS+SFNUC SET APPROPRIATE FLAGS DMS12990
  1300. SPACE DMS13000
  1301. *STEP 5: RETURN TO DMSITS SO THAT COMMAND EXECUTION MAY START DMS13010
  1302. * DMS13020
  1303. FINDRES3 SR R15,R15 SET RC = 0 DMS13030
  1304. BR R11 AND RETURN DMS13040
  1305. SPACE DMS13050
  1306. *STEP 7: INVALID ENTRY OR COMMAND NOT FOUND, CONTINUE W/ NORMAL XEQ DMS13060
  1307. * DMS13070
  1308. FINDRES4 LM R0,R7,STSAVE RESTORE THE REGS DMS13080
  1309. L R15,ASTATE2 GET A(TRUE STATE ROUTINE) DMS13090
  1310. BR R15 AND CONTINUE NORMALLY DMS13100
  1311. SPACE DMS13110
  1312. * STORAGE FOR LOCAL ROUTINE DMS13120
  1313. * DMS13130
  1314. ASTATE2 DC A(0) A(TRUE STATE ROUTINE) DMS13140
  1315. STSAVE DS 9F SAVE AREA DMS13150
  1316. SPACE DMS13160
  1317. DMSRESRL EQU (*-DMSRESRC+7)/8*8 LENGTH OF SPECIAL CODE DMS13170
  1318. DROP R15 DMS13180
  1319. EJECT DMS13190
  1320. *********************************************************************** DMS13200
  1321. * * DMS13210
  1322. * L O C A L D S E C T S * DMS13220
  1323. * * DMS13230
  1324. *********************************************************************** DMS13240
  1325. SPACE DMS13250
  1326. * MAPPING OF FUNCTAB DMS13260
  1327. * DMS13270
  1328. FUNCBLOK DSECT DMS13280
  1329. FUNCNAME DC 8C' ' NAME OF FUNCTION DMS13290
  1330. FUNCOPT DC X'00' VALID OPTIONS FOR FUNCTION DMS13300
  1331. TYPOK EQU X'01' TYPE/NOTYPE OPTION VALID DMS13310
  1332. STKOK EQU X'02' STACK OPTION VALID DMS13320
  1333. SYSOK EQU X'04' SYSTEM OPTION VALID DMS13330
  1334. PERMOK EQU X'08' PERM OPTION VALID DMS13340
  1335. NAMOK EQU X'10' NAME OPTION VALID DMS13350
  1336. KEYOK EQU X'20' KEY OPTION VALID DMS13360
  1337. FUNCFLAG DC X'00' PROCESSING OPTIONS DMS13370
  1338. IXEQ EQU X'01' EXECUTE IMMEDIATELY DMS13380
  1339. NOFPROC EQU X'02' DO NOT SCAN FOR FUNCTION <ID> DMS13390
  1340. SKPNAME EQU X'04' FUNCTION <ID> IS OPTIONAL DMS13400
  1341. FUNCXEQ NOP 0 EXECUTION BRANCH DMS13410
  1342. FUNCTABL EQU *-FUNCBLOK LENGTH OF EACH ENTRY DMS13420
  1343. SPACE DMS13430
  1344. * MAPPING OF OPTION TABLE DMS13440
  1345. * DMS13450
  1346. OPTBLOK CSECT DMS13460
  1347. OPTNAME DC 8C' ' NAME OF OPTION DMS13470
  1348. OPTVALID DC X'00' OPTION/FUNCTION MAPPING FLAGS DMS13480
  1349. OPTBITS DC X'00' OPTION INDICATORS DMS13490
  1350. OPTMASK DC X'00' MASK FOR RESETTING OPTION INDICATORS DMS13500
  1351. OPTLEN DC X'00' MINIMUM ABBREVIATION AS LEN-1 DMS13510
  1352. OPTABLN EQU *-OPTBLOK LEN(EACH ENTRY) DMS13520
  1353. SPACE DMS13530
  1354. * MAPPING OF A LIB TABLE ENTRY DMS13540
  1355. * DMS13550
  1356. LIBNTRY DSECT DMS13560
  1357. LIBID DC 8C' ' FNAME IN AREA DMS13570
  1358. LIBEPA DC A(0) ENTRY POINT ADDRESS DMS13580
  1359. LIBFLAGS EQU LIBEPA FLAGS AS FOLLOWS: DMS13590
  1360. LIBPERM EQU X'80' PERM SPACE DMS13600
  1361. LIBSYS EQU X'40' SYSTEM SPACE DMS13610
  1362. LIBCMD EQU X'20' COMMAND ROUTINE LOADED DMS13620
  1363. LIBLEN DC A(0) LENGTH OF STORAGE AREA DMS13630
  1364. LIBADR DC A(0) ADDRESS OF STORAGE AREA DMS13640
  1365. LIBKEY EQU LIBADR ASSIGNED STORAGE PROTECT KEY DMS13650
  1366. LIBSIZE EQU *-LIBNTRY SIZE OF EACH ENTRY DMS13660
  1367. LIBTLEN EQU 4096-DMSRESRL LENGTH(LIB TABLE) DMS13670
  1368. LIBMAXN EQU LIBTLEN/LIBSIZE MAX NUMBER OF ENTRIES DMS13680
  1369. EJECT DMS13690
  1370. NUCON DMS13700
  1371. DMSFRT DMS13710
  1372. CMSAVE DMS13720
  1373. SVCSECT DMS13730
  1374. REGEQU DMS13740
  1375. END DMSRES DMS13750
ibm/vm370-lib/cms/dmsres.assemble_src.txt ยท Last modified: 2023/08/06 13:35 by Site Administrator