DEF TITLE 'DMKDEF (CP) VM/370 - RELEASE 6' 00001000
ISEQ 73,80 00002000
COPY OPTIONS 00003000
COPY LOCAL 00004000
SPACE 2 00005000
*. 00006000
* MODULE NAME - 00007000
* 00008000
* DMKDEF 00009000
* 00010000
* CONTENTS - 00011000
* 00012000
* DMKDEFIN - 'DEFINE' A VIRTUAL DEVICE 00013000
*. 00014000
SPACE 00015000
DMKDEF CSECT 00016000
SPACE 00017000
DC CL8'DMKDEF' PAGEABLE MODULE IDENTIFIER 00018000
SPACE 00019000
USING SAVEAREA,R13 00020000
USING DMKDEF,R12 00021000
USING VMBLOK,R11 00022000
USING PSA,0 00023000
SPACE 2 00024000
EXTRN DMKSCNFD,DMKSCNVU,DMKSCNVN,DMKCFPRR,DMKCFPRD 00025000
EXTRN DMKCVTHB,DMKCVTBH,DMKCVTDB,DMKCVTBD 00026000
EXTRN DMKLOCKQ,DMKLOCKD,DMKUDRFU,DMKUDRRD,DMKUDRRV 00027000
EXTRN DMKVDSDF,DMKPGSPO,DMKBLDRL,DMKBLDRT 00028000
EXTRN DMKERMSG,DMKSCNVD 00029000
EXTRN DMKVCARS 00030000
EXTRN DMKQCNWT @VA01771 00031000
EXTRN DMKUDRMD @V407466 00032000
EXTRN DMKSCNRU,DMKSSSDE @V60B6B8 00033000
EXTRN DMKDEHIN @VA13361 00033300
EJECT 00034000
*. 00035000
* SUBROUTINE NAME - 00036000
* 00037000
* DMKDEFIN - 'DEFINE' (OR REDEFINE) A VIRTUAL DEVICE OR STORAGE 00038000
* 00039000
* FUNCTION - 00040000
* 00041000
* TO DYNAMICALLY ALTER OR AUGMENT THE VIRTUAL MACHINE 00042000
* DEVICE CONFIGURATION OR STORAGE SIZE. 00043000
* 00044000
* COMMAND LINE FORMAT - 00045000
* 00046000
* +--------+---------------------------------------+ 00047000
* | DEFINE | READER <AS> VADDR | 00048000
* | --- | PRINTER <AS> VADDR <1403> | 00049000
* | | <3211> | 00050000
* | | <3203> | 00051000
* | | 1403 <AS> VADDR | 00052000
* | | 3211 <AS> VADDR , 00053000
* | | 3203 <AS> VADDR | 00054000
* | | PUNCH <AS> VADDR | 00055000
* | | CONSOLE <AS> VADDR | 00056000
* | | TIMER <AS> VADDR | 00057000
* | | CTCA <AS> VADDR | 00058000
* | | <IBM1> | 00059000
* | | LINE <AS> VADDR <TELE2> | 00060000
* | | | 00061000
* | | GRAF <AS> VADDR <3270> | 00062000
* | | <3138> | 00063000
* | | <3148> | 00064000
* | | <3158> | 00065000
* | | <3033> | 00065100
* | | <3036> | 00065200
* | | | 00066000
* | | VADDR <AS> VADDR | 00067000
* | | | 00068000
* | | T2305 <AS> VADDR <CYL> NNN | 00069000
* | | T2314 <AS> VADDR <CYL> NNN | 00070000
* | | T2319 <AS> VADDR <CYL> NNN | 00071000
* | | T3340 <AS> VADDR <CYL> NNN | 00072000
* | | T3330 <AS> VADDR <CYL> NNN | 00073000
* | | T3350 <AS> VADDR <CYL> NNN | 00074000
* | | T3375 <AS> VADDR <CYL> NNN | HRC106DK 00074100
* | | T3380 <AS> VADDR <CYL> NNN | HRC106DK 00074200
* | | | 00075000
* | | STORAGE <AS> NNNNNK | 00076000
* | | STORAGE <AS> NNM | 00077000
* | | | 00078000
* | | CHANNELS <AS> <SEL|BMX> | 00079000
* +--------+---------------------------------------+ 00080000
* 00081000
* ATTRIBUTES - 00082000
* 00083000
* REENTRANT, PAGEABLE, CALLED VIA SVC 00084000
* 00085000
* ENTRY CONDITIONS - 00086000
* 00087000
* GPR 2 = 0 00088000
* GPR 9 = ADDRESS OF COMMAND BUFFER 00089000
* GPR 11 = ADDRESS OF USER'S VMBLOK 00090000
* GPR 12 = ADDRESS OF DMKDEFIN 00091000
* GPR 13 = ADDRESS OF STANDARD SAVE AREA 00092000
* 00093000
* EXIT CONDITIONS - 00094000
* 00095000
* GPR 2 = 0 IF DEVICE HAS BEEN DEFINED, OR 00096000
* ERROR-CODE (SEE ERROR MESSAGES) IF UNSUCCESSFUL. 00097000
EJECT 00098000
* CALLS TO OTHER ROUTINES - 00099000
* 00100000
* DMKSCNFD 00101000
* DMKCVTDB 00102000
* DMKCVTBD 00103000
* DMKCVTBH 00104000
* DMKSCNVN 00105000
* DMKCVTHB 00106000
* DMKSCNVU 00107000
* DMKSCNVD 00108000
* DMKERMSG 00109000
* DMKLOCKQ 00110000
* DMKLOCKD 00111000
* DMKUDRFU 00112000
* DMKUDRRD 00113000
* DMKUDRRV 00114000
* DMKPGSPO 00115000
* DMKCFPRR 00116000
* DMKCFPRD 00117000
* DMKBLDRL 00118000
* DMKBLDRT 00119000
* DMKVDSDF 00120000
* DMKVCARS 00121000
* DMKQCNWT 00122000
* DMKFREE 00123000
* 00124000
* EXTERNAL REFERENCES - 00125000
* 00126000
* NONE 00127000
* 00128000
* TABLES / WORK AREAS - 00129000
* 00130000
* UDEVBLOK (DUMMY FOR USE BY DMKVDSDF SUBROUTINE) 00131000
* 00132000
* REGISTER USAGE - 00133000
* 00134000
* GPR 9 = ADDRESS OF COMMAND BUFFER 00135000
* GPR 11 = ADDRESS OF USER'S VMBLOK 00136000
* GPR 12 = BASE REGISTER 00137000
* GPR 13 = ADDRESS OF STANDARD SAVE AREA 00138000
* 00139000
* GPRS 0-5 AND 14-15 ARE WORK REGISTERS. 00140000
* 00141000
* GPRS 6-8 AND 10 ARE NOT USED. 00142000
* 00143000
* NOTES - 00144000
* 00145000
* THIS MODULE WAS SPLIT FOR REL 060. CODE FOR DEFINE STORAGE 00146000
* AND DEFINE CHANNEL WAS MOVED TO DMKDEH. DESCRIPTIONS OF 00146200
* THOSE FUNCTIONS REMAIN HERE ALSO WITH AN ANNOTATION THAT 00146400
* THE CODE EXISTS IN DMKDEH. 00146600
EJECT 00147000
* OPERATION - 00148000
* 00149000
* 1. THE INPUT LINE IS SCANNED VIA DMKSCNFD, DMKCVTDB, AND 00150000
* DMKCVTHB TO OBTAIN AND CONVERT TO BINARY (WHERE APPROPRIATE) 00151000
* THE MNEMONIC DEVICE TYPE DEFINITION, NUMBER OF CYLINDERS 00152000
* DESIRED (FOR TDSK ONLY), AND HEX VIRTUAL DEVICE ADDRESS. IF 00153000
* ANY NEEDED FIELDS ARE OMITTED OR INVALID, AN ERROR-MESSAGE AND 00154000
* ERROR-CODE ARE RETURNED TO THE CALLER. 00155000
* 00156000
* 2. THE DEVICE TYPE DEFINITION MUST BE ONE OF THE FOLLOWING: 00157000
* MNEMONIC TYPE OF DEVICE 00158000
* -------- -------------- 00159000
* READER CARD READER 00160000
* RDR " " 00161000
* R " " 00162000
* PRINTER PRINTER 00163000
* PRT " 00164000
* PTR " 00165000
* P " 00166000
* 1403 VIRTUAL 1403 PRINTER 00167000
* 3211 VIRTUAL 3211 PRINTER 00168000
* 3203 VIRTUAL 3203 PRINTER 00169000
* PUNCH CARD PUNCH 00170000
* PCH " " 00171000
* PU " " 00172000
* CONSOLE VIRTUAL CONSOLE 00173000
* CON " " 00174000
* TIMER PSEUDO TIMING DEVICE 00175000
* TIM " " " 00176000
* CTCA VIRTUAL CHAN-TO-CHAN ADAPTER 00177000
* CTC " " " " " 00178000
* LINE VIRTUAL 27XX LINE 00179000
* LI " " " 00180000
* GRAF VIRTUAL 3270, 3138, 3148, 3158 00181000
* GR 00182000
* T2305 VIRTUAL 2305 00183000
* T2314 VIRTUAL 2314 00184000
* T2319 VIRTUAL 2319 00185000
* T3340 VIRTUAL 3340 00186000
* T3330 VIRTUAL 3330 00187000
* T3350 VIRTUAL 3350 00188000
* T3375 VIRTUAL 3375 HRC106DK 00188100
* T3380 VIRTUAL 3380 HRC106DK 00188200
* STORAGE REDEFINED VIRTUAL STORAGE 00189000
* STOR " " " 00190000
* CHANNELS REDEFINES VIRTUAL CHANNELS 00191000
* CHAN " " " 00192000
* (AN ERROR IS RETURNED IF THE DEFINED DEVICE IS NONE OF THESE) 00193000
* 00194000
* 3. IF THE DEFINED DEVICE TYPE IS SATISFACTORY, THE DESIRED 00195000
* NUMBER OF CYLINDERS (FOR T-DISK ONLY) IS OBTAINED FROM THE 00196000
* COMMAND LINE, AND THE HEX VIRTUAL DEVICE ADDRESS OBTAINED 00197000
* AND CHECKED. IF OK, THEN DMKSCNVU IS CALLED TO MAKE SURE THE 00198000
* SPECIFIED VIRTUAL DEVICE DOES NOT ALREADY EXIST. (ERROR 00199000
* CODE AND MESSAGE RETURNED IF APPROPRIATE.) 00200000
* 00201000
* 4. THEN DMKVDSDF IS CALLED TO PERFORM THE NECESSARY 00202000
* INTERNAL FUNCTIONS TO DEFINE THE VIRTUAL DEVICE. IF AN 00203000
* ERROR IS RETURNED (I.E. FOR T-DISK SPACE NOT AVAILABLE), 00204000
* AN ERROR-CODE AND MESSAGE ARE RETURNED TO THE CALLER OF 00205000
* DMKDEFIN. IF A VIRTUAL DEVICE IS BEING DEFINED AND 00206000
* DMKVDS RETURNS AN ERROR CODE OF 32 IN REGISTER TWO 00207000
* INDICATING INSUFFICIENT FREE STORAGE TO CREATE NEW 00208000
* VIRTUAL BLOCKS, DMKDEF WILL ISSUE ERROR MSG DMKDEF095E. 00209000
* IF A VIRTUAL DEVICE IS BEING REDEFINED, THE NEW BLOCKS 00210000
* WILL BE CREATED VIA A CALL TO DMKVDSDF PRIOR TO THE OLD 00211000
* DEVICE BEING RESET AND PRIOR TO REMOVING THE OLD VDEVBLOK/ 00212000
* VCUBLOK/VCHBLOK FROM THE ACTIVE VIRTUAL BLOCK LISTS. 00213000
* ERROR MESSAGE DMKDEF095E WILL BE ISSUED IF FREE STORAGE 00214000
* CANNOT BE OBTAINED TO CREATE THE NEW BLOCKS. 00215000
EJECT 00216000
* 5. FOR DEFINE STORAGE AND DEFINE CHANNEL, A CALL IS MADE TO 00217000
* DMKDEHIN. THAT MODULE WILL: 00217300
* A. FOR DEFINE STORAGE, AFTER THE USUAL CHECKS FOR COMMAND 00217600
* VALIDITY, THE USER MACHINE BLOCK IN THE CP DIRECTORY FOR THE 00218000
* USER IS CHECKED TO ENSURE THAT THE DESIRED STORAGE SIZE DOES 00219000
* NOT EXCEED THE MAXIMUM STORAGE SIZE PERMITTED TO THE USER. 00220000
* (IF TOO LARGE, ERROR MESSAGE AND CODE RETURNED). IF OK, THEN 00221000
* ALL TABLES PERTAINING TO THE STORAGE PRESENTLY IN USE FOR THE 00222000
* USER'S VIRTUAL MACHINE ARE RETURNED TO FREE STORAGE, AND NEW 00223000
* SEGMENT, PAGE, AND SWAP TABLES ARE CREATED BASED ON THE 00224000
* REQUESTED STORAGE SIZE. 00225000
* 00225300
* B. FOR DEFINE CHANNELS, AFTER THE VALIDATION OF THE COMMAND, 00225600
* 6. FOR DEFINE CHANNELS, AFTER THE VALIDATION OF THE COMMAND, 00226000
* DMKCFPRR IS CALLED TO RESET THE VIRTUAL MACHINE. THE VIRTUAL 00227000
* MACHINES CONTROL BLOCKS (I/O) ARE THE SCANNED, AND THE VIRTUAL 00228000
* CHANNELS ARE FLAGGED ACCORDING TO THE OPTION REQUESTED. ANY 00229000
* VIRTUAL CHANNEL THAT HAS A CTCA ATTACHED TO IT WILL BE FLAGGED 00230000
* AS BEING A SELECTOR CHANNEL. 00231000
* 00232000
* RESPONSES - 00233000
* 00234000
* 'TYPE XXX DEFINED' 00235000
* 'DASD XXX DEFINED NNN CYL' 00236000
* ++ 'STORAGE = NNNNNK' 00237000
* ++ 'CHANNELS = XXX' 00237600
* 00239000
* NOTE - NORMAL RESPONSES WILL BE SUPPRESSED IF USER ISSUED 00240000
* "SET IMSG OFF" COMMAND. 00241000
* - ++ INDICATES THAT RESPONSE IS FROM DMKDEHIN 00241300
* 00241600
* 00242000
* ERROR MESSAGES - 00243000
* 00244000
* DMKDEF003E INVALID OPTION - $OPTION$ 00245000
* DMKDEF022E VADDR MISSING OR INVALID 00246000
* ++ DMKDEF025E STORAGE MISSING OR INVALID 00247000
* DMKDEF026E OPERAND MISSING OR INVALID 00249000
* DMKDEF040E DEV VADDR DOES NOT EXIST 00250000
* DMKDEF153E DEVICE VADDR EXCEEDS MAX NUM OF VIRTUAL DEVICES 00250500
* DMKDEF091E TYPE VADDR NOT DEFINED; TEMP SPACE NOT AVAILABLE 00251000
* DMKDEF092E DEV VADDR NOT DEFINED; TYPE VADDR ALREADY DEFINED 00252000
* ++ DMKDEF094E STORAGE EXCEEDS ALLOWED MAXIMUM 00253000
* DMKDEF095E DEV VADDR NOT DEFINED; INSUFFICIENT FREE STORAGE 00254000
* DMKDEF136E DEV VADDR NOT DEFINED; CHAN XX DEDICATED 00255000
* 00255300
* ++ - INDICATES THAT MESSAGE COME FROM DMKDEH (WITH DEH PREFIX) 00255600
*. 00256000
EJECT 00257000
DMKDEFIN RELOC , DEFINE OR RE-DEFINE VIRTUAL DEVICE 00258000
XC DEFLAGS(4),DEFLAGS CLEAR FLAG BITS (SAVEWRK1) 00259000
LA R10,SAVEWRK3 DUMMY 'UDEVBLOK' FOR DMKVDSDF 00260000
USING UDEVBLOK,R10 .... 00261000
XC UDEVBLOK(20),UDEVBLOK CLEAR TO ZEROES 00262000
SPACE 00263000
CALL DMKSCNFD FIND FIRST PARAMETER 00264000
BNZ INVTYPE TYPE MISSING OR INVALID 00265000
LR R6,R0 LENGTH... 00266000
BCTR R6,0 ...MINUS ONE FOR COMPARE 00267000
LA R3,DEFLIST LIST OF VALID TYPES 00268000
LA R4,DEFENTS LENGTH OF ONE ENTRY 00269000
LA R5,DEFLAST LAST ENTRY IN TABLE 00270000
SPACE 00271000
DEFLOOP EQU * VALIDATE DEVICE TYPE 00272000
EX R6,SCANCLC MATCH AGAINST TABLE 00273000
BNE DEFSKIP NOPE 00274000
CH R6,8(0,R3) ABOVE MINIMUM ? 00275000
BNL DEFFIND YES - FOUND THE ENTRY 00276000
DEFSKIP EQU * SKIP TO NEXT ENTRY 00277000
BXLE R3,R4,DEFLOOP 00278000
* MIGHT BE "DEFINE VADD AS VADD" 00279000
MVI SAVEWRK1,VIRTUAL SET FLAG, JUST IN CASE @VA12868 00279100
EX R6,VIRTUAL1 CHECK FOR 'VIRTUAL' @VA12868 00279200
BE TESTCLAS YES...MUST BE CLASS 'B' @VA12868 00279300
MVI SAVEWRK1,SYSVIRT SET FLAG, JUST IN CASE @VA12868 00279400
EX R6,SYSVIRT1 CHECK FOR 'SYSVIRT' @VA12868 00279500
BE TESTCLAS YES...MUST BE CLASS 'B' @VA12868 00279600
NI SAVEWRK1,255-SYSVIRT ZERO OUT BIT AGAIN @VA13632 00279700
CL R6,F2 CAN ADJUSTED LENGTH BE VADDR? @VA05256 00280000
BH INVTYPE NO GOOD @VA13632 00281200
CALL DMKCVTHB ATTEMPT CONVERSION 00282000
BNZ INVTYPE NO GOOD 00283000
MAXDV R15 GET HIGHEST DEVICE WE SUPPORT 00284000
CLR R1,R15 WITHIN RANGE ? 00285000
BH INVVADD ...TOO BAD 00286000
ST R1,DEVADDR SAVE IN WORK-AREA 00287000
OI DEFLAGS,CHANGED REMEMBER WHAT IT IS 00288000
B SCANOPT CONTINUE SCANNING 00289000
TESTCLAS EQU * CHECK OUT CALLER'S CLASS @V60B6B8 00297000
* 00298000
* CALLER MUST HAVE PRIVILEGE CLASS 'B' TO ISSUE 00299000
* THE DEFINE VIRTUAL OR SYSVIRT COMMAND 00300000
* 00301000
TM VMCLEVEL,VMCLASSA+VMCLASSB IS CALLER OK @V60B6B8 00302000
BNZ DEFMSS CALLER OK, PROCESS COMMAND @V60B6B8 00303000
LA R0,L7 LENGTH OF MESSAGE INSERT @V60B6B8 00304000
LA R2,L3 MSG ID = 003 @V60B6B8 00305000
MVC SAVEWRK2(7),0(R1) SAVE INVALID OPTION FIELD @V60B6B8 00306000
B MSGONLY PUT OUT MSG - 'INVALID OPTION' @V60B6B8 00307000
EJECT 00308000
DEFFIND EQU * FOUND THE TYPE KEYWORD 00309000
LH R6,10(0,R3) GET DEVICE TYPE CLASS, TYPE 00310000
STH R6,UDEVTYPC ...INTO DUMMY UDEVBLOK 00311000
SCANOPT EQU * 00312000
CALL DMKSCNFD LOOK FOR OPTIONAL "AS" 00313000
BNZ INVVADD 00314000
LR R4,R0 LENGTH... 00315000
BCTR R4,0 00316000
EX R4,FINDAS CHECK IT 00317000
BNE CVTVADD NO - MUST BE AN ADDRESS 00318000
CALL DMKSCNFD SCAN FOR ADDRESS 00319000
BNZ INVVADD 00320000
LR R4,R0 PICK UP LENGTH @VA05256 00321000
BCTR R4,0 DECREMENT AS R4 WAS ABOVE @VA05256 00322000
CVTVADD EQU * CONVERT VIRTUAL DEVICE ADDRESS 00323000
CLI UDEVTYPC,X'FF' IS IT 'DEFINE STORAGE' ? 00324000
BE DEFCORE YES 00325000
CLI UDEVTYPC,X'FE' IS IT DEFINE CHANNEL CMD ? @VA01771 00326000
BE DEFCHAN YES - DO IT @VA01771 00327000
CL R4,F2 VALID LENGTH FOR VADDR? @VA05256 00328000
BH INVVADD NO THEN GO WRITE ERR MSG. @VA05256 00329000
CALL DMKCVTHB OTHERWISE, CONVERT THE ADDR 00330000
BNZ INVVADD NO GOOD 00331000
MAXDV R15 GET HIGHEST DEVICE WE SUPPORT 00332000
CLR R1,R15 WITHIN RANGE ? 00333000
BH INVVADD 00334000
STH R1,UDEVADD ...INTO DUMMY UDEVBLOK 00335000
CKDASD CLI UDEVTYPC,CLASDASD T -DISK ? 00336000
BNE SCNTERM NO 00337000
OI DEFLAGS,DEFTDSK DEFINING A T-DISK 00338000
OI UDEVSTAT,UDEVTDSK ... 00339000
CYLSCAN EQU * SEE IF HE SAID "CYL" 00340000
CALL DMKSCNFD 00341000
BNZ INVCYLS 00342000
CLC 0(4,R1),=CL4'CYL ' NO ABBREVIATIONS HERE... 00343000
BE CYLSCAN IT'S O.K. - GET "NNN" 00344000
C R0,F4 NNNN parm greater than 4 chars? HRC106DK 00345100
BH INVCYLS YES, INVALID REQUEST @VA03395 00346000
CALL DMKCVTDB CONVERT TO BINARY 00347000
BNZ INVCYLS 00348000
LTR R1,R1 CHECK FOR NNN OF ZERO @VA02559 00349000
BZ INVCYLS NO GOOD-WHY BOTHER ASKING FOR 0 @VA02559 00350000
* CYLS 00351000
STH R1,UDEVNCYL INTO THE UDEVBLOK 00352000
B GOVDSAT GO PERFORM ACTUAL DEFINE 00353000
TSTIBM1 CLC 0(*-*,R1),=CL8'IBM1' LINE ADAPTER OPTION 00354000
TSTELE2 CLC 0(*-*,R1),=CL8'TELE2' " " " " " 00355000
VIRTCHAR DC CL8'VIRTUAL ' COMPARAND FOR 'DEF VIRTUAL' @V60B6B8 00360000
SYSVCHAR DC CL8'SYSVIRT ' COMPARAND FOR 'DEF SYSVIRT' @V60B6B8 00361000
VIRTUAL1 CLC 0(*-*,R1),=CL8'VIRTUAL ' DEF VIRTUAL @VA12868 00361100
SYSVIRT1 CLC 0(*-*,R1),=CL8'SYSVIRT ' DEF SYSVIRT @VA12868 00361200
EJECT 00362000
SCNTERM CLI UDEVTYPC,CLASTERM TERMINALL TYPE ?? @V200730 00363000
BNE SCNGRF NO, TEST FOR GRAF @V200730 00364000
CLI UDEVTYPE,TYPIBM1 WAS "LINE" SPECIFIED ? 00365000
BNE GOVDSAT GO DEFINE @V200730 00366000
CALL DMKSCNFD SEE IF ADAPTER TYPE IS GIVEN 00367000
BNZ GOVDSAT NO 00368000
LR R2,R0 PARAMETER LENGTH 00369000
C R2,F3 THIS IS THE MINIMUM LENGTH 00370000
BL INVOPTS NO GOOD 00371000
C R2,F5 THIS IS THE MAXIMUM LENGTH 00372000
BH INVOPTS NO GOOD 00373000
BCTR R2,0 DECREMENT FOR COMPARES 00374000
EX R2,TSTIBM1 CHECK FOR DEFAULT 'IBM1' 00375000
BE GOVDSAT YUP 00376000
EX R2,TSTELE2 CHECK FOR TELETYPE (R) 00377000
BNE INVOPTS OOPS..HE GOOFED 00378000
MVI UDEVTYPE,TYPTELE2 ...WE HAVE TO CHANGE THE ADAPTER 00379000
B GOVDSAT DEFINE DEVICE @V200930 00380000
SPACE 00381000
SCNGRF CLI UDEVTYPC,CLASGRAF IS IT A GRAF DEVICE ?? @V200730 00382000
BNE SCNUR NO, CONT @V200730 00383000
CALL DMKSCNFD GET OPTION @V200730 00384000
BNZ GOVDSAT NONE, GO DEFINE @V200730 00385000
LR R2,R0 GET SIZE @V200730 00386000
CL R2,F4 MUST BE 4 @V200730 00387000
BNE INVOPTS SORRY ABOUT THAT @V200730 00388000
CLC 0(4,R1),=CL4'3270' IS IT A 3270 @VA08560 00390000
BE GOVDSAT YES, GO DEFINE @V200730 00391000
CLC 0(4,R1),=CL4'3138' IS IT A 3138 CONSOLE @VA08560 00392100
BE IND3158 YES--GO INDICATE IT @V386298 00393000
CLC 0(4,R1),=CL4'3148' IS IT A 3148 CONSOLE @VA08560 00394000
BE IND3158 YES--GO INDICATE A 3158 @V386298 00395000
CLC 0(4,R1),=CL4'3158' IS IT A 3158 CONSOLE @VA08560 00396000
BE IND3158 YES,INDICATE CONSOLE @VA08560 00397100
CLC 0(4,R1),=CL4'3036' IS IT A 3036 CONSOLE @VA08560 00397200
BE IND3158 YES,INDICATE CONSOLE @VA08560 00397300
CLC 0(4,R1),=CL4'3066' IS IT A 3066 CONSOLE @VA08560 00397400
BE IND3158 YES,INDICATE CONSOLE @VA08560 00397500
B INVOPTS NOPE, INVALID @V200730 00398000
IND3158 EQU * @V386298 00399000
OI UDEVSTAT,UDEV3158 INDICATE 3158 @VA03566 00400000
B GOVDSAT GO DO ATTACH @VA03566 00401000
SPACE 00402000
SCNUR CLI UDEVTYPC,CLASURO IS IT OUTPUT DEVICE ?? @V200930 00403000
BE SCNPRT YES, TEST FOR OPTION @V200930 00404000
CLI UDEVTYPC,CLASURI IS IT INPUT DEVICE ?? @V200930 00405000
BNE GOVDSAT NO, DEFINE DEVICE @V200930 00406000
SCNPRT MVI UDEVCLAS,C'A' DEFAULT OUTPUT CLASS @V200930 00407000
TM UDEVTYPE,TYPPRT IS IT A PRINTER ?? @V200930 00408000
BZ GOVDSAT NO, DEFINE DEVICE @V200930 00409000
CALL DMKSCNFD TEST FOR OPTION TYPE @V200930 00410000
BNZ GOVDSAT NONE, DEFINE DEFUALT @V200930 00411000
C R0,F4 MIN LENGTH 4 @V200930 00412000
BNE INVOPTS INVALID @V200930 00413000
CLC 0(4,R1),=C'1403' IS IT 1403 ?? @V200930 00414000
BNE SCN32 NO, TEST FOR 3211 @V200930 00415000
MVI UDEVTYPE,TYP1403 SET TYPE @V200930 00416000
B GOVDSAT DEFINE DEVICE @V200930 00417000
SCN32 CLC 0(4,R1),=C'3211' IS IT A 3211 ?? @V200930 00418000
BNE SCN3203 NO--IS IT A 3203 ?? @V386298 00419000
MVI UDEVTYPE,TYP3211 SET TYPE @V200930 00420000
B GOVDSAT GO LOCK THE DEVICE BLOCK @V386298 00421000
SCN3203 CLC 0(4,R1),=C'3203' IS IT A 3203 PRINTER ?? @V386298 00422000
BNE INVOPTS NO, ERROR @V386298 00423000
MVI UDEVTYPE,TYP3203 SET TYPE @V386298 00424000
GOVDSAT EQU * LOCK DEVICE BLOCKS, DEFINE DEVICE 00425000
BAL R5,LOKUSER 00426000
LH R1,UDEVADD CHECK FOR ALREADY DEFINED ADDRESS 00427000
CALL DMKSCNVU 00428000
ST R7,SAVEWRK8 SAVE VCUBLOK @ @VA04546 00429000
BZ ALREADY DEVICE ALREADY EXISTS - ERROR MESSAGE 00430000
BC 4,NODCHAN VIRTUAL CHANNEL DOES NOT EXIST 00431000
BC 2,CKDCHAN VIRTUAL CONTROL UNIT DOES NOT EXIST 00432000
CLC UDEVTYPC(2),=AL1(CLASSPEC,TYPCTCA) VIRTUAL CTCA?@VA00842 00433000
BE EXISTCU YES - CANNOT DO IT ON EXISTING C.U. 00434000
USING VCUBLOK,R7 @VA02718 00435000
TM VCUTYPE,VCUCTCA ALREADY IN USE FOR CTCA? @VA02718 00436000
BZ CKDCHAN NO, CONTINUE @VA04546 00437000
TM DEFLAGS,CHANGED REDEFINING EXISTING @ ? @VA04546 00438000
BZ EXISTCU NO, CAN'T USE THIS @ FOR CTCA @VA04546 00439000
OI DEFLAGS,DVCTCA FLAG CU AS CTCA @VA04546 00440000
DROP R7 @VA04546 00441000
CKDCHAN EQU * CHECK FOR DEFINING ON DEDICATED CHANNEL 00442000
AIF (NOT &DEDCH).NOTDED1 **AIF** 00443000
USING VCHBLOK,R6 ADDRESSABILITY 00444000
TM VCHSTAT,VCHDED DEFINING ONTO A DEDICATED CHANNEL ? 00445000
BO DEDCHAN YES - THAT IS NOT POSSIBLE 00446000
DROP R6 00447000
.NOTDED1 ANOP 00448000
SPACE 00449000
NODCHAN EQU * NEW DEVICE DOES NOT EXIST - DEFINE IT 00450000
TM DEFLAGS,CHANGED RE-DEFINE EXISTING DEVICE ? 00451000
BO REDEFIN YES 00452000
CLI UDEVTYPE,TYP1052 RE-DEFINE VM CONSOLE ? 00453000
BNE CALLVDS NO -- DEFINE A NEW VDEVBLOK @V200820 00454000
LH R8,VMVTERM CHECK FOR EXISTING VIRTUAL CONSOL@V200820 00455000
LTR R8,R8 ALLOWED ONLY ONE PRIMARY CONSOLE @V200820 00456000
BM CALLVDS O.K. - DEFINE A NEW CONSOLE @V200820 00457000
AL R8,VMDVSTRT VIRTUAL CONSOLE VDEVBLOK FOR MSG @V200820 00458000
B ALREADY FORMAT AND TYPE ERROR MESSAGE @V200820 00459000
SPACE 00460000
CALLVDS EQU * @V200820 00461000
LR R2,R10 'UDEVBLOK' FOR DMKVDSDF 00462000
CALL DMKVDSDF DEFINE A NEW DEVICE 00463000
BAL R5,FREUSER UNLOCK HIM FIRST... 00464000
CH R2,=H'124' EXCEEDED MAX DEVICES ? @VA13217 00464150
BE ERR153 YES, MSG 153 @VA13217 00464550
LTR R2,R2 ...AND THEN CHECK FOR ERROR CODES 00465000
BNZ ERRTABL-28(R2) JUMP TO ERROR MESSAGE CODE @V407466 00466000
EJECT 00467000
* 00468000
* CONSTRUCT AND TYPE VERIFICATION MESSAGE 00469000
* 00470000
RESPOND EQU * 00471000
* VDEVBLOK ADDRESS IS IN R8 00472000
TM VMMLVL2,VMMIMSG USER WANT THE MSG?? @V2A3663 00473000
BZ DEFEXIT NO - SKIP IT @V2A3663 00474000
CALL DMKSCNVN GET EBCDIC DEVICE TYPE 00475000
LR R3,R1 SAVE IT IN R3 00476000
LH R1,UDEVADD NEW DEVICE ADDRESS 00477000
LH R2,UDEVNCYL NO. CYLS IF T-DISK 00478000
CALL DMKCVTBH CONVERT ADDRESS 00479000
MVI SAVEWRK2,X'40' BLANK "BUFFER" 00480000
MVC SAVEWRK2+1(31),SAVEWRK2 ... 00481000
ST R3,SAVEWRK2 DEVICE TYPE 00482000
STCM R1,B'0111',SAVEWRK3+1 ...ADDRESS 00483000
MVC SAVEWRK4+1(7),=C'DEFINED ' 00484000
LA R0,SAVEWRK6-SAVEWRK2 LENGTH 00485000
TM DEFLAGS,DEFTDSK T-DISK DEFINED ? 00486000
BZ TYPEMSG NO 00487000
LR R1,R2 NO. OF CYLS 00488000
CALL DMKCVTBD CONVERT TO DECIMAL 00489000
STCM R1,B'1111',SAVEWRK6+1 TDSK size (4 digits) HRC106DK 00490100
MVC SAVEWRK7+2(3),=C'CYL' HRC106DK 00491100
LA R0,SAVEWRK8+1-SAVEWRK2 Length HRC106DK 00492100
TYPEMSG EQU * SEND MESSAGE TO USER 00493000
LA R1,SAVEWRK2 00494000
CALL DMKQCNWT,PARM=NORET 00495000
DEFEXIT EQU * @V2A3663 00496000
SLR R2,R2 00497000
ST R2,SAVER2 ERROR CODE TO DMKCFM 00498000
EXIT 00499000
SPACE 2 00500000
SCANCLC CLC 0(*-*,R1),0(R3) DEVICE TYPE COMPARE 00501000
FINDAS CLC 0(*-*,R1),=C'AS' 00502000
EJECT 00503000
REDEFIN EQU * "DEFINE VADD1 AS VADD2" 00504000
L R1,DEVADDR 'OLD' DEVICE ADDRESS 00505000
CALL DMKSCNVU PICK UP CONTROL BLOCKS 00506000
BNZ INVFADD IT ISN'T THERE 00507000
USING VCHBLOK,R6 00508000
USING VCUBLOK,R7 00509000
USING VDEVBLOK,R8 00510000
AIF (NOT &DEDCH).NOTDED2 **AIF** 00511000
TM VCHSTAT,VCHDED DEDICATED CHANNEL ? 00512000
BO DEDCHAN YES - CANNOT CHANGE THE ADDRESS 00513000
TM VDEVSTAT,VDEVDED+VDEVCATT DEDICATED OR ATTACHED?@VA12606 00513150
BZ NODEDATT NO CHECK FOR ACTIVE ACTIVE I/O @VA12606 00513250
OC VDEVIOB,VDEVIOB ACTIVE I/O? @VA12606 00513350
BNZ DEDCHAN YES @VA12606 00513450
NODEDATT DS 0H @VA12606 00513550
.NOTDED2 ANOP 00514000
TM VCUTYPE,VCUCTCA IS OLD DEVICE A CTCA ? @VA04546 00515000
BZ NOTCTCA NO, SEE IF NEW ONE WAS @VA04546 00516000
CLC SAVEWRK8(4),FFS DOES NEW CU EXIST ? @VA04546 00517000
BE CALLRD NO, ALRIGHT TO REDEFINE @VA04546 00518000
TM DEFLAGS,DVCTCA YES,REDEF CTCA ON SAME CU ? @VA04546 00519000
BZ POINTOLD NO, THATS A NO-NO @VA04546 00520000
C R7,SAVEWRK8 YES, SAME CU ? @VA04546 00521000
BNE POINTOLD NO, NO CAN DO ,,,, @VA04546 00522000
B CALLRD YES, OK TO DO IT ...... @VA04546 00523000
NOTCTCA TM DEFLAGS,DVCTCA NEW DEVICE A CTCA ? @VA04546 00524000
BZ NOTCTCA1 NO, CONTINUE ........... @VA04546 00525000
POINTOLD L R7,SAVEWRK8 POINT TO NEW VCUBLOK FOR MSG @VA04546 00526000
B EXISTCU YES, TIME FOR A REPRIMAND @VA04546 00527000
NOTCTCA1 EQU * @VA04546 00528000
CLC VDEVTYPC(2),=AL1(CLASDASD,TYP2305) IS IT A 2305 @VA04098 00529000
BNE CALLRD NOPE, CONTINUE @VA04098 00530000
TM VDEVSTAT,VDEVDED IS IT DEDICATED? @VA04098 00531000
BZ CALLRD NOPE, CONTINUE @VA04098 00532000
TM DEVADDR+3,X'07' IS CMD ENTERED VADDR A BASE ADDR@VA04098 00533000
BNZ ERR22UL NOPE, TOO BAD @VA04098 00534000
TM UDEVADD+1,X'07' IS NEW VADDR A BASE ADDR? @VA04098 00535000
BNZ ERR22UL NOPE, TOO BAD @VA04098 00536000
DROP R7 NO MORE OLD DEVICE VCUBLOK @VA04098 00537000
L R4,SAVEWRK8 SWITCH TO NEW DEVICE VCUBLOK @VA04098 00538000
LTR R4,R4 IS THERE ONE? @VA04098 00539000
BM SETFLAG NOPE, THATS MUCH EASIER @VA04546 00540000
USING VCUBLOK,R4 ADDRESS THE NEW DEV VCUBLOK @VA04098 00541000
LH R1,UDEVADD GET THE NEW DEVICE ADDRESS @VA04098 00542000
N R1,F8 CLEAN OFF ALL BUT BIT 3 @VA04098 00543000
SLL R1,1 <- BY 1 TO VCUDVTBL BYTE INDEX @VA04098 00544000
LA R3,VCUDVTBL+2*7(R1) ADDR LAST DEVICE TO EXAMINE @VA04098 00545000
LA R1,VCUDVTBL(R1) ADDR FIRST DEVICE TO EXAMINE @VA04098 00546000
LA R2,2 VCUDVTBL ENTRY SIZE @VA04098 00547000
PRESCAN CLI 0(R1),X'FF' DOES THIS DEVICE EXIST? @VA04098 00548000
BNE BAD05 YUP, TOO BAD... @VA04098 00549000
BXLE R1,R2,PRESCAN LOOK AT ALL 8 VIRTUAL EXPOSURES @VA04098 00550000
DROP R4 DO MORE NEW DEVICE VCUBLOK @VA04098 00551000
USING VCUBLOK,R7 BACK TO OLD DEVICE VCUBLOK PLEASE@VA04098 00552000
SETFLAG OI DEFLAGS,DED2305 IND THIS IS A DEDICATED 2305 @VA04098 00553000
CALLRD CALL DMKCFPRD RESET THE DEVICE 00554000
XC UDEVDISP(UDEVFTR-UDEVDISP),UDEVDISP 00555000
MVC UDEVTYPC(2),VDEVTYPC MAKE NEW ONE LOOK LIKE OLD @VA10849 00556100
OI UDEVSTAT,UDEVRDEF VSPXBLOK POINTER @VA12263 00556200
* CLEARED UDEVBLOK TO GET CLEAN VDEVBLOK FROM 'VDSDF' 00557000
LR R2,R10 UDEVBLOK ADDRESS TO R2 @V407466 00558000
CALL DMKVDSDF GET A CLEAN DEVICE BLOCK @V407466 00559000
CH R2,=H'124' EXCEEDED MAX DEVICES? @VA13217 00559045
BE ERR153 YES MSG 153 @VA13217 00559445
LTR R2,R2 ANY PROBLEMS GETTING THE BLOCK @V407466 00560000
BNZ ERRTABL-28(R2) YES, NO FREE STORAGE @V407466 00561000
LR R9,R8 SAVE ADDRESS NEW VDEVBLOK FOR NOW@V407466 00562000
L R1,DEVADDR RESTORE OLD ADDRESS @V407466 00563000
CALL DMKSCNVU GET OLD BLOCKS @V407466 00564000
BNZ INVFADD INVALID IF NOT THERE @V407466 00565000
LR R1,R8 REST OLD VDEVBLOK ADDR FOR RESET @V407466 00566000
SL R1,VMDVSTRT TRANSFORM IT INTO A DISPLACEMENT @V200820 00567000
STH R1,DEVADDR SAVE IT IN CASE OF RE-DEFINE @V200820 00568000
SPACE 00569000
TM VCUTYPE,VCUCTCA CHAN-TO-CHAN ADAPTER ? 00570000
BZ DETLOOP NO - OKAY 00571000
MVI UDEVTYPC,CLASSPEC INDICATE CTCA TO VDSDF (CTCA) 00572000
TM VDEVSTAT,VDEVDED CTCA DEDICATE TO REAL CTCA 00573000
BO DETLOOP YES -- NOT A VIRTUAL CTCA 00574000
CALL DMKVCARS DROP ANY EXISTING CONNECTION 00575000
DETLOOP EQU * "DETACH" OLD DEVICE BLOCKS 00576000
* NOW REMOVE VDEVBLOK AND MAYBE VCUBLOK, VCHBLOK FROM 00577000
* ACTIVE VIRTUAL BLOCK LISTS, WITHOUT DESTROYING DATA 00578000
* IN VDEVBLOK REQUIRED FOR LINKS, ATTACHED DEVICES, ETC. 00579000
L R2,FFS LOAD FFFFFFFF 00580000
SR R3,R3 ZERO INDEX REGISTER 00581000
LA R4,4 LOAD INCREMENT REGISTER 00582000
LA R5,28 LOAD COMPARAND REGISTER 00583000
LH R1,VDEVADD GET VIRTUAL DEVICE ADDRESS 00584000
AR R1,R1 MULTIPLY IT BY 2 00585000
STH R2,VDEVADD INDICATE DEVICE NO LONGER EXISTS 00586000
STH R2,VCUDVTBL(R1) REMOVE RDEVBLOK INDEX FROM TABLE 00587000
DETCULP CL R2,VCUDVTBL(R3) ANY MORE DEVICES ON THIS CU ? 00588000
BNE DETDONE BRANCH IF YES 00589000
BXLE R3,R4,DETCULP BRANCH IF MORE TABLE ENTRIES 00590000
LH R1,VCUADD LOAD VIRTUAL CONTROL UNIT ADDRESS 00591000
SRL R1,3 MULTIPLY IT BY 2 00592000
STH R2,VCUADD INDICATE CONTROL UNIT NO LONGER EXISTS 00593000
STH R2,VCHCUTBL(R1) REMOVE VCUBLOK INDEX FROM TABLE 00594000
SR R3,R3 ZERO INDEX REGISTER 00595000
DETCHLP CL R2,VCHCUTBL(R3) ANY MORE CTL UNITS ON THIS CHAN ? 00596000
BNE DETDONE BRANCH IF YES 00597000
BXLE R3,R4,DETCHLP BRANCH IF MORE TABLE ENTRIES 00598000
LH R1,VCHADD LOAD VIRTUAL CHANNEL ADDRESS 00599000
SRL R1,7 MULTIPLY IT BY 2 00600000
STH R2,VCHADD INDICATE CHANNEL NO LONGER EXISTS 00601000
STH R2,VMCHTBL(R1) REMOVE VCHBLOK INDEX FROM TABLE 00602000
DETDONE EQU * DETACH FINISHED 00603000
ST R8,SAVEWRK9 SAVE ADDRESS OF 'OLD' VDEVBLOK 00604000
* LOAD INTO REGISTERS AND MY SAVE-AREA ALL INFO NEEDED TO 00605000
* RE-ESTABLISH LINKS, ATTACHES, ETC. IN THE NEW BLOCK 00606000
L R3,VDEVTYPC TYPC,TYPE,STAT,FLAG 00607000
LM R4,R7,VDEVRELN RELN,BND,POSN,QUED,OPER 00608000
STM R5,R7,SAVEWRK6 POSN,QUED,OPER 00609000
LM R5,R7,VDEVLINK LINK,REAL,IOCT 00610000
LM R0,R1,VDEVFLG2 FLG2, VRRB @V407438 00611000
DROP R6,R7 00612000
LR R8,R9 NEW VDEVBLOK ADDRESS TO R8 @V407466 00613000
* 'NEW' VDEVBLOK NOW IN GPR 8 00614000
* RE-BUILD ACTIVE VDEVBLOK FROM REGISTER INFO 00615000
ST R3,VDEVTYPC TYPC,TYPE,STAT,FLAG 00616000
ST R4,VDEVRELN 00617000
STM R0,R1,VDEVFLG2 FLG2, VRRB @V407438 00618000
STM R5,R7,VDEVLINK LINK,REAL,IOCT 00619000
LM R0,R2,SAVEWRK6 POSN,QUED,OPER 00620000
STM R0,R2,VDEVPOSN ... 00621000
* R5 = 'VDEVLINK' R6 = 'VDEVREAL' 00622000
TM VDEVSTAT,VDEVDED DEDICATED DEVICE ? 00623000
BZ FIXLINK NO - SEE IF LINKED DASD 00624000
USING RDEVBLOK,R6 00625000
LH R1,UDEVADD-UDEVBLOK+SAVEWRK3 'NEW' ADDRESS 00626000
STH R1,RDEVATT ...INTO RDEVBLOK 00627000
DROP R6 NO MORE RDEVBLOK @VA04098 00628000
TM DEFLAGS,DED2305 IS THIS A DEDICATED 2305? @VA04098 00629000
BZ CHKCONS NOPE, SKIP @VA04098 00630000
TM UDEVADD+1,X'07' WAS THAT THE LAST EXPOSURE? @VA04098 00631000
BNO CONT05 NOPE, MORE TO DO, KEEP GOING @VA04098 00632000
NI UDEVADD+1,X'F8' BACK TO BASE ADDR FOR MSG @VA04098 00633000
B RDEFREE AND PROCEED @VA04098 00634000
SPACE 00635000
CONT05 LH R1,UDEVADD GET CURRENT NEW DEVICE ADDR @VA04098 00636000
LA R1,1(R1) BUMP TO NEXT EXPOSURE @VA04098 00637000
STH R1,UDEVADD AND RE-SAVE @VA04098 00638000
L R1,DEVADDR GET OLD DEVICE ADDR @VA04098 00639000
LA R1,1(R1) BUMP TO NEXT EXPOSURE @VA04098 00640000
ST R1,DEVADDR AND RE-SAVE @VA04098 00641000
CALL DMKSCNVU GET VBLOKS FOR THIS OLD EXPOSURE @VA04098 00642000
B CALLRD AND CONTINUE THE PROCESS @VA04098 00643000
SPACE 00644000
FIXLINK EQU * CHECK FOR LINKED DASD DEVICES 00645000
CLI VDEVTYPC,CLASDASD PERHAPS LINKED ? 00646000
BNE CHKCONS NO - THANK GOD FOR SMALL FAVORS 00647000
TM VDEVFLAG,VDEVTDSK PERHAPS A T-DISK ? 00648000
BO RDEFREE YES - WONDERFUL 00649000
* FIND OLD VDEVBLOK IN LINK CHAIN AND PATCH WITH NEW ADDRESS 00650000
L R4,SAVEWRK9 'OLD' VDEVBLOK ADDRESS 00651000
* R5 = PRESERVED 'VDEVLINK' 00652000
CR R4,R5 MORE THAN 1 LINK IN OLD VDEVBLOK 00653000
BNE LINKFIX YES - FIND AND PATCH THE LINK CHAIN 00654000
ST R8,VDEVLINK NO - FORCE THIS ONE TO LINK TO ITSELF 00655000
B RDEFREE TYPE RESPONSE MESSAGE 00656000
SPACE 00657000
LINKFIX EQU * FIND PREVIOUS VDEVBLOK 00658000
LTR R6,R5 SAVE CURRENT ADDRESS 00659000
BZ RDEFREE NO OTHER LINKS - GREAT 00660000
L R5,VDEVLINK-VDEVBLOK(,R5) NEXT BLOCK 00661000
CLR R5,R4 POINTS TO OLD BLOCK ? 00662000
BNE LINKFIX NO - KEEP LOOKING 00663000
ST R8,VDEVLINK-VDEVBLOK(,R6) PATCH IN NEW VDEVBLOK 00664000
B RDEFREE GO UNLOCK USERID 00665000
CHKCONS EQU * SEE IF PRIMARY VM CONSOLE 00666000
CLC VMVTERM(2),DEVADDR RE-DEFINE PRIMARY CONSOLE ? @V200820 00667000
BNE RDEFREE NOPE - ALL DONE 00668000
LR R1,R8 NEW VIRTUAL DEVICE ADDRESS @V200820 00669000
SL R1,VMDVSTRT CONVERT TO DISPLACEMENT FORM @V200820 00670000
STH R1,VMVTERM RESET VMBLOK REFERENCE @V200820 00671000
RDEFREE EQU * MADE IT THROUGH 00672000
BAL R5,FREUSER UNLEASH THIS GUY 00673000
B RESPOND ...AND TYPE A MESSAGE 00674000
DROP R8 00675000
EJECT 00676000
DEFCORE EQU * RE-DEFINE VIRTUAL MEMORY SIZE 00677000
* CALL DMKDEHIN WITH R0= LENGTH OF ARGUMENT, R1= ADDDRESS OF 00678000
* ARGUMENT, R10= DUMMY UDEVBLOK ADDRESS. 00698000
CALL DMKDEHIN @VA13361 00718000
B DEFEXIT CLEAN UP AND BEAT IT @VA13361 00738000
EJECT 00768000
DEFCHAN EQU * @VA13361 00769000
* CALL DMKDEHIN WITH R0= LENGTH OF ARGUMENT, R1= ADDDRESS OF 00777000
* ARGUMENT, R10= DUMMY UDEVBLOK ADDRESS. 00785000
SPACE 00793000
CALL DMKDEHIN @VA13361 00801000
SPACE 00809000
CHXIT EXIT @V2A3663 00819000
EJECT 00820000
*---------------------------------------------------------------------* 00821000
* LOKUSER + FREUSER - LOCK + UNLOCK DEVICE BLOCKS * 00822000
*---------------------------------------------------------------------* 00823000
LOKUSER EQU * 00824000
LA R1,VMUSER POIN TO THE USERID 00825000
CALL DMKLOCKQ ...AND LOCK IT 00826000
BR R5 00827000
SPACE 00828000
FREUSER EQU * 00829000
LA R1,VMUSER POINT TO THE USERID 00830000
CALL DMKLOCKD ...AND UNLOCK IT 00831000
BR R5 00832000
SPACE 2 00833000
AIF (NOT &DEDCH).NOTDED3 **AIF** 00834000
DEDCHAN EQU * DEV VADDR NOT DEFINED; CHAN XX DEDICATED 00835000
LH R6,VCHADD-VCHBLOK(,R6) GET CHANNEL ADDRESS 00836000
BAL R5,FREUSER RELEASE THE CONTROL BLOCKS 00837000
LH R1,SAVEWRK3 REQUESTED NEW ADDRESS 00838000
CALL DMKCVTBH 00839000
STCM R1,B'0111',SAVEWRK2 00840000
MVI SAVEWRK2+3,X'00' DELIMITER 00841000
LR R1,R6 CHANNEL ADDRESS 00842000
SRL R1,8(0) ... ADJUSTED 00843000
CALL DMKCVTBD 00844000
STH R1,SAVEWRK3 00845000
TM SAVEWRK3,X'0F' CHANNEL NUMBER > 9 00846000
BNZ *+8 YES - LEAVE MESSAGE TEXT ALONE 00847000
MVI SAVEWRK3,X'00' NO - REMOVE HI ORDER BYTE 00848000
LA R0,6 00849000
LA R2,136 MESSAGE NUMBER 00850000
B MSGSEND SEND THE MESSAGE 00851000
.NOTDED3 ANOP 00852000
EJECT 00853000
BAD05 LR R7,R1 ADDR OF EXISTING DEV ENTRY -> R7 @VA04098 00854000
B FOUNDEV PROCEED WITH MSG @VA04098 00855000
SPACE 00856000
EXISTCU EQU * DEFINE CTCA ON EXISTING CONTROL UNIT 00857000
USING VCUBLOK,R7 00858000
LA R5,VCUDVTBL+31 LIMIT FOR DEVICE SEARCH 00859000
LA R4,2 00860000
LA R7,VCUDVTBL LOOK FOR AN EXISTING DEVICE 00861000
DROP R7 00862000
EXISTDV EQU * (WE NEED ONE FOR THE ERROR MESSAGE) 00863000
CLI 0(R7),X'FF' SKIP OVER UNUSED DEVICE SLOTS 00864000
BNE FOUNDEV GOT ONE 00865000
BXLE R7,R4,EXISTDV 00866000
FOUNDEV EQU * COMPUTE VDEVBLOK ADDRESS FOR LATER 00867000
LH R8,0(0,R7) PICK UP DEVICE INDEX 00868000
AL R8,VMDVSTRT ADD TO VDEVBLOK BASE ADDRESS 00869000
SPACE 00870000
ALREADY EQU * DEV ADDR NOT DEFINED; TYPE VADDR ALREADY DEFINED 00871000
BAL R5,FREUSER RELEASE LOCK ON CONTROL BLOCKS 00872000
LH R1,SAVEWRK3 ADDRESS REQUESTED FOR NEW DEVICE 00873000
CALL DMKCVTBH 00874000
STCM R1,B'0111',SAVEWRK2 00875000
MVI SAVEWRK2+3,X'00' 00876000
CALL DMKSCNVD 'CCU' ADDR OF EXISTING DEVICE 00877000
CALL DMKCVTBH 00878000
STCM R1,B'0111',SAVEWRK4+1 00879000
MVI SAVEWRK4,X'00' 00880000
CALL DMKSCNVN 00881000
ST R1,SAVEWRK3 00882000
LA R0,12 00883000
LA R2,092(,0) MSG= DMKDEF092E 00884000
B MSGSEND 00885000
SPACE 2 00886000
INVFADD EQU * DEV ADDR DOES NOT EXIST 00887000
BAL R5,FREUSER RELEASE LOCK ON CONTROL BLOCKS 00888000
L R1,DEVADDR FIRST ADDRESS SPECIFIED 00889000
CALL DMKCVTBH 00890000
STCM R1,B'0111',SAVEWRK2 00891000
LA R0,3 00892000
LA R2,040(,0) MSG= DMKDEF040E 00893000
B MSGSEND 00894000
ERR153 DS 0H ERROR MSG 153 @VA13217 00894100
BAL R5,FREUSER RELEASE LOCK @VA13217 00894200
LH R1,UDEVADD VIRTUAL DEVICE ADDRESS DEFINED @VA13217 00894300
CALL DMKCVTBH CONVERT TO CHARS IN REG1 @VA13217 00894400
STCM R1,7,SAVEWRK2 DATA TO INSERT IN MSG 153 @VA13217 00894500
LA R0,L3 LENGTH OF DATA TO INSERT @VA13217 00894600
LA R2,EMSG153 MSG ID @VA13217 00894700
B MSGSEND SEND MSG 153 AND NO RETURN @VA13217 00894800
EJECT 00895000
INVTYPE EQU * OPERAND MISSING OR INVALID 00896000
LA R2,026(,0) MSG= DMKDEF026E 00897000
B MSGONLY NO EXTRA DATA 00898000
INVOPTS EQU * INVALID OPTION - $OPTION$ 00899000
LA R2,003(,0) MSG= DMKDEF003E 00900000
B MSGSEND+4 (R0,R1 STILL CORRECT FROM SCNFD) 00901000
SPACE 00902000
ERR22UL BAL R5,FREUSER UNLOCK THE USERS VBLOKS 00903000
INVVADD EQU * VADDR MISSING OR INVALID 00904000
CLI UDEVTYPC-UDEVBLOK+SAVEWRK3,X'FF' DEFINE STORAGE ? 00905000
BE INVCORE YES - DIFFERENT MESSAGE 00906000
CLI UDEVTYPC-UDEVBLOK+SAVEWRK3,X'FE' DEFINE CHAN? @VA02847 00907000
BE INVTYPE YES-PUT OUT DIFFERENT MESSAGE @VA02847 00908000
LA R2,022(,0) MSG= DMKDEF022E 00909000
B MSGONLY NO EXTRA DATA 00910000
INVCYLS EQU * CYLS MISSING OR INVALID 00911000
LA R2,024(,0) MSG= DMKDEF024E 00912000
B MSGONLY NO EXTRA DATA 00913000
SPACE 2 00914000
NOSPACE EQU * DASD VADDR NOT DEFINED; TEMP SPACE NOT AVAILABLE 00915000
LH R1,SAVEWRK3 00916000
CALL DMKCVTBH 00917000
STCM R1,B'0111',SAVEWRK2 00918000
LA R0,3 00919000
LA R2,091(,0) MSG= DMKDEF091E 00920000
B MSGSEND 00921000
NOSTOR EQU * @V407466 00922000
* DEV VADDR NOT DEFINED; INSUFFICIENT FREE STORAGE 00923000
BAL R5,FREUSER RELEASE LOCK ON CONTROL BLOCKS @V407466 00924000
LH R1,SAVEWRK3 ADDRESS REQUESTED FOR NEW DEVICE @V407466 00925000
CALL DMKCVTBH CONVERT TO PRINTABLE HEX @V407466 00926000
STCM R1,B'0111',SAVEWRK2 STORE IN MSG BUFFER @V407466 00927000
LA R0,3 LENGTH OF SUBSTITUTION @V407466 00928000
LA R2,095(,0) MSG = DMKDEF095E @V407466 00929000
B MSGSEND ISSUE ERROR MESSAGE @V407466 00930000
SPACE 00931000
SPACE 2 00932000
INVCORE EQU * STORAGE MISSING OR INVALID 00933000
LA R2,025(,0) MSG= DMKDEF025E 00934000
B MSGONLY NO EXTRA DATA 00935000
EXCESIV EQU * STORAGE EXCEEDS ALLOWED MAXIMUM 00936000
LA R2,094(,0) MSG= DMKDEF094E 00937000
SPACE 00938000
MSGONLY EQU * MSG WITHOUT VARIABLE FIELDS 00939000
SLR R0,R0 00940000
SLR R1,R1 00941000
B *+8 SKIP OVER 'LA' FOR R1 00942000
MSGSEND EQU * SEND ERROR MESSAGE 00943000
LA R1,SAVEWRK2 VARIABLE DATA LOCATION 00944000
MSGIDBLD EQU * BUILD MOD ID FOR MSG @V60B6B8 00945000
ICM R0,B'1110',DMKDEF+3 MODULE IDENTIFIER 00946000
CALL DMKERMSG BUILD + TYPE ERROR MESSAGE 00947000
* "DMKERMSG" WILL NOT RETURN 00948000
* JUMP TABLE FOR R2 ERROR CODES FROM DMKVDSDF 00949000
ERRTABL DS 0H ERROR NUMBERS 28,32 @V407466 00950000
B NOSPACE 28 TEMP. SPACE NOT AVAIL. @V407466 00951000
B NOSTOR 32 NO STORAGE FOR VIRT. BLOCKS @V407466 00952000
EJECT 00953000
* BITS DEFINED IN DEFLAGS: 00954000
CHANGED EQU X'80' EXISTING DEVICE BEING RE-DEFINED 00955000
STORAGE EQU X'40' RE-DEFINE STORAGE SIZE 00956000
DEFTDSK EQU X'20' T-DISK BEING DEFINED 00957000
SPACE 1 00958000
* BITS DEFINED FOR CALL TO DMKPGS 00959000
UNLOCK EQU X'02' UNLOCK ANY 'LOCKED' PAGES @V304735 00960000
DED2305 EQU X'01' DEVICE IS A DEDICATED 2305 @VA04098 00961000
DVCTCA EQU X'02' DEVICE IS A CTCA @VA04546 00962000
SPACE 2 00963000
*---------------------------------------------------------------------* 00964000
* DEVICE TYPE DECODING TABLE FOR 'DEFINE' COMMAND: * 00965000
* C'DEVICE TYPE',H'MINIMUM LENGTH-1',AL2(TYPE CLASS,TYPE) * 00966000
*---------------------------------------------------------------------* 00967000
DEFLIST EQU * 00968000
DC C'READER ',H'0',AL1(CLASURI,TYP2540R) CARD READER 00969000
DC C'RDR ',H'2',AL1(CLASURI,TYP2540R) " " " 00970000
DC C'2501 ',H'3',AL1(CLASURI,TYP2501) 2501 @VA03655 00971000
* READER 00972000
DC C'2540R ',H'4',AL1(CLASURI,TYP2540R) 2540 @VA03655 00973000
* READER 00974000
DC C'3505 ',H'3',AL1(CLASURI,TYP3505) 3505 @VA03655 00975000
* READER 00976000
DC C'PRINTER ',H'0',AL1(CLASURO,TYP1403) PRINTER 00977000
DC C'PRT ',H'2',AL1(CLASURO,TYP1403) " " 00978000
DC C'PTR ',H'2',AL1(CLASURO,TYP1403) " " 00979000
DC C'1403 ',H'3',AL1(CLASURO,TYP1403) 1403 PRINTER 00980000
DC C'3211 ',H'3',AL1(CLASURO,TYP3211) 3211 PRINTER 00981000
DC C'3203 ',H'3',AL1(CLASURO,TYP3203) 3203 PTR@V386298 00982000
DC C'1443 ',H'3',AL1(CLASURO,TYP1443) 1443 @VA03655 00983000
* PRINTER 00984000
DC C'PUNCH ',H'1',AL1(CLASURO,TYP2540P) CARD PUNCH 00985000
DC C'PCH ',H'2',AL1(CLASURO,TYP2540P) " " 00986000
DC C'2540P ',H'4',AL1(CLASURO,TYP2540P) 2540 @VA03655 00987000
* PUNCH 00988000
DC C'3525 ',H'3',AL1(CLASURO,TYP3525) 3525 PUNCH@VA03655 00989000
DC C'CONSOLE ',H'2',AL1(CLASTERM,TYP1052) VM CONSOLE 00990000
DC C'TIMER ',H'2',AL1(CLASURI,TYPTIMER) PSEUDO-TIMER 00991000
DC C'CTCA ',H'2',AL1(CLASSPEC,TYPCTCA) CHAN-CHAN ADAPT 00992000
DC C'LINE ',H'1',AL1(CLASTERM,TYPIBM1) VIRT. 2702 00993000
DC C'GRAF ',H'3',AL1(CLASGRAF,TYP3277) 3270 GRA @V200730 00994000
DC C'T2305 ',H'4',AL1(CLASDASD,TYP2305) 2305 T-DISK 00995000
DC C'T2314 ',H'4',AL1(CLASDASD,TYP2314) 2314 T-DISK 00996000
DC C'T2319 ',H'4',AL1(CLASDASD,TYP2319) 2319 T-DISK 00997000
DC C'T3340 ',H'4',AL1(CLASDASD,TYP3340) (TDISK) @V2A2029 00998000
DC C'T3330 ',H'4',AL1(CLASDASD,TYP3330) 3330 T-DISK 00999000
DC C'T3350 ',H'4',AL1(CLASDASD,TYP3350) (TDISK) @V304498 01000000
DC C'T3375 ',H'4',AL1(CLASDASD,TYP3375) (TDISK) HRC106DK 01000100
DC C'T3380 ',H'4',AL1(CLASDASD,TYP3380) (TDISK) HRC106DK 01000200
DC C'CHANNELS',H'3',X'FEFF' CHANNELS @VA01771 01001000
DEFLAST DC C'STORAGE ',H'3',X'FFFF' (MUST BE LAST) STORAGE CHG 01002000
DEFENTS EQU *-DEFLAST LENGTH OF ONE ENTRY 01003000
EJECT 01004000
DEFMSS EQU * DEFINE 'VIRTUAL' OR 'SYSVIRT' @V60B6B8 01005000
* 01006000
* THIS ROUTINE IS ENTERED TO PROCESS THE MSS DEFINE 01007000
* OPTIONS. 01008000
* 01009000
* THE FIRST STEP IS TO FIND THE ADDRESS OR RANGE 01010000
* OF ADDRESSES SPECIFIED. ONCE THE INPUT LINE HAS 01011000
* BEEN PROCESSED, A TABLE IS BUILT CONTAINING THE 01012000
* REAL DEVICE BLOCK (RDEVBLOK) ADDRESSES CORRESPONDING 01013000
* TO THE ADDRESS(ES). 01014000
* 01015000
SR R0,R0 @V60B6B8 01016000
ST R0,FIRSTBUF INITIALIZE BUFFER POINTER @V60B6B8 01017000
ST R0,ADDR2 INITIALIZE ADDR2 POINTER @V60B6B8 01018000
CALL DMKSCNFD GET THE NEXT INPUT PARAMETER @V60B6B8 01019000
BNZ EMSG086A IF NO PARAMETER, ERROR MSG 086 @V60B6B8 01020000
LA R2,L3 'ADDR1' PARM SHOULD BE 3 @V60B6B8 01021000
* CHARACTERS 01022000
CR R0,R2 SEE IF IT IS @V60B6B8 01023000
BE GETADDR1 YES, PROCESS ADDR1 @V60B6B8 01024000
* SEE IF WE HAVE A RANGE OF ADDRESSES 01025000
LA R2,L7 LENGTH OF A RANGE PARAMETER @V60B6B8 01026000
CR R0,R2 INPUT OPERAND LENGTH @V60B6B8 01027000
BNE EMSG086B OPERAND NOT ADDR OR RANGE @V60B6B8 01028000
CLI 3(R1),DASH CHECK FOR 'NNN-NNN' @V60B6B8 01029000
BNE EMSG086B NO DASH, CAN'T BE RANGE @V60B6B8 01030000
MVI 3(R1),BLANK RESET FOR LATER SCAN @V60B6B8 01031000
LA R2,4(R1) POINT TO SECOND PARAMETER @V60B6B8 01032000
ST R2,ADDR2 SAVE IT @V60B6B8 01033000
LA R0,L3 RESET LENGTH FOR CONVERSION @V60B6B8 01034000
* 01035000
* CONVERT ADDR1 TO BINARY. 01036000
* ON RETURN FROM DMKCVTHB, GPR1 CONTAINS 01037000
* THE BINARY VALUE OF 'ADDR1' 01038000
* 01039000
GETADDR1 EQU * @V60B6B8 01040000
CALL DMKCVTHB CONVERT 'ADDR1' TO BINARY @V60B6B8 01041000
BNZ EMSG086A ERROR, NOT CORRECT FORMAT @V60B6B8 01042000
* 01043000
* NOW TRY TO FIND AN RDEVBLOK FOR 'ADDR1'. 01044000
* ON RETURN FROM DMKSCNRU, GPR 8 WILL 01045000
* CONTAIN THE RDEVBLOK PTR IF AN 01046000
* RDEVBLOK EXISTS. 01047000
* 01048000
CALL DMKSCNRU IS THERE AN RDEVBLOK @V60B6B8 01049000
BNZ EMSG086A NO, ISSUE MSG 086 @V60B6B8 01050000
USING RDEVBLOK,R8 ADDRESSABILITY FOR ASSEMBLER @V60B6B8 01051000
CLI RDEVTYPC,CLASDASD IS IT A DASD DEVICE? @V60B6B8 01052000
BNE EMSG086A NO, CAN'T BE VUA @V60B6B8 01053000
TM RDEVFTR,VIRTUAL+SYSVIRT IS DASD A VUA @V60B6B8 01054000
BZ EMSG086A NO, ISSUE MSG 086 @V60B6B8 01055000
ST R1,FIRSTADR SAVE FIRST PARAMETER @V60B6B8 01056000
ST R1,CURRADDR IT IS ALSO CURRENT ADDRESS @V60B6B8 01057000
ST R1,LASTADDR LAST ADDR UNTIL PREEMPTED @V60B6B8 01058000
SPACE 01059000
L R2,ADDR2 PICK UP POINTER TO ADDR2 @V60B6B8 01060000
LTR R2,R2 IS THERE ONE? @V60B6B8 01061000
BZ DEVCHECK IF NONE, PROCEED WITH ONE @V60B6B8 01062000
LR R1,R2 PUT ADDR2 IN R1 FOR DMKCVT @V60B6B8 01063000
ST R8,RDEVADR1 SAVE PTR TO FIRST RDEVBLOK @V60B6B8 01064000
LA R0,3 LENGTH OF PARAMETER @V60B6B8 01065000
CALL DMKCVTHB CONVERT 'ADDR2' TO BINARY @V60B6B8 01066000
BNZ EMSG086F ERROR, NOT CORRECT FORMAT @V60B6B8 01067000
CALL DMKSCNRU CHECK VALIDITY OF ADDR2 @V60B6B8 01068000
BNZ EMSG086F IF INVALID, ERROR MSG 086 @V60B6B8 01069000
C R1,FIRSTADR IS LAST ADDR LESS THAN FIRST? @V60B6B8 01070000
BL E9 IF YES, ERROR AND EXIT @V60B6B8 01071000
ST R1,LASTADDR SAVE LAST ADDRESS @V60B6B8 01072000
BAL R4,TABLINIT INITIALIZE DEVICE TABLE @V60B6B8 01073000
ST R1,FIRSTBUF SAVE POINTER TO FIRST BUFFER @V60B6B8 01074000
L R8,RDEVADR1 RELOAD PTR TO FIRST RDEVBLOK @V60B6B8 01075000
L R1,FIRSTADR RELOAD FIRST ADDRESS @V60B6B8 01076000
SPACE 01077000
DEVCHECK EQU * @V60B6B8 01078000
TM SAVEWRK1,VIRTUAL IS DEFINE VIRTUAL? @V60B6B8 01079000
BZ DEFSYSV NO, GO TO SYSVIRT DEFINE @V60B6B8 01080000
MVC EMSG3TP(L7),VIRTCHAR SET UP MESSAGE @V60B6B8 01081000
TM RDEVFTR,VIRTUAL IS DEVICE VIRTUAL NOW? @V60B6B8 01082000
BO E3 SEND MESSAGE, ALREADY VIRTUAL, @V60B6B8 01083000
* AND GO CHECK NEXT ADDR 01084000
BAL R5,CHKDEV GO TO COMMON CODE @V60B6B8 01085000
SPACE 01086000
NI RDEVFTR,X'FF'-SYSVIRT TURN OFF SYSVIRT FLAG @V60B6B8 01087000
OI RDEVFTR,VIRTUAL TURN ON VIRTUAL FLAG @V60B6B8 01088000
BAL R5,TABLADD ADD TO LIST OF GOOD DEFINES @V60B6B8 01089000
B CHKNXT CHECK NEXT DEVICE @V60B6B8 01090000
SPACE 01091000
DEFSYSV EQU * @V60B6B8 01092000
MVC EMSG3TP(L7),SYSVCHAR SET UP MESSAGE @V60B6B8 01093000
TM RDEVFTR,SYSVIRT IS DEVICE SYSVIRT NOW? @V60B6B8 01094000
BO E3 SEND MESSAGE, ALREADY SYSVIRT, @V60B6B8 01095000
* AND GO CHECK NEXT ADDR 01096000
BAL R5,CHKDEV GO TO COMMON CODE @V60B6B8 01097000
SPACE 01098000
NI RDEVFTR,X'FF'-VIRTUAL TURN OFF VIRTUAL FLAG @V60B6B8 01099000
OI RDEVFTR,SYSVIRT TURN ON SYSVIRT FLAG @V60B6B8 01100000
BAL R5,TABLADD ADD TO LIST OF GOOD DEFINES @V60B6B8 01101000
B CHKNXT GO CHECK NEXT ADDR @V60B6B8 01102000
SPACE 01103000
CHKDEV TM RDEVSTAT,RDEVDED IS DEVICE DEDICATED? @V60B6B8 01104000
BO E4 IF YES, MSG AND GO CHECK NEXT @V60B6B8 01105000
TM RDEVSTAT,RDEVDISA IS DEVICE OFFLINE? @V60B6B8 01106000
BZ NOTOFF IF NOT, CONTINUE @V60B6B8 01107000
LR R3,R1 SAVE REG1 @V60B6B8 01108000
BAL R4,E5 IF YES, ISSUE MSG THEN RETURN @V60B6B8 01109000
LR R1,R3 RESTORE REG1 @V60B6B8 01110000
NOTOFF EQU * @V60B6B8 01111000
TM SAVEWRK1,VIRTUAL IS THIS SYSVIRT TO VIRTUAL? @V60B6B8 01112000
BZ NOTSYS NO, BYPASS IN USE CHECK @V60B6B8 01113000
LH R3,RDEVLNKS GET NUMBER OF LINKS @V60B6B8 01114000
LTR R3,R3 ARE THERE ANY? @V60B6B8 01115000
BNZ E6 IF YES, ISSUE MSG AND GO @V60B6B8 01116000
* CHECK NEXT ADDR 01117000
NOTSYS CLC RDEVSER(SERLN),BLANKS IS A VOLUME MOUNTED? @V60B6B8 01118000
BER R5 IF NOT, RETURN TO UNIQUE PATH @V60B6B8 01119000
TM PSAMSS,MSSPRES TASK AVAILABLE TO DEMOUNT IT? @V60B6B8 01120000
BZ E7 IF NOT, ISSUE MSG AND CHECK @V60B6B8 01121000
* NEXT ADDRESS 01122000
CALL DMKSSSDE DEMOUNT THE VOLUME @V60B6B8 01123000
LTR R0,R0 WAS THERE AN ERROR? @V60B6B8 01124000
BNZ E8 IF YES, ISSUE MSG AND CHECK @V60B6B8 01125000
* NEXT ADDR 01126000
MVC RDEVSER(SERLN),BLANKS INDICATE NO VOLUME @V60B6B8 01127000
* MOUNTED 01128000
MVI RDEVFLAG,0 TURN OFF MOUNT FLAG @V60B6B8 01129000
BR R5 RETURN TO UNIQUE CODE @V60B6B8 01130000
SPACE 01131000
CHKNXT EQU * @V60B6B8 01132000
L R1,CURRADDR GET CURRENT ADDRESS @V60B6B8 01133000
C R1,LASTADDR HAVE WE PROCESSED LAST ADDR? @V60B6B8 01134000
BNL PP IF YES, PUT OUT FINAL MSGS @V60B6B8 01135000
LA R1,1(R1) INCREMENT TO NEXT ADDR @V60B6B8 01136000
ST R1,CURRADDR UPDATE THE CURRENT DEVICE PTR @V60B6B8 01137000
CALL DMKSCNRU IS DEVICE VALID? @V60B6B8 01138000
BNZ E1 NO, ISSUE MSG AND CHECK NEXT @V60B6B8 01139000
CLI RDEVTYPC,CLASDASD IS IT DASD? @V60B6B8 01140000
BNE E2 'ADDR NOT 3330V' & CHECK NXT @V60B6B8 01141000
TM RDEVFTR,VIRTUAL+SYSVIRT 3330V? @V60B6B8 01142000
BZ E2 'ADDR NOT 3330V' & CHECK NXT @V60B6B8 01143000
B DEVCHECK CHECK THIS DEVICE @V60B6B8 01144000
EJECT 01145000
PP EQU * @V60B6B8 01146000
MVC DEFMSGTP(L7),VIRTCHAR MOVE 'VIRTUAL' INTO MSG @V60B6B8 01147000
TM SAVEWRK1,VIRTUAL COMMAND DEFINE VIRTUAL? @V60B6B8 01148000
BO CHKNUM YES, LEAVE MESSAGE AS IS @V60B6B8 01149000
SYSV MVC DEFMSGTP(L7),SYSVCHAR SYSVIRT IN MESSAGE @V60B6B8 01150000
CHKNUM EQU * @V60B6B8 01151000
CLC FIRSTADR,LASTADDR ONLY ONE? @V60B6B8 01152000
BE CALLCVT YES, PUT OUT MESSAGE @V60B6B8 01153000
CHECKBUF L R3,FIRSTBUF GET ADDRESS OF BUFFER @V60B6B8 01154000
LTR R3,R3 IS THERE ONE? @V60B6B8 01155000
BZ DEFEXIT NO, LEAVE @V60B6B8 01156000
USING ADDRTABL,R3 @V60B6B8 01157000
NXTBUF L R6,ENTFIRST PICK UP FIRST SLOT @V60B6B8 01158000
NXTENTRY C R6,ENTNEXT ARE WE AT END? @V60B6B8 01159000
BNL FRETBUFF IF YES, RETURN BUFFER @V60B6B8 01160000
LH R1,0(R6) PICK UP ADDR @V60B6B8 01161000
CALLCVT CALL DMKCVTBH GET PRINTABLE FORMAT @V60B6B8 01162000
STCM R1,7,DEFMSG PUT IN MESSAGE TEXT @V60B6B8 01163000
LA R0,DEFMSGLN LENGTH OF MESSAGE @V60B6B8 01164000
LA R1,DEFMSG POINT TO MESSAGE @V60B6B8 01165000
CALL DMKQCNWT,PARM=NORET @V60B6B8 01166000
CLC FIRSTADR,LASTADDR ONLY ONE ADDR? @V60B6B8 01167000
BE DEFEXIT YES, LEAVE @V60B6B8 01168000
LA R6,ENTLN(R6) POINT TO NEXT ENTRY @V60B6B8 01169000
B NXTENTRY GO CHECK IT @V60B6B8 01170000
FRETBUFF L R4,BUFNEXT GET POINTER TO CHAINED BUFFER @V60B6B8 01171000
LA R0,TABLGET LENGTH OF TABLE @V60B6B8 01172000
LR R1,R3 TABLE ADDRESS IN REGISTER ONE @V60B6B8 01173000
CALL DMKFRET GIVE IT BACK @V60B6B8 01174000
LTR R3,R4 IS THERE ANOTHER BUFFER? @V60B6B8 01175000
BNZ NXTBUF IF YES, PROCESS IT @V60B6B8 01176000
B DEFEXIT LEAVE @V60B6B8 01177000
DEFMSG DC C'XXX DEFINED AS ' @V60B6B8 01178000
DEFMSGTP DC C'XXXXXX.' @V60B6B8 01179000
DEFMSGLN EQU *-DEFMSG @V60B6B8 01180000
DROP R3 DROP ADDRTABLE BASEREG @V60B6B8 01181000
EJECT 01182000
TABLINIT EQU * @V60B6B8 01183000
CLC FIRSTADR,LASTADDR ADDR1=ADDR2? @V60B6B8 01184000
BER R4 YES, RETURN @V60B6B8 01185000
GETTBL EQU * @V60B6B8 01186000
LA R0,TABLGET LENGTH OF TABLE @V60B6B8 01187000
CALL DMKFREE GET STORAGE @V60B6B8 01188000
ST R1,CURRBUFF THIS IS CURRENT BUFFER @V60B6B8 01189000
USING ADDRTABL,R1 ADDRESSABILITY @V60B6B8 01190000
XC TABLHDR(ADDRSLOT-TABLHDR),TABLHDR CLEAR HEADER @V60B6B8 01191000
LA R2,ADDRSLOT POINT TO FIRST SLOT @V60B6B8 01192000
ST R2,ENTFIRST SAVE AS FIRST ENTRY @V60B6B8 01193000
ST R2,ENTNEXT ALSO NEXT AVAILABLE @V60B6B8 01194000
LR R2,R0 NUMBER OF DOUBLEWORDS @V60B6B8 01195000
SLL R2,3 NUMBER OF BYTES @V60B6B8 01196000
LA R0,ENTLN GET ENTRY LENGTH @V60B6B8 01197000
SR R2,R0 POINT TO LAST ENTRY @V60B6B8 01198000
LA R2,0(R1,R2) IN TABLE @V60B6B8 01199000
ST R2,ENTLAST SAVE IT @V60B6B8 01200000
BR R4 RETURN @V60B6B8 01201000
DROP R1 @V60B6B8 01202000
SPACE 01203000
TABLADD DS 0H @VA11122 01204010
CLC FIRSTADR,LASTADDR RANGE SPECIFIED ? @VA11122 01204020
BER R5 YES RETURN - NO TABLE @VA11122 01204030
L R3,CURRBUFF GET CURRENT BUFFER @V60B6B8 01205000
USING ADDRTABL,R3 @V60B6B8 01206000
L R4,ENTNEXT GET NEXT AVAILABLE @V60B6B8 01207000
C R4,ENTLAST PAST END? @V60B6B8 01208000
BH GETBUFF YES, GET ANOTHER BUFFER @V60B6B8 01209000
STH R1,0(R4) SAVE ADDR @V60B6B8 01210000
LA R4,ENTLN(R4) POINT TO NEXT SLOT @V60B6B8 01211000
ST R4,ENTNEXT SAVE IT @V60B6B8 01212000
BR R5 RETURN @V60B6B8 01213000
GETBUFF EQU * @V60B6B8 01214000
LR R6,R1 SAVE R1 ACROSS CALL TO DMKFRE @V60B6B8 01215000
BAL R4,GETTBL GET ANOTHER BUFFER @V60B6B8 01216000
ST R1,BUFNEXT CHAIN NEW BUFFER TO LAST @V60B6B8 01217000
LR R1,R6 RESTORE R1 @V60B6B8 01218000
B TABLADD GO ADD DEVICE TO TABLE @V60B6B8 01219000
DROP R3 @V60B6B8 01220000
SERLN EQU 6 LENGTH OF VOLSER @V60B6B8 01221000
************************************************************ 01222000
*** ERROR MESSAGES 01223000
************************************************************ 01224000
DS 0H @V60B6B8 01225000
E1 EQU * @V60B6B8 01226000
LA R3,EMSG1LN MESSAGE LENGTH @V60B6B8 01227000
LA R2,EMSG1 POINTER TO MESSAGE @V60B6B8 01228000
B MSGWRT PUT OUT MESSAGE AND RETURN @V60B6B8 01229000
EMSG1 DC C'XXX NOT KNOWN.' @V60B6B8 01230000
EMSG1LN EQU *-EMSG1 @V60B6B8 01231000
************************************************************ 01232000
DS 0H @V60B6B8 01233000
E2 EQU * @V60B6B8 01234000
LA R3,EMSG2LN MESSAGE LENGTH @V60B6B8 01235000
LA R2,EMSG2 POINTER TO MESSAGE @V60B6B8 01236000
B MSGWRT PUT OUT MESSAGE AND RETURN @V60B6B8 01237000
EMSG2 DC C'XXX NOT 3330V.' @V60B6B8 01238000
EMSG2LN EQU *-EMSG2 @V60B6B8 01239000
************************************************************ 01240000
DS 0H @V60B6B8 01241000
E3 EQU * @V60B6B8 01242000
LA R3,EMSG3LN MESSAGE LENGTH @V60B6B8 01243000
LA R2,EMSG3 POINTER TO MESSAGE @V60B6B8 01244000
B MSGWRT PUT OUT MESSAGE AND RETURN @V60B6B8 01245000
EMSG3 DC C'XXX ALREADY ' @V60B6B8 01246000
EMSG3TP DC C'XXXXXXX.' @V60B6B8 01247000
EMSG3LN EQU *-EMSG3 @V60B6B8 01248000
************************************************************ 01249000
DS 0H @V60B6B8 01250000
E4 EQU * @V60B6B8 01251000
LA R3,EMSG4LN MESSAGE LENGTH @V60B6B8 01252000
LA R2,EMSG4 POINTER TO MESSAGE @V60B6B8 01253000
B MSGWRT PUT OUT MESSAGE AND RETURN @V60B6B8 01254000
EMSG4 DC C'XXX IS CURRENTLY DEDICATED.' @V60B6B8 01255000
EMSG4LN EQU *-EMSG4 @V60B6B8 01256000
************************************************************ 01257000
DS 0H @V60B6B8 01258000
E5 EQU * @V60B6B8 01259000
CALL DMKCVTBH GET ADDR IN PRINTABLE FORM @V60B6B8 01260000
STCM R1,7,EMSG5 PUT IN MESSAGE @V60B6B8 01261000
LA R0,EMSG5LN MESSAGE LENGTH @V60B6B8 01262000
LA R1,EMSG5 POINTER TO MESSAGE @V60B6B8 01263000
CALL DMKQCNWT,PARM=NORET PUT OUT MESSAGE @V60B6B8 01264000
BR R4 AND RETURN @V60B6B8 01265000
EMSG5 DC C'XXX IS OFFLINE. DEFINE WILL BE DONE.' @V60B6B8 01266000
EMSG5LN EQU *-EMSG5 @V60B6B8 01267000
************************************************************ 01268000
DS 0H @V60B6B8 01269000
E6 EQU * @V60B6B8 01270000
LA R3,EMSG6LN MESSAGE LENGTH @V60B6B8 01271000
LA R2,EMSG6 POINTER TO MESSAGE @V60B6B8 01272000
B MSGWRT PUT OUT MESSAGE AND RETURN @V60B6B8 01273000
EMSG6 DC C'XXX IN USE BY SYSTEM.' @V60B6B8 01274000
EMSG6LN EQU *-EMSG6 @V60B6B8 01275000
************************************************************ 01276000
DS 0H @V60B6B8 01277000
E7 EQU * @V60B6B8 01278000
LA R3,EMSG7LN MESSAGE LENGTH @V60B6B8 01279000
LA R2,EMSG7 POINTER TO MESSAGE @V60B6B8 01280000
B MSGWRT PUT OUT MESSAGE AND RETURN @V60B6B8 01281000
EMSG7 DC C'XXX HAS A MOUNTED VOL. MSS ID ' @V60B6B8 01282000
DC C'NOT AVAILABLE TO DEMOUNT IT.' @V60B6B8 01283000
EMSG7LN EQU *-EMSG7 @V60B6B8 01284000
************************************************************ 01285000
DS 0H @V60B6B8 01286000
E8 EQU * @V60B6B8 01287000
LA R3,EMSG8LN MESSAGE LENGTH @V60B6B8 01288000
LA R2,EMSG8 POINTER TO MESSAGE @V60B6B8 01289000
B MSGWRT PUT OUT MESSAGE AND RETURN @V60B6B8 01290000
EMSG8 DC C'XXX - ERROR DEMOUNTING VOLUME.' @V60B6B8 01291000
EMSG8LN EQU *-EMSG8 @V60B6B8 01292000
************************************************************ 01293000
DS 0H @V60B6B8 01294000
E9 EQU * @V60B6B8 01295000
LA R0,EMSG9LN LENGTH OF MESSAGE @V60B6B8 01296000
LA R1,EMSG9 POINT TO MESSAGE @V60B6B8 01297000
CALL DMKQCNWT,PARM=NORET PUT OUT MESSAGE @V60B6B8 01298000
B DEFEXIT LEAVE @V60B6B8 01299000
EMSG9 DC C'INVALID RANGE' @V60B6B8 01300000
EMSG9LN EQU *-EMSG9 LENGTH OF MESSAGE @V60B6B8 01301000
************************************************************ 01302000
MSGWRT CALL DMKCVTBH CONVERT TO PRINTABLE FORM @V60B6B8 01303000
STCM R1,7,0(R2) INSERT IN MESSAGE @V60B6B8 01304000
LR R0,R3 LENGTH OF MESSAGE @V60B6B8 01305000
LR R1,R2 ADDRESS OF MESSAGE @V60B6B8 01306000
CALL DMKQCNWT,PARM=NORET ISSUE MESSAGE @V60B6B8 01307000
CLC FIRSTADR,LASTADDR ONLY ONE PARAMATER? @V60B6B8 01308000
BE DEFEXIT YES, LEAVE NOW @V60B6B8 01309000
B CHKNXT GO CHECK NEXT ADDRESS @V60B6B8 01310000
************************************************************ 01311000
EMSG153 EQU 153 MAX NUM OF DEVICES REACHED @VA13217 01311500
EMSG086A EQU * @V60B6B8 01312000
LA R0,L5 MSG INSERT LENGTH @V60B6B8 01313000
LA R1,ADD1PARM PARM TO BE INSERTED @V60B6B8 01314000
EMSG086 EQU * COMMON MSG 086 PROCESSING @V60B6B8 01315000
L R2,OPTION86 MSG OPTIONS @V60B6B8 01316000
B MSGIDBLD GO BUILD MSG ID @V60B6B8 01317000
EMSG086B EQU * @V60B6B8 01318000
LR R0,R2 PARAMETER LENGTH @V60B6B8 01319000
B EMSG086 PUT OUT MSG @V60B6B8 01320000
EMSG086F EQU * @V60B6B8 01321000
LA R0,L5 MSG INSERT LENGTH @V60B6B8 01322000
LA R1,ADD2PARM PARM TO BE INSERTED @V60B6B8 01323000
B EMSG086 PUT OUT MSG @V60B6B8 01324000
EMSG087 EQU * INVALID RDEVICE ADDR @V60B6B8 01325000
LH R1,RDEVADD BINARY DEVICE ADDR @V60B6B8 01326000
CALL DMKCVTBH CONVERT TO HEX @V60B6B8 01327000
STCM R1,7,SAVEWRK3 SAVE THE HEX VALUE @V60B6B8 01328000
LA R1,SAVEWRK3 MSG INSERT ADDR @V60B6B8 01329000
L R2,OPTION87 OPTIONS @V60B6B8 01330000
LA R0,L3 MSG INSERT LENGTH @V60B6B8 01331000
B MSGIDBLD BUILD MSG ID @V60B6B8 01332000
EJECT 01333000
* 01334000
* THE FOLLOWING CONSTANTS ARE USED IN THE PROGRAM 01335000
* 01336000
DS 0F ALIGN TO FULL WORD @V60B6B8 01337000
OPTION86 DC X'00',C'W',X'0056' OPTIONS FOR MSG 086 @V60B6B8 01338000
OPTION87 DC X'00',C'W',X'0057' OPTIONS FOR MSG 087 @V60B6B8 01339000
ADD1PARM DC CL5'ADDR1' INSERT FOR MSG 086 @V60B6B8 01340000
ADD2PARM DC CL5'ADDR2' INSERT FOR MSG 086 @V60B6B8 01341000
DASH EQU C'-' @V60B6B8 01342000
BLANK EQU C' ' @V60B6B8 01343000
N1 EQU 1 @V60B6B8 01344000
L3 EQU 3 @V60B6B8 01345000
L5 EQU 5 @V60B6B8 01346000
L7 EQU 7 @V60B6B8 01347000
TABLGET EQU 256 @V60B6B8 01348000
LTORG 01349000
EJECT 01350000
COPY SAVE 01351000
SPACE 01352000
* FIELDS DEFINED WITHIN THE SAVEAREA : 01353000
* 01354000
DEFLAGS EQU SAVEWRK1 INTERNAL FLAGS FOR 'DEFINE' 01355000
DEVADDR EQU SAVEWRK2 DEVICE ADDRESS FOR RE-DEFINE 01356000
* EQUATES DEFINING FIELDS WITHIN THE SAVE AREA 01357000
************************************************************ 01358000
FIRSTADR EQU SAVEWRK2 @V60B6B8 01359000
LASTADDR EQU SAVEWRK3 @V60B6B8 01360000
CURRADDR EQU SAVEWRK4 @V60B6B8 01361000
FIRSTBUF EQU SAVEWRK5 @V60B6B8 01362000
CURRBUFF EQU SAVEWRK6 @V60B6B8 01363000
RDEVADR1 EQU SAVEWRK7 @V60B6B8 01364000
ADDR2 EQU SAVEWRK8 @V60B6B8 01365000
SPACE 01366000
************************************************************ 01367000
EJECT 01368000
* 01369000
* THE FOLLOWING DSECT MAPS THE TABLE OF DEVICES 01370000
* SUCCESSFULLY DEFINED IN A DEFINE 01371000
* VIRTUAL OR DEFINE SYSVIRT COMMAND 01372000
* 01373000
ADDRTABL DSECT @V60B6B8 01374000
TABLHDR DS 0F HEADER PORTION @V60B6B8 01375000
ENTFIRST DS F POINTER TO FIRST ENTRY @V60B6B8 01376000
ENTLAST DS F POINTER TO LAST ENTRY @V60B6B8 01377000
ENTNEXT DS F NEXT AVAILABLE ENTRY @V60B6B8 01378000
BUFNEXT DS F POINTER TO NEXT BUFFER @V60B6B8 01379000
ADDRSLOT DS 0H TABLE ENTRIES @V60B6B8 01380000
ENTLN EQU 2 HALF-WORD SLOTS @V60B6B8 01381000
EJECT 01382000
COPY VMBLOK 01383000
COPY VBLOKS 01384000
COPY RBLOKS 01385000
COPY IOBLOKS 01386000
COPY UDIRECT 01387000
COPY DEVTYPES 01388000
COPY EQU 01389000
PSA 01390000
END DMKDEF 01391000