ibm:vm370-lib:cp:dmkcst.assemble_src
Table of Contents
DMKCST Source
References
- Fixes Applied : 4
- This Source Date : Thursday, December 7, 1978
- Last Fix ID : [R12943DK]
Source Listing
- DMKCST.ASSEMBLE.txt
- CST TITLE 'DMKCST (CP) VM/370 - RELEASE 6' 00001000
- ISEQ 73,80 VALIDATE SEQUENCING OF INPUT 00002000
- *. 00003000
- * MODULE NAME - 00004000
- * 00005000
- * DMKCST 00006000
- * 00007000
- * FUNCTION - 00008000
- * 00009000
- * DMKCST CONTAINS CERTAIN SPOOLING COMMAND FUNCTIONS AVAILABLE 00010000
- * TO CLASS G USERS. 00011000
- * 00012000
- * ATTRIBUTES - 00013000
- * 00014000
- * REENTRANT, PAGEABLE, CALLED VIA SVC 00015000
- * 00016000
- * ENTRY POINTS - 00017000
- * 00018000
- * DMKCSTAG - TAG COMMAND 00019000
- * 00020000
- * ENTRY CONDITIONS - 00021000
- * 00022000
- * GPR9 = ADDRESS OF THE COMMAND LINE BUFFER; MUST BE PRESERVED 00023000
- * FOR CALLS TO DMKSCNFD 00024000
- * GPR12 = ADDRESS OF ENTRY POINT 00025000
- * GPR13 = ADDRESS OF SAVEAREA 00026000
- * 00027000
- * EXIT CONDITIONS - 00028000
- * 00029000
- * NORMAL - 00030000
- * GPR2 = 0 00031000
- * 00032000
- * ERROR - 00033000
- * 00034000
- * GPR2 = CONTAINS THE BINARY MESSAGE NUMBER 00035000
- * - EITHER AN OPTION IS ILLEGAL OR SOME CONDITION 00036000
- * EXISTS THAT MAKES IT IMPOSSIBLE TO EXECUTE THE COMMAND 00037000
- * A MESSAGE IS TYPED TO DESCRIBE THE ERROR; THE ERROR 00038000
- * MESSAGES THAT MAY OCCUR ARE LISTED WITH EACH COMMAND 00039000
- EJECT 00040000
- * 00041000
- * CALLS TO OTHER ROUTINES - 00042000
- * 00043000
- * DMKFREE - TO OBTAIN A BLOCK FROM FREE STORAGE 00044000
- * DMKFRET - TO RETURN STORAGE 00045000
- * DMKSCNVU - LOCATE A VDEVBLOK 00046000
- * DMKSCNVN - TO GET A DEVICE TYPE EBCDIC NAME 00047000
- * DMKSCNVD - TO GET A VIRTUAL DEVICE ADDRESS (CUU FORM) 00048000
- * DMKSCNFD - SCAN THE COMMAND LINE BUFFER FOR OPTIONS 00049000
- * DMKCVTDB - TO CONVERT EBCDIC SPOOL ID TO BINARY 00050000
- * DMKCVTHB - TO CONVERT HEX ADDRESS OPTIONS TO BINARY 00051000
- * DMKCVTBH - TO CONVERT BINARY DEVICE ADDRESS TO EBCDIC 00052000
- * DMKPGTVG - TO RESERVE A PAGE OF SYSTEM VIRTUAL STORAGE 00053000
- * DMKPGTVR - TO RELEASE A PAGE OF SYSTEM VIRTUAL STORAGE 00054000
- * DMKRPAGT - TO READ A SPOOL FILE PAGE BUFFER 00055000
- * DMKRPAPT - TO REWRITE A MODIFIED SPOOL FILE PAGE BUFFER 00056000
- * DMKERMSG - WRITE ERROR MESSAGES 00057000
- * 00058000
- * EXTERNAL REFERENCES - 00059000
- * 00060000
- * DMKRSPRD - (ARSPRD) READER FILE CHAIN ANCHOR 00061000
- * DMKRSPPR - (ARSPPR) PRINTER FILE CHAIN ANCHOR (NOT USED) 00062000
- * DMKRSPPU - (ARSPPU) PUNCH FILE CHAIN ANCHOR (NOT USED) 00063000
- * 00064000
- * TABLES / WORKAREAS - 00065000
- * 00066000
- * VMBLOK, VDEVBLOK, AND SFBLOK ARE REFERENCED. VSPXBLOK IS 00067000
- * REFERENCED, UPDATED, OR DELETED. 00068000
- * 00069000
- * THE SAVEWRK FIELDS IN THE STANDARD SAVEAREA ARE USED BY THE 00070000
- * OPTION PROCESSING SUBROUTINES FOR THE FOLLOWING VALUES - 00071000
- * 00072000
- * SAVEWRK1 - ADDR OF SYSTEM VIRTUAL STORAGE PAGE 00073000
- * SAVEWRK2,3 - UNUSED 00074000
- * SAVEWRK4 - ADDR OF 24 BYTE FREE STORAGE WORK BUFFER 00075000
- * SAVEWRK5 - SAVE AREA FOR R0 IN EXIT ROUTINE 00076100
- * SAVEWRK6,7 - SAVE AREA FOR R0,R1 SCAN VALUES 00077000
- * SAVEWRK8 - SAVE AREA FOR R5 00077700
- * SAVEWRK9 - SAVEAREA TO SAVE SFBFLAG 00078400
- * 00079000
- * REGISTER USAGE - 00080000
- * 00081000
- * ALL SUBROUTINES IN THE MODULE CONFORM GENERALLY TO THIS USAGE; 00082000
- * ANY INDIVIDUAL DEVIATIONS OR EXTENSIONS ARE LISTED WITH THE 00083000
- * COMMAND DESCRIPTION 00084000
- * 00085000
- * GPR0 = LENGTH OF OPTION - RETURNED FROM DMKSCNFD 00086000
- * GPR1 = ADDRESS OF OPTION - RETURNED FROM DMKSCNFD 00087000
- * GPR2 = SCRATCH 00088000
- * GPR3 = INTERNAL LINKAGE - 2ND LEVEL 00089000
- * GPR4 = INTERNAL LINKAGE - 1ST LEVEL 00090000
- * GPR5 = DEVICE TYPE FLAGS - LOGICAL SUM OF TYPES 00091000
- * GPR6 = VSPXBLOK BASE 00092000
- * GPR7 = SFBLOK BASE 00093000
- * GPR8 = VDEVBLOK BASE 00094000
- * GPR9 = INPUT COMMAND LINE ADDRESS 00095000
- * GPR10 = REMAINING DEVICE COUNT 00096000
- * GPR11 = VMBLOK BASE 00097000
- * GPR12 = DMKCST BASE 00098000
- * GPR13 = SAVEAREA BASE 00099000
- * GPR14 = EXTERNAL LINKAGE 00100000
- * GPR15 = EXTERNAL LINKAGE 00101000
- * 00102000
- * NOTES - 00103000
- * 00104000
- * NONE 00105000
- * 00106000
- * OPERATION - 00107000
- * 00108000
- * THE VARIOUS FORMS OF THE TAG COMMAND ARE PROCESSED BY THIS 00109000
- * MODULE. THE TAG COMMAND PROCESSOR IS ENTERED VIA A CALL 00110000
- * FROM DMKCFM. THE KEYWORD OPTIONS ARE INSPECTED TO DETERMINE 00111000
- * THE FUNCTION WHICH IS TO BE PERFORMED. THE POSSIBLE FORMS 00112000
- * ARE TAG DEV, TAG FILE, TAG QUERY DEV, AND TAG QUERY FILE. 00113000
- * EACH FORM IMPLIES A REQUEST FOR A DIFFERENT FUNCTION, WHICH 00114000
- * IS PERFORMED BY A SEPARATE FUNCTION PROCESSOR. ONLY ONE 00115000
- * FUNCTION MAY BE REQUESTED BY A SINGLE TAG COMMAND LINE. 00116000
- * THE SEPARATE FUNCTION PROCESSORS ISSUE CALLS TO THE INTERNAL 00117000
- * AND EXTERNAL SUBROUTINES TO EXECUTE THE COMMANDS. THE 00118000
- * LOGIC USED BY EACH OF THESE FUNCTION PROCESSORS IS DESCRIBED 00119000
- * AT THE START OF THE PROGRAMMING FOR EACH, BELOW. 00120000
- * 00121000
- * OPTION PROCESSORS - 00122000
- * 1. GETYPE - SAVE THE FILE TYPE (OR DEVICE TYPE) 00123000
- * 2. GETFILE - LOCATE THE SPOOL FILE ID, CONVERT IT, AND 00124000
- * CALL GETSFB TO LOCATE THE FILE'S SFB 00125000
- * 00126000
- * LIST SCANNING ROUTINES - 00127000
- * 1. GETDEVIC - LOCATE THE NEXT VDEVBLOK OF THE APPROPRIATE 00128000
- * ADDRESS, CLASS AND TYPE (2ND LEVEL ROUTINE) 00129000
- * 2. GETSFB - SCAN THE SPOOL READER FILE CHAIN TO LOCATE 00130000
- * A FILE SPECIFIED BY A SPOOL ID (2ND LEVEL 00131000
- * ROUTINE) 00132000
- * 00133000
- *. 00134000
- EJECT 00135000
- COPY OPTIONS @V293598 00136000
- EJECT 00137000
- COPY LOCAL OPTIONS @V293598 00138000
- EJECT 00139000
- DMKCST CSECT @V293598 00140000
- SPACE 3 00141000
- EXTRN DMKCVTBH,DMKCVTDB,DMKCVTHB @V293598 00142000
- EXTRN DMKERMSG @V293598 00143000
- EXTRN DMKPGTVG,DMKPGTVR @V293598 00144000
- EXTRN DMKRPAGT,DMKRPAPT @V293598 00145000
- EXTRN DMKSCNFD,DMKSCNVD,DMKSCNVN,DMKSCNVU @V293598 00146000
- SPACE 3 00147000
- USING PSA,R0 @V293598 00148000
- USING SFBLOK,R7 @V293598 00149000
- USING VDEVBLOK,R8 @V293598 00150000
- USING BUFFER,R9 @V293598 00151000
- USING VMBLOK,R11 @V293598 00152000
- USING SAVEAREA,R13 @V293598 00153000
- SPACE 2 00154000
- ID DC CL8'DMKCST' MODULE NAME @V293598 00155000
- EJECT 00156000
- *. 00157000
- * 00158000
- * SUBROUTINE NAME - 00159000
- * 00160000
- * DMKCSTAG 00161000
- * 00162000
- * FUNCTION - 00163000
- * 00164000
- * TO SPECIFY OR QUERY THE TAG APPLICATION DATA FOR A DEVICE 00165000
- * OR CLASS OF DEVICES, OR FOR A READER FILE. THE DEVICE(S) 00166000
- * MAY BE SPECIFIED BY ADDRESS OR GENERIC TYPE; THE FILE MUST 00167000
- * BE SPECIFIED BY SPOOL ID. FOR A TAG SPECIFICATION COMMAND 00168000
- * THE COMMAND LINE CONTENT FOLLOWING THE DEVICE TYPE OPTION 00169000
- * BECOMES THE NEW TAG DATA, AND IT IS NOT INTERPRETED OR MODI- 00170000
- * FIED BY THIS ROUTINE. 00171000
- * 00172000
- * COMMAND LINE FORMAT - 00173000
- * 00174000
- * +-----+-----------------------------------------+ 00175000
- * | TAG | DEV PRINTER <TAG APPLICATION DATA> | 00176000
- * | | PUNCH | 00177000
- * | | CONSOLE | 00178000
- * | | VADDR | 00179000
- * | | | 00180000
- * | | FILE SPOOLID <TAG APPLICATION DATA> | 00181000
- * | | | 00182000
- * | | QUERY DEV PRINTER | 00183000
- * | | PUNCH | 00184000
- * | | CONSOLE | 00185000
- * | | VADDR | 00186000
- * | | | 00187000
- * | | FILE SPOOLID | 00188000
- * +-----+-----------------------------------------+ 00189000
- * 00190000
- * PRINTER PUNCH CONSOLE 00191000
- * P PRT PU PCH CON 00192000
- * 00193000
- * 00194000
- * OPERATION - 00195000
- * 00196000
- * 1. CALL DMKSCNFD TO LOCATE THE FIRST OPTION REQUEST; 00197000
- * IF IT IS MISSING, EXIT GIVING MSG003E. 00198000
- * 2. IF THE FIRST OPTION IS DEV OR FILE, PASS CONTROL TO 00199000
- * THE CORRESPONDING PROCESSING ROUTINE. 00200000
- * 3. IF THE FIRST OPTION IS NOT QUERY, EXIT GIVING MSG003E. 00201000
- * 4. CALL DMKSCNFD TO LOCATE THE SECOND OPTION REQUEST; 00202000
- * IF IT IS MISSING, EXIT GIVING MSG003E. 00203000
- * 5. IF THE SECOND OPTION IS DEV OR FILE, PASS CONTROL TO 00204000
- * THE CORRESPONDING QUERY PROCESSING ROUTINE. 00205000
- * 6. IF THE SECOND OPTION IS NEITHER DEV OR FILE, EXIT 00206000
- * GIVING MSG003E. 00207000
- * 00208000
- EJECT 00209000
- * RESPONSES - 00210000
- * 00211000
- * THE FOLLOWING ARE TYPICAL RESPONSES FOR THE TAG QUERY 00212000
- * COMMAND FORM PROCESSED BY THIS SUBROUTINE. XXX DENOTES 00213000
- * A VIRTUAL DEVICE ADDRESS. 00214000
- * 00215000
- * TAG QUERY DEV 00216000
- * CONS XXX TAG: 00217000
- * PRT XXX TAG: 00218000
- * PUN XXX TAG: 00219000
- * 00220000
- * (EACH OF THE ABOVE RESPONSES IS FOLLOWED BY A LINE CONTAINING 00221000
- * THE REFERENCED DEVICE'S TAG AS IT IS CURRENTLY SET.) 00222000
- * 00223000
- * TAG NOT SET 00224000
- * 00225000
- * 00226000
- * TAG QUERY FILE 00227000
- * 00228000
- * (IF A NONBLANK TAG IS SET FOR THE SPECIFIED FILE, THE 00229000
- * RESPONSE IS A LINE CONTAINING THE FILE'S TAG AS CURRENTLY 00230000
- * SET.) 00231000
- * 00232000
- * (TAG BLANK) 00233000
- * (TAG MISSING) 00234000
- * 00235000
- * 00236000
- * ERROR MESSAGES - 00237000
- * 00238000
- * DMKCST003E INVALID OPTION - (OPTION) 00239000
- * DMKCST006E INVALID DEVICE TYPE - (ADDR) 00240000
- * DMKCST022E VADDR MISSING OR INVALID 00241000
- * DMKCST026E OPERAND MISSING OR INVALID 00242000
- * DMKCST027E SPOOLID MISSING OR INVALID 00243000
- * DMKCST040E DEV (ADDR) DOES NOT EXIST 00244000
- * DMKCST042E SPOOLID (ID) DOES NOT EXIST 00245000
- * 00246000
- * SPOOL (PAGING) ERROR (WITH R2 RETURN CODE = 429) 00247000
- *. 00248000
- EJECT 00249000
- DMKCSTAG RELOC @V293598 00250000
- SPACE 00251000
- XC SAVEWRK1(4),SAVEWRK1 CLEAR SAVEWRK1 @V293598 00252000
- XC SAVEWRK2(32),SAVEWRK2 CLEAR SAVEWRK2-9 @V293598 00253000
- AG01 CALL DMKSCNFD LOCATE OPTION REQUEST @V293598 00254000
- BNZ MSG026E OPERAND MISSING OR INVALID @V293598 00255000
- LR R14,R0 COUNT @V293598 00256000
- BCTR R14,0 -1 @V293598 00257000
- C R0,F2 COUNT LESS THAT 2 ?? @V293598 00258000
- BL MSG003E YES - INVALID OPTION @V293598 00259000
- EX R14,CLCDEV DOES IT SAY DEV ?? @V293598 00260000
- BE TD01 YES, TAG SPECIFIED DEVICE(S)@V293598 00261000
- EX R14,CLCFILE DOES IT SAY FILE ?? @V293598 00262000
- BE TF01 YES, TAG THE SPECIFIED FILE @V293598 00263000
- EX R14,CLCQUERY DOES IT SAY QUERY ?? @V293598 00264000
- BNE MSG003E INVALID OPTION IF NOT @V293598 00265000
- AG02 CALL DMKSCNFD LOCATE NEXT OPTION PARAMATER@V293598 00266000
- BNZ MSG026E NO GOOD IF IT IS MISSING @V293598 00267000
- C R0,F2 AT LEAST TWO CHARS LONG ?? @V293598 00268000
- BL MSG003E NO GOOD IF IT IS NOT @V293598 00269000
- LR R14,R0 LNGTH OF SPECIFIED PARAMETER@V293598 00270000
- BCTR R14,0 DECREMENT COUNT FOR CHAR OP @V293598 00271000
- EX R14,CLCDEV DOES IT SAY 'DEV ' ?? @V293598 00272000
- BE QD01 YEP - PROCESS A DEVICE QUERY@V293598 00273000
- EX R14,CLCFILE DOES IT SAY 'FILE ' ?? @V293598 00274000
- BE QF01 YEP - PROCESS A FILE QUERY @V293598 00275000
- B MSG003E OTHERWISE INVALID OPTION @V293598 00276000
- EJECT 00277000
- *. 00278000
- * OPERATION OF PROCESSOR FOR TAG DEV - 00279000
- * 00280000
- * 1. CALL GETYPE; IF TYPE = 'ALL', OR IF DEVICE TYPE IS NOT 00281000
- * CONSOLE OR SPOOL OUTPUT, EXIT GIVING MSG006E. 00282000
- * 2. CALL DMKSCNFD TO LOCATE THE START OF THE NEW TAG DATA; 00283000
- * IF PRESENT, CALCULATE AND VALIDATE THE TAG DATA BYTE 00284000
- * COUNT, AND STORE THE TAG BYTE COUNT AND DATA ADDRESS IN 00285000
- * SAVEWRK6 AND SAVEWRK7, RESPECTIVELY. 00286000
- * 3. IF NEW TAG DATA HAS BEEN SPECIFIED, GO TO STEP 6. 00287300
- * 4. IF OLD VSPXBLOK IS LONGER THAN MINIMUM, GET A SHORT 00287600
- * ONE, MOVE IN THE OLD HEADER INFO AND FRET THE OLD ONE. 00287900
- * 5. GO TO STEP 8. 00288200
- * 6. GET A NEW VSPXBLOK WHICH IS LONG ENOUGH FOR THE NEW 00288500
- * TAG INFORMATION, MOVE IN THE OLD HEADER INFO 00288800
- * AND FRET THE OLD ONE. 00289100
- * 7. MOVE THE NEW TAG DATA AND TAG LENGTH INTO THE VSPXBLOK. 00289400
- * 8. CALL GETDEVIC; IF LAST DEVICE, EXIT; OTHERWISE GO TO 00289700
- * STEP 3. 00302000
- *. 00303000
- SPACE 3 00304000
- TD01 SR R6,R6 INDICATE POSSIBLE VADDR @V293598 00305000
- BAL R4,GETYPE GET DEVICE TYPE @V293598 00306000
- SPACE 00307000
- TD02 EX R5,CLIALL TYPE = ALL ?? @V293598 00308000
- BE MSG006E YES - INVALID TYPE @V293598 00309000
- TD03 TM VDEVTYPC,CLASURO OUTPUT TYPE DEVICE ?? @V293598 00310000
- BO TD04 O.K. IF U.R. OUPTUT DEVICE @V293598 00311000
- TM VDEVTYPC,CLASTERM IS IT A TERMINAL DEVICE ?? @V293598 00312000
- BNO MSG006E NO GOOD IF IT ISN'T @V293598 00313000
- CLI VDEVTYPE,TYP3210 IS IT A VIRTUAL CONSOLE ?? @V293598 00314000
- BNE MSG006E NO - INVALID DEVICE TYPE @V293598 00315000
- SPACE 00316000
- TD04 MVC SAVEWRK6(4),ZEROES INIT TAG DATA COUNT TO ZERO @V293598 00317000
- ST R5,SAVEWRK8 SAVE R5 -- NEED A SCRATCH @VA05033 00317500
- CALL DMKSCNFD CALL SCN TO GET PAST BLANKS @VA05013 00317625
- BC 2,TD05A IF NO TAG, GO RESET OLD ONE @VA05013 00317750
- LR R3,R1 POINT R3 TO BEGINNING OF TAG @VA05013 00317875
- L R4,BUFCNT GET REMAINING TAG COUNT @VA05013 00318000
- ALR R4,R0 ADD IN LENGTH OF 1ST TOKEN @VA05013 00318125
- STM R3,R4,BUFNXT POINT BUFFER TO BEG. OF TAG @VA05013 00318250
- LTR R5,R4 COUNT = 0 ? @VA04461 00318400
- BNP TD05A YES, RESET OLD TAGS @VA05033 00318810
- LA R2,L'VSPXTAG MAX TAG CHARACTER COUNT @VA04461 00319200
- CLR R5,R2 DATA LEFT GREATER THAN MAX? @VA04461 00319600
- BNH TD05 NO, USE COUNT AS IS @VA04461 00320000
- LR R5,R2 YES, SCAN ONLY MAXIMUN @VA04461 00320400
- TD05 LR R2,R3 SAVE START ADDRESS @VA04461 00320800
- LR R1,R5 SAVE DATA LENGTH @VA04461 00321200
- TDSCANST CLI 0(R3),X'15' LOGICAL LINE END ? @VA04461 00321600
- BE TDSCANE YES, COMPUTE TEXT LENGTH @VA04461 00322000
- LA R3,1(,R3) NO, POINT TO NEXT TEXT BYTE @VA04461 00322400
- BCTR R4,R0 DECREMENT REAL BUFFER LENGTH AVA04461 00322800
- BCT R5,TDSCANST LOOP THROUGH TEXT LENGTH @VA04461 00323200
- TDSCANE STM R3,R4,BUFNXT SAVE UPDATED BUFFER ADDRESS @VA04461 00323600
- ST R2,SAVEWRK7 SAVE TAG START ADDRESS @VA04461 00324000
- SR R1,R5 CALCULATE TAG DATA LENGTH @VA04461 00324400
- ST R1,SAVEWRK6 AND SAVE IT @VA04461 00324800
- SPACE 00325500
- TD05A L R5,SAVEWRK8 RESTORE R5 FOR LATER TEST @VA05033 00326200
- TD06 L R6,VDEVEXTN BASE FOR OLD XBLOK @V293598 00327000
- CLI SAVEWRK6+3,X'00' ANY NEW TAG DATA ?? @V293598 00328000
- BNE TD08 YES - MAKE NEW XBLOK @V293598 00329000
- SPACE 00332000
- USING VSPXBLOK,R6 DEFINE OLD XBLOK ADDRESSING @V293598 00333000
- SPACE 00334000
- CLI VSPXLEN,VSPXSIZ1 ALREADY AT MINIMUM? @VA09273 00335000
- BE TD11 XFER IF SO @VA09273 00335500
- LA R0,VSPXSIZ1 GET A MINIMUM LENGTH BLOCK @VA09273 00336000
- CALL DMKFREE GET THE STORAGE @VA09273 00336500
- MVC 0(VSPXSIZ1*8,R1),VSPXBLOK MOVE IN OLD HDR @VA09273 00337000
- MVI VSPXTGLN-VSPXBLOK(R1),X'00' ZERO TAG LENGTH @VA09273 00337500
- STC R0,VSPXLEN-VSPXBLOK(R1) LENGTH OF THE BLOCK @VA09273 00338000
- ST R1,VDEVEXTN THE NEW VSPXBLOK @VA09273 00338500
- SR R0,R0 GET THE LENGTH @VA09273 00339000
- IC R0,VSPXLEN OF THE OLD ONE @VA09273 00339500
- LR R1,R6 ADDRESS OF THE OLD ONE @VA09273 00340000
- CALL DMKFRET FRET THE STORAGE @VA09273 00340500
- B TD11 GO LOOK AT NEXT DEVICE @VA09273 00341000
- SPACE 00341500
- TD08 LA R0,VSPXSIZ1*8+7 HEADER LENGTH @VA09273 00342000
- AL R0,SAVEWRK6 TAG LENGTH @VA09273 00342500
- SRL R0,3 CONVERT TO DOUBLEWORDS @VA09273 00343000
- CALL DMKFREE STORAGE FOR NEW VSPXBLOK @VA09273 00343500
- MVC 0(VSPXSIZ1*8,R1),VSPXBLOK MOVE IN OLD HDR @VA09273 00344000
- STC R0,VSPXLEN-VSPXBLOK(R1) LGTH OF NEW VSPXBLOK @VA09273 00344500
- MVC VSPXTGLN-VSPXBLOK(1,R1),SAVEWRK6+3 NEW TAG LGTH @VA09273 00345000
- ST R1,VDEVEXTN SAVE ADDRESS IN VDEVBLOK @VA09273 00345500
- SR R0,R0 PREPARE TO FRET OLD ONE @VA09273 00346000
- IC R0,VSPXLEN OLD LENGTH IN DBLWDS @VA09273 00346500
- LR R1,R6 ADDRESS OF OLD ONE @VA09273 00347000
- CALL DMKFRET FRET THE STORAGE @VA09273 00347500
- L R6,VDEVEXTN RESTORE ADDRESSIBILITY @VA09273 00348000
- L R2,SAVEWRK6 NEW TAG DATA COUNT @V293598 00358000
- LTR R2,R2 ANY ?? @V293598 00359000
- BZ TD11 NEXT DEVICE IF NOT @V60B9BA 00360000
- BCTR R2,0 -1 @V293598 00361000
- L R3,SAVEWRK7 NEW TAG DATA ADDR @V293598 00362000
- EX R2,TDMOVE MOVE IN THE NEW TAG DATA @V293598 00363000
- SPACE 00364000
- DROP R6 @V293598 00376000
- SPACE 00377000
- TD11 LTR R5,R5 ANY MORE DEVICES ?? @V293598 00380000
- BZ TD12 NO - @V293598 00381000
- BAL R3,GETDEVIC GET NEXT DEVICE @V293598 00382000
- LTR R10,R10 ALL DONE ?? @V293598 00383000
- BNZ TD06 NO - PROCESS THIS DEVICE @V293598 00384000
- SPACE 00385000
- TD12 B CSTEXIT @V293598 00386000
- SPACE 3 00387000
- TDMOVE MVC VSPXTAG-VSPXBLOK(0,R6),0(R3) EX TAG DATA MOVE @V60B9BA 00388000
- EJECT 00389000
- *. 00390000
- * OPERATION OF PROCESSOR FOR TAG FILE - 00391000
- * 00392000
- * 1. CALL GETFILE TO GET THE ADDRESS OF THE REQUESTED FILE'S 00393000
- * SPOOL FILE BLOCK; IF THE SPECIFIED ID IS INVALID, OR 00394000
- * IF A CORRESPONDING FILE OWNED BY THE CALLER IS NOT FOUND, 00395000
- * THE GETFILE OR GETSFB SUBROUTINE WILL EXIT WITH AN ERROR 00396000
- * MESSAGE. 00397000
- * 2. CALL DMKPGTVR TO RESERVE A PAGE OF SYSTEM VIRTUAL STORAGE 00398000
- * TO BE USED AS A BUFFER FOR THE SPOOL DATA BLOCK WHICH 00399000
- * CONTAINS THE TAG RECORD. 00400000
- * 3. READ THE FIRST SPOOL DATA BLOCK BY CALLING DMKRPAGT; IF 00401000
- * AN ERROR OCCURS, ISSUE AN ERROR MESSAGE AND EXIT. 00402000
- * 4. INSPECT TO SEE THAT THE FIRST SPOOL RECORD CONTAINS A 00403000
- * DATA FIELD; QUIT AND EXIT IF IT DOES NOT. 00404000
- * 5. CLEAR THE EXISTING TAG FIELD TO BLANKS. 00405000
- * 6. CALL DMKSCNFD TO LOCATE THE NEW TAG DATA; IF NONE IS 00406000
- * FOUND, LEAVE THE SPOOL FILE TAG RECORD BLANK AND GO 00407000
- * TO STEP 8. 00408000
- * 7. MOVE THE NEW TAG DATA TO THE SPOOL FILE TAG RECORD, 00409000
- * TRUNCATING ON THE RIGHT AS NECESSARY. 00410000
- * 8. CALL DMKRPAPT TO REWRITE THE MODIFIED SPOOL DATA BLOCK. 00411000
- * 9. CALL DMKPGTVR TO RETURN THE SYSTEM VIRTUAL STORAGE PAGE, 00412000
- * AND EXIT. 00413000
- *. 00414000
- SPACE 3 00415000
- TF01 BAL R4,GETFILE LOCATE REQUESTED FILE'S SFB @V293598 00416000
- SL R8,VMDVSTRT GET VDEVBLOK DISP @VM01086 00417000
- CALL DMKPGTVG GOT IT, RESERVE SY VIRT PAGE@V293598 00418000
- ST R1,SAVEWRK1 SAVE ADDRESS OF SY VIRT PAGE@V293598 00419000
- L R0,SFBSTART DASD ADDR OF FILE'S 1ST BUFR@V293598 00420000
- MVC SAVEWRK9(1),SFBFLAG SAVE FLAGS @VA09978 00420100
- OI SFBFLAG,SFBINUSE MARK SPOOL FILE BLOCK IN USE @VA09978 00420200
- CALL DMKRPAGT,PARM=(BRING+SYSTEM) READ IN 1ST BUFFER@V293598 00421000
- BNZ MSG424E PAGING ERROR - QUIT @V305435 00422000
- MVC SFBFLAG,SAVEWRK9 RESTORE FLAG IF IT WAS ORIG.ON @VA09978 00422100
- AL R8,VMDVSTRT GET VDEVBLOK ADDR @VM01086 00423000
- CLI 16(R2),X'03' IS THERE A TAG RECORD? @VA08508 00423300
- BNE MSG027E INVALID FILE MESSAGE @VA12943 00423610
- CLI 24(R2),X'08' IS THIS REALLY A TAG RECORD? @VA09783 00423750
- BNE MSG027E INVALID FILE TYPE @VA12943 00423860
- TM 20(R2),SKIP IS THERE A TAG RECORD HERE ?@V293598 00424000
- BO MSG027E INVALID FILE @VA12943 00425010
- LH R6,22(R2) TAG RECORD DATA LENGTH @V293598 00426000
- LR R1,R6 SAVE IT FOR LATER @V293598 00427000
- BCTR R1,0 -1 CHAR COUNT FOR CHAR OP @V293598 00428000
- BCTR R1,0 & -1 FOR INITIAL BLANK CHAR @V293598 00429000
- MVI 28(R2),C' ' BLANK THE FIRST CHARACTER @V293598 00430000
- LTR R1,R1 ANY MORE TO DO ?? @V293598 00431000
- BM TF02 NOPE - SKIP MOVE @V293598 00432000
- EX R1,TFCLEAR CLEAR THE ENTIRE TAG RECORD @V293598 00433000
- EJECT 00433325
- TF02 EQU * @VA05013 00433650
- CALL DMKSCNFD CALL SCN TO GET PAST BLANKS @VA05013 00433975
- BC 2,TF04 IF NO TAG, USE OLD BLANKED ONE @VA05013 00434300
- LR R3,R1 POINT R3 TO BEGINNING OF TAG @VA05013 00434625
- L R4,BUFCNT GET REMAINING TAG COUNT @VA05013 00434950
- ALR R4,R0 ADD IN LENGTH OF 1ST TOKEN @VA05013 00435275
- STM R3,R4,BUFNXT POINT BUFFER TO BEG. OF TAG @VA05013 00435600
- LTR R0,R4 DATA COUNT = 0 ? @VA04461 00436000
- BNP TF04 YES @VA04461 00437000
- CLR R0,R6 ALL FIT INTO THE RECORD ?? @V293598 00439000
- BH TF03 NOPE, TRUNCATE TO MAX RECORD@V293598 00440000
- LR R6,R0 OTHERWISE, USE ACTUAL COUNT @V293598 00441000
- TF03 LR R5,R3 SAVE DATA ADDRESS @VA04461 00442000
- TFSCANST CLI 0(R3),X'15' LOGICAL LINE END? @VA04461 00442200
- BE TFSCANE YES, ALL DONE @VA04461 00442400
- LA R3,1(,R3) NO, KEEP CHECKING @VA04461 00442600
- BCTR R4,R0 DECREMENT REAL DATA LENGTH @VA04461 00442800
- BCT R6,TFSCANST LOOP @VA04461 00443000
- TFSCANE STM R3,R4,BUFNXT RESTORE BUFFER POINTERS @VA04461 00443200
- SR R3,R5 LENGTH FOR MOVE IN R3 @VA04461 00443400
- BCTR R3,R0 MINUS ONE MORE @VA04461 00443600
- EX R3,TFMOVE EXECUTE DATA MOVE @VA04461 00443800
- SPACE 00444000
- TF04 L R0,SFBSTART DASD ADDR OF 1ST SPOOL BUFR @V293598 00445000
- L R1,SAVEWRK1 ADDR OF SYSTEM VIRTUAL PAGE @V293598 00446000
- CALL DMKRPAPT,PARM=SYSTEM WRITE NEW BUFFER TO DASD @V293598 00447000
- BNZ MSG424E PAGING ERROR ON WRITE - QUIT @VA09978 00447100
- SPACE 00448000
- TF05 L R1,SAVEWRK1 ADDR OF SYSTEM VIRTUAL PAGE @V293598 00449000
- CALL DMKPGTVR RETURN SYSTEM VIRTUAL PAGE @V293598 00450000
- B CSTEXIT AND GO BACK TO DMKCFM @V293598 00451000
- SPACE 3 00452000
- TFCLEAR MVC 29(0,R2),28(R2) EXECUTED ABOVE TO CLEAR TAG @V293598 00453000
- TFMOVE MVC 28(0,R2),0(R5) EXECUTED ABOVE TO RESET TAG @VA04461 00454000
- EJECT 00455000
- *. 00456000
- * OPERATION OF PROCESSOR FOR TAG QUERY DEV - 00457000
- * 00458000
- * 1. CALL GETYPE TO GET THE FIRST DEVICE TO BE PROCESSED. 00459000
- * 2. TEST FOR A VALID DEVICE REQUEST; EXIT WITH AN ERROR 00460000
- * MESSAGE IF A VIRTUAL UNIT RECORD OUTPUT DEVICE OR 00461000
- * A CONSOLE WAS NOT SPECIFIED. 00462000
- * 3. CALL DMKFREE TO RESERVE A 24 BYTE BLOCK OF FREE STORAGE 00463000
- * FOR USE AS A MESSAGE BUFFER, AND SAVE ITS ADDRESS IN 00464000
- * SAVEWRK4. 00465000
- * 4. CALL DMKSCNVD TO GET THE VIRTUAL DEVICE CUU, CONVERT IT 00466000
- * TO EBCDIC BY CALLING DMKCVTBH, GET THE DEVICE TYPE NAME 00467000
- * BY CALLING DMKSCNVU, AND BUILD THE FIRST DEVICE 00468000
- * RESPONSE LINE IN THE FREE STORAGE WORK AREA. 00469000
- * 5. CHECK FOR THE EXISTENCE OF A TAG FOR THE FILE; IF 00470000
- * NONE EXISTS, AMEND THE FIRST RESPONSE LINE TO REFLECT 00471000
- * THE FACT. 00472000
- * 6. STACK THE FIRST RESPONSE LINE FOR OUTPUT BY DMKCFM 00473000
- * BY CALLING THE STACK SUBROUTINE. 00474000
- * 7. IF A TAG EXISTS, STACK IT FOR OUTPUT BY CALLING STACK. 00475000
- * 8. IF THERE ARE MORE DEVICES TO BE PROCESSED, GO TO STEP 4. 00476000
- * 9. RETURN THE SYSTEM VIRTUAL STORAGE PAGE AND EXIT VIA EXIT1 00477000
- * TO RETURN THE FREE STORAGE BUFFER 00478000
- *. 00479000
- SPACE 3 00480000
- QD01 SR R6,R6 INDICATE POSSIBLE VADDR @V293598 00481000
- BAL R4,GETYPE GET DEVICE TYPE & 1ST DEVICE@V293598 00482000
- SPACE 00483000
- EX R5,CLIALL DOES TYPE = 'ALL' ?? @V293598 00484000
- BE MSG006E 'ALL' IS INVALID FOR TAG @V293598 00485000
- TM VDEVTYPC,CLASURO UNIT RECORD OUTPUT DEVICE ??@V293598 00486000
- BO QD02 YES - VALID TYPE @V293598 00487000
- TM VDEVTYPC,CLASTERM TERMINAL TYPE ?? @V293598 00488000
- BNO MSG006E INVALID TYPE IF NOT @V293598 00489000
- CLI VDEVTYPE,TYP3210 DOES TYPE = 'CONSOLE' ?? @V293598 00490000
- BNE MSG006E INVALID TYPE IF NOT @V293598 00491000
- SPACE 00492000
- QD02 LA R0,3 SET TO REQUEST 24 BYTES @V293598 00493000
- CALL DMKFREE GET A WORK AREA @V293598 00494000
- ST R1,SAVEWRK4 AND SAVE ITS ADDRESS @V293598 00495000
- SPACE 00496000
- QD03 L R2,SAVEWRK4 RESTORE WORK AREA ADDR @V293598 00497000
- CALL DMKSCNVD GET THE VIRTUAL DEVICE CUU @V293598 00498000
- BNZ QD04 DEV DISAPPEARED, TRY ANOTHER@V293598 00499000
- CALL DMKCVTBH CONVERT TO EBCDIC @V293598 00500000
- STCM R1,7,5(R2) STORE IT IN RESPONSE LINE @V293598 00501000
- EJECT 00502000
- CALL DMKSCNVN GET DEVICE TYPE NAME @V293598 00503000
- ST R1,0(R2) PUT THAT IN THE RESPONSE TOO@V293598 00504000
- MVI 4(R2),C' ' CLEAR THE OTHER CHAR @V293598 00505000
- SPACE 00506000
- L R6,VDEVEXTN SPOOL EXTENSION BLOCK ADDR @V293598 00507000
- LTR R6,R6 DOES ONE EXIST ?? @V293598 00508000
- BZ QD05 NO, RESPONSE = 'TAG NOT SET'@V293598 00509000
- SPACE 00510000
- USING VSPXBLOK,R6 DEFINE VSPXBLOK ADDRESSING @V293598 00511000
- SPACE 00512000
- CLI VSPXTGLN,X'00' A TAG IN THE EXTN BLOCK ?? @V293598 00513000
- BE QD05 NOPE - 'TAG NOT SET' @V293598 00514000
- SPACE 00515000
- MVC 8(5,R2),=C' TAG:' SET REMAINDER OF 1ST LINE @V293598 00516000
- LA R0,13 1ST RESPONSE LINE CHAR COUNT@V293598 00517000
- LR R1,R2 RESPONSE LINE ADDRESS @V293598 00518000
- BAL R3,STACK STACK IT FOR FUTURE OUTPUT @V293598 00519000
- SR R0,R0 CLEAR FOR INSERT @V293598 00520000
- IC R0,VSPXTGLN TAG LENGTH @V293598 00521000
- LA R1,VSPXTAG DEVICE TAG DATA ADDRESS @V293598 00522000
- BAL R3,STACK STACK THAT LINE NEXT @V293598 00523000
- SPACE 00524000
- DROP R6 @V293598 00525000
- SPACE 00526000
- QD04 LTR R5,R5 ANY MORE TO GO ?? @V293598 00527000
- BZ CSTEXIT NOPE - ALL DONE @V293598 00528000
- BAL R3,GETDEVIC GET THE NEXT DEVICE @V293598 00529000
- LTR R10,R10 ARE WE DONE ?? @V293598 00530000
- BNZ QD03 NOPE - PROCESS THIS DEVICE @V293598 00531000
- B CSTEXIT FREE 24 BYTE AREA AND RETURN@V293598 00532000
- SPACE 00533000
- QD05 MVC 8(12,R2),=C' TAG NOT SET' RESPOND WITH NO TAG @V293598 00534000
- LA R0,20 RESPONSE LINE CHAR COUNT @V293598 00535000
- LR R1,R2 RESPONSE LINE ADDRESS @V293598 00536000
- BAL R3,STACK STACK THE LINE FOR OUTPUT @V293598 00537000
- B QD04 AND LOOK FOR MORE TO DO @V293598 00538000
- EJECT 00539000
- *. 00540000
- * 00541000
- * OPERATION OF PROCESSOR FOR TAG QUERY FILE - 00542000
- * 00543000
- * 1. CALL GETFILE TO GET THE ADDRESS OF THE REQUESTED FILE'S 00544000
- * SPOOL FILE BLOCK; IF THE SPECIFIED ID IS INVALID, OR 00545000
- * IF A CORRESPONDING FILE OWNED BY THE CALLER IS NOT FOUND, 00546000
- * THE GETFILE OR GETSFB SUBROUTINE WILL EXIT WITH AN ERROR 00547000
- * MESSAGE. 00548000
- * 2. CALL DMKPGTVR TO RESERVE A PAGE OF SYSTEM VIRTUAL STORAGE 00549000
- * TO BE USED AS A BUFFER FOR THE SPOOL DATA BLOCK WHICH 00550000
- * CONTAINS THE TAG RECORD. 00551000
- * 3. READ THE FIRST SPOOL DATA BLOCK BY CALLING DMKRPAGT; IF 00552000
- * AN ERROR OCCURS, ISSUE AN ERROR MESSAGE AND EXIT. 00553000
- * 4. INSPECT TO SEE THAT THE FIRST SPOOL RECORD CONTAINS A 00554000
- * DATA FIELD; IF IT DOES NOT, STACK A 'TAG MISSING' RESPONSE 00555000
- * LINE AND GO TO STEP 7. 00556000
- * 5. COMPUTE THE LENGTH OF THE TAG RECORD DATA TRUNCATING 00557000
- * TRAILING BLANKS. 00558000
- * 6. IF SOME NONBLANK TAG RECORD DATA IS FOUND, STACK THE 00559000
- * TAG RECORD TEXT FOR OUTPUT USING THE COMPUTED LENGTH; 00560000
- * OTHERWISE, STACK A 'TAG BLANK' RESPONSE LINE. 00561000
- * 7. CALL DMKPGTVR TO RETURN THE SYSTEM VIRTUAL STORAGE PAGE, 00562000
- * AND EXIT. 00563000
- *. 00564000
- SPACE 3 00565000
- QF01 BAL R4,GETFILE LOCATE THE SPOOL FILE BLOCK @V293598 00566000
- SL R8,VMDVSTRT GET VDEVBLOK DISP @VM01086 00567000
- CALL DMKPGTVG RESERVE A SYS VIRTUAL PAGE @V293598 00568000
- ST R1,SAVEWRK1 AND SAVE ITS ADDRESS @V293598 00569000
- L R0,SFBSTART DASD @ OF 1ST SPOOL DATA BUF@V293598 00570000
- MVC SAVEWRK9(1),SFBFLAG SAVE FLAG @VA09978 00570100
- OI SFBFLAG,SFBINUSE MARK SPOOL FILE BLOCK IN USE @VA09978 00570200
- CALL DMKRPAGT,PARM=(BRING+SYSTEM) READ IT IN @V293598 00571000
- BNZ MSG424E PAGING ERROR - QUIT @V305435 00572000
- MVC SFBFLAG,SAVEWRK9 RESTORE FLAG IF IT WAS ORIG.ON @VA09978 00572100
- AL R8,VMDVSTRT GET VDEVBLOK ADDR @VM01086 00573000
- CLI 16(R2),X'03' IS THERE A TAG RECORD? @VA08508 00573300
- BNE QF07 NONE--TAG MISSING @VA08508 00573600
- CLI 24(R2),X'08' IS THIS REALLY A TAG RECORD? @VA09783 00573750
- BNE QF07 NONE--TAG MISSING. @VA09783 00573850
- TM 20(R2),SKIP IS THERE A TAG RECORD HERE ?@V293598 00574000
- BO QF07 NOPE - TAG MISSING @V293598 00575000
- QF02 LA R1,28(R2) ADDR OF START OF TAG DATA @V293598 00576000
- LR R6,R1 SAVE IT FOR LATER @V293598 00577000
- AH R6,22(R2) ADDR OF END OF TAG DATA @V293598 00578000
- BCTR R6,0 ADDR OF LAST TAG DATA CHAR @V293598 00579000
- QF03 CLI 0(R6),C' ' IS THIS CHARACTER BLANK ?? @V293598 00580000
- BNE QF04 NO - THIS IS REALLY THE END @V293598 00581000
- CLR R6,R1 ANY MORE CHARACTERS LEFT ?? @V293598 00582000
- BNH QF06 NOPE - TAG BLANK @V293598 00583000
- BCT R6,QF03 MORE TO GO - KEEP LOOKING @V293598 00584000
- SPACE 00585000
- QF04 SLR R6,R1 NONBLANK TAG DATA COUNT -1 @V293598 00586000
- LA R0,1(R6) TOTAL NONBLANK TAG DATA CNT @V293598 00587000
- BAL R3,STACK STACK IT FOR LATER OUTPUT @V293598 00588000
- EJECT 00589000
- QF05 L R1,SAVEWRK1 RESTORE SYS VIRT PAGE ADDR @V293598 00590000
- CALL DMKPGTVR RELEASE THE SYS VIRT PAGE @V293598 00591000
- B CSTEXIT AND RETURN @V293598 00592000
- SPACE 00593000
- QF06 LA R1,=C'(TAG BLANK)' SET RESPONSE LINE ADDRESS @V293598 00594000
- LA R0,11 AND COUNT @V293598 00595000
- BAL R3,STACK AND STACK IT FOR OUTPUT @V293598 00596000
- B QF05 RELEASE PAGE AND RETURN @V293598 00597000
- SPACE 00598000
- QF07 LA R1,=C'(TAG MISSING)' SET RESPONSE LINE ADDRESS @V293598 00599000
- LA R0,13 AND COUNT @V293598 00600000
- BAL R3,STACK AND STACK IT FOR OUTPUT @V293598 00601000
- B QF05 RELEASE PAGE AND RETURN @V293598 00602000
- EJECT 00603000
- *. 00604000
- **************************************** 00605000
- * 00606000
- * SUBROUTINES 00607000
- * 00608000
- **************************************** 00609000
- * 00610000
- * 00611000
- * 00612000
- * OPERATION OF GETYPE - 00613000
- * 00614000
- * 1. CALL DMKSCNFD TO LOCATE DEVICE TYPE FIELD 00615000
- * 2. IF OPTION = 'READER', 'PRINT', 'PUNCH' OR 'ALL', SET 00616000
- * GPR5 = APPROPRIATE DEVICE TYPE. IF OPTION = 'ALL', SET 00617000
- * GPR5 EQUAL TO CSTRDR+TYPPRT+TYPPUN; THEN, GO TO STEP 4 00618000
- * IF MISSING OR INVALID AND COMMAND IS SPOOL OR CLOSE, 00619000
- * EXIT GIVING MSG022E. 00620000
- * 3. IF OPTION = VADDR, CALL DMKSCNVU TO LOCATE THE VDEVBLOK, 00621000
- * SET GPR5 AND GPR10 = 0, AND EXIT 00622000
- * 4. IF TYPE WAS NOT VADDR, LOAD GPR8 WITH VMDVSTRT-VDEVSIZE, 00623000
- * AND GPR10 WITH VMDVCNT, AND CALL GETDEVIC TO LOCATE THE 00624000
- * FIRST DEVICE OF THE CORRECT TYPE 00625000
- * 5. EXIT 00626000
- *. 00627000
- SPACE 3 00628000
- GETYPE EQU * @V293598 00629000
- SPACE 00630000
- GT01 LA R5,CSTRDR+TYPPRT+TYPPUN SET FOR ALL TYPE @V293598 00631000
- CALL DMKSCNFD LOCATE DEVICE TYPE FIELD @V293598 00632000
- STM R0,R1,SAVEWRK6 SAVE COUNT AND ADDR OF TYPE @V293598 00633000
- BZ GT02 -- @V293598 00634000
- LTR R6,R6 VIRTUAL ADDRESS POSSIBLE ?? @V293598 00635000
- BZ MSG022E YES -- VADDR MISSING @V293598 00636000
- B DEVIC NO OPTION DEFAULT TO ALL @V293598 00637000
- SPACE 00638000
- GT02 EQU * @V293598 00639000
- * GPR1 ADDRESS OF TYPE 00640000
- LR R14,R0 GET OPTION COUNT @V293598 00641000
- BCTR R14,0 -1 @V293598 00642000
- C R0,F2 COUNT LENGTH OF 2 @V293598 00643000
- BE GT02A VALID FOR PUNCH @V293598 00644000
- BL GT02B VALID FOR READER PRINTER @V293598 00645000
- EX R14,CLCALL ALL ?? @V293598 00646000
- BE DEVIC YES @V293598 00647000
- LA R5,CSTCON SET R5 TO CONSOLE TYPE @V293598 00648000
- EX R14,CLCCONS CONSOLE ?? @V293598 00649000
- BE DEVIC YES -- @V293598 00650000
- LA R5,CSTRDR SET R5 TO READER TYPE @V293598 00651000
- EX R14,CLCRDR RDR ?? @V293598 00652000
- BE DEVIC YES @V293598 00653000
- LA R5,TYPPRT PRINTER MASK @V293598 00654000
- EX R14,CLCPRT PRT ?? @V293598 00655000
- BE DEVIC YES - @V293598 00656000
- SPACE 00657000
- LA R5,TYPPUN SET GPR5 TO PUNCH TYPE @V293598 00658000
- EX R14,CLCPCH PCH ?? @V293598 00659000
- BE DEVIC YES @V293598 00660000
- GT02A LA R5,TYPPUN PUNCH MASK @V293598 00661000
- EX R14,CLCPUN PUNCH ?? @V293598 00662000
- BE DEVIC YES - @V293598 00663000
- SPACE 00664000
- GT02B LA R5,TYPPRT SET GPR5 TO PRINTER TYPE @V293598 00665000
- EX R14,CLCPRINT PRINTER ?? @V293598 00666000
- BE DEVIC YES - @V293598 00667000
- SPACE 00668000
- LA R5,CSTRDR TYPE MASK FOR READER @V293598 00669000
- EX R14,CLCREAD READER ?? @V293598 00670000
- BE DEVIC @V293598 00671000
- LTR R6,R6 POSSIBLE VADDR ?? @V293598 00672000
- BZ GT03 YES -- @V293598 00673000
- B MSG006E NO -- ERROR DMKCST006E @V293598 00674000
- SPACE 00675000
- GT03 EQU * MUST BE VADDR @V293598 00676000
- SPACE 00677000
- STM R0,R1,SAVEWRK6 SAVE COUNT AND DEVICE ADDR @V293598 00678000
- C R0,F3 COUNT OF 3 OR LESS ?? @V293598 00679000
- BH MSG022E VADDR INVALID @V293598 00680000
- CALL DMKCVTHB CONVERT TO BINARY @V293598 00681000
- BNZ MSG022E INVALID VADDRESS @V293598 00682000
- CALL DMKSCNVU LOCATE VDEVBLOK @V293598 00683000
- BNZ MSG040E NONEXISTENT UNIT @V293598 00684000
- TM VDEVTYPC,CLASURO+CLASTERM OUTPUT OR CON CLASS ? @V293598 00685000
- BZ GT03A NO - CHECK INPUT TYPE @V293598 00686000
- TM VDEVTYPE,TYPPRT+TYPPUN PRINTER OR PUNCH ?? @V293598 00687000
- BNZ GT03B YES -- @V293598 00688000
- CLI VDEVTYPE,TYP3210 CONSOLE TYPE ? @V293598 00689000
- BE GT03B YES -- @V293598 00690000
- B MSG006E INVALID DEVICE TYPE @V293598 00691000
- GT03A TM VDEVTYPC,CLASURI INPUT DEVICE TYPE ?? @V293598 00692000
- BZ MSG006E NO -- @V293598 00693000
- TM VDEVTYPE,TYPRDR READER ?? @V293598 00694000
- BZ MSG006E NO -- INVALID DEVICE TYPE @V293598 00695000
- GT03B EQU * @V293598 00696000
- TM VDEVSTAT,VDEVDED DEDICATED TO REAL DEVICE ?? @V293598 00697000
- BO MSG006E YES -- INVALID DEVICE TYPE @V293598 00698000
- SR R5,R5 SET GPR5 TO ZERO @V293598 00699000
- SR R10,10 SET GPR10 TO ZERO @V293598 00700000
- B GT06 RETURN TO CALLER @V293598 00701000
- SPACE 2 00702000
- DEVIC EQU * HERE TO SET UP FOR GETDEVIC @V293598 00703000
- * C R6,FFS NEED VDEVBLOK ADDRESS ?? 00704000
- * BE GT05 NO, MUST BE HOLD OR FREE CMD 00705000
- GT04 L R8,VMDVSTRT POINTER TO VDEVBLOK TABLE @V293598 00706000
- S R8,=A(VDEVSIZE*8) SUBSTRACT BLOK SIZE @V293598 00707000
- LH R10,VMDVCNT VDEVICE COUNT @V293598 00708000
- LTR R10,R10 ANY DEVICES FOR THIS USER ??@V293598 00709000
- BP GT04A YES -- @V293598 00710000
- MSG040 LA R2,40 NO -- DOES NOT EXIST @V293598 00711000
- B EXIT8 ERROR MSG DMKCST040E @V293598 00712000
- GT04A EQU * @V293598 00713000
- A R10,F1 INCREASE DEVICE COUNT BY ONE@V293598 00714000
- BAL R3,GETDEVIC GET NEXT DEVICE @V293598 00715000
- LTR R10,R10 ANY MORE VDEVBLOKS ?? @V293598 00716000
- BZ MSG040 NO -- ERROR DMKCST040E @V293598 00717000
- B GT06 SET ZERO COND @V293598 00718000
- SPACE 00719000
- *GT05 L R6,FFS SET 1ST TIME SWITCH FOR GETCHAIN 00720000
- * BAL R3,GETCHAIN GET NEXT FILE CHAIN 00721000
- SPACE 00722000
- GT06 CR R2,R2 SET CC = ZERO @V293598 00723000
- BR R4 RETURN TO CALLER @V293598 00724000
- SPACE 3 00725000
- *. 00726000
- * OPERATION OF GETFILE - 00727000
- * 00728000
- * 1. CALL DMKSCNFD TO LOCATE THE SPOOL ID OPTION IN THE INPUT 00729000
- * COMMAND LINE; ISSUE MSG027E AND EXIT IF IT IS MISSING. 00730000
- * 2. SAVE THE OPTION SCAN REGISTER CONTENTS IN SAVEWRK6 AND 00731000
- * SAVEWRK7. 00732000
- * 3. CALL DMKCVTDB TO CONVERT THE EBCDIC DECIMAL SPOOL ID TO 00733000
- * BINARY; IF THE SPOOL ID IS INVALID, ISSUE MSG027E AND 00734000
- * EXIT. 00735000
- * 4. GO DIRECTLY DO GETSFB TO SCAN THE READER FILE QUEUE FOR 00736000
- * A FILE WITH A MATCHING SPOOL ID. 00737000
- *. 00738000
- SPACE 3 00739000
- GETFILE EQU * HERE TO DETERMINE SPECIFIED SPOOL ID NUMBER @V293598 00740000
- CALL DMKSCNFD GET THE SPOOL ID @V293598 00741000
- BNZ MSG027E NO GOOD IF IT IS NOT THERE @V293598 00742000
- STM R0,R1,SAVEWRK6 SAVE THE INPUT BUFFER REGS @V293598 00743000
- CALL DMKCVTDB CONVERT THE ID TO BINARY @V293598 00744000
- BZ GETSFB GO FIND THE SFB IF ID GOOD @V293598 00745000
- B MSG027E OTHERWISE, ISSUE ERROR MSG @V293598 00746000
- EJECT 00747000
- *. 00748000
- * OPERATION OF GETDEVIC - 00749000
- * 00750000
- * 1. UPON ENTRY, THE FOLLOWING REGISTERS MUST BE LOADED - 00751000
- * GPR5 = THE DEVICE TYPE TO SEARCH FOR 00752000
- * GPR8 = ADDRESS OF VDEVBLOK AT WHICH TO START SEARCH 00753000
- * GPR10 = NUMBER OF VDEVBLOKS TO SEARCH 00754000
- * 2. ADD VDEVSIZE TO GPR8 AND DECREMENT GPR10; IF GPR10 = 0,EXIT 00755000
- * 3. TEST FOR DEVICE CLASS OF UNIT RECORD; IF NOT U/R, GO TO 2 00756000
- * 4. EXECUTE TM USING MASK IN GPR5 AGAINST VDEVTYPE; BRANCH 00757000
- * ON ONES BACK TO CALLER; OTHERWISE, GO TO STEP 2 00758000
- * 5. NOTE THAT GETDEVIC IS A 2ND LEVEL ROUTINE; LINKAGE IS VIA 00759000
- * GPR3 00760000
- *. 00761000
- SPACE 3 00762000
- GETDEVIC EQU * HERE TO LOCATE NEXT DEVICE FOR THIS TYPE @V293598 00763000
- SPACE 00764000
- GD01 EQU * @V293598 00765000
- * GPR5 = DEVICE TYPE TO SEARCH FOR 00766000
- * GPR8 = ADDRESS OF VDEVBLOK TO START SEARCH 00767000
- * GPR10 = NUMBER OF VDEVBLOKS TO SEARCH 00768000
- SPACE 00769000
- GD02 A R8,=A(VDEVSIZE*8) POINT TO NEXT DEVBLOK @V293598 00770000
- BCT R10,GD03 DECREMENT COUNT @V293598 00771000
- BR R3 COUNT IS ZERO, RETURN @V293598 00772000
- SPACE 00773000
- GD03 CLC VDEVADD,FFS ACTIVE DEVICE @V293598 00774000
- BE GD02 NO -- @V293598 00775000
- TM VDEVSTAT,VDEVDED DEDICATED TO REAL DEVICE ?? @V293598 00776000
- BO GD02 YES -- TRY NEXT @V293598 00777000
- TM VDEVTYPC,CLASURI INPUT UNIT RECORD ?? @V293598 00778000
- BZ GD04 NO - CHECK OUTPUT @V293598 00779000
- EX R5,TMRDR VALID READER ?? @V293598 00780000
- BCR 7,R3 YES - @V293598 00781000
- B GD02 NO - TRY NEXT BLOK @V293598 00782000
- SPACE 00783000
- GD04 EQU * @V293598 00784000
- CLI VDEVTYPC,CLASURO OUTPUT CLASS ?? @V293598 00785000
- BNE GD05 NO -- @V293598 00786000
- TM VDEVTYPE,TYPPUN+TYPPRT TYPE PUNCH OR PRINTER @V293598 00787000
- BZ GD02 NO - @V293598 00788000
- EX R5,TMTYPE MATCH SEARCH DEV PUN OR PRT @V293598 00789000
- BZ GD02 NO @V293598 00790000
- BR R3 YES - @V293598 00791000
- SPACE 00792000
- GD05 CLI VDEVTYPC,CLASTERM CONSOLE CLASS ? @V293598 00793000
- BNE GD02 NO -- GET NEXT DEVICE @V293598 00794000
- CLI VDEVTYPE,TYP3210 CONSOLE TYPE ? @V293598 00795000
- BNE GD02 NO -- GET NEXT DEVICE @V293598 00796000
- EX R5,TMCON CONSOLE TYPE REQUESTED ? @V293598 00797000
- BZ GD02 NO -- GET NEXT DEVICE @V293598 00798000
- BR R3 RETURN TO CALLER @V293598 00799000
- EJECT 00800000
- EJECT 00801000
- *. 00802000
- * OPERATION OF GETSFB - 00803000
- * 00804000
- * 1. LOAD THE ADDRESS OF THE FIRST FILE IN THE SPOOL READER 00805000
- * FILE CHAIN. 00806000
- * 2. INSPECT TO SEE IF THERE IS A FILE HERE; IF NOT, ISSUE 00807000
- * MSG042E AND EXIT. 00808000
- * 3. INSPECT THE FILE TO SEE IF ITS ID MATCHES THE ID PASSED 00809000
- * TO GETSFB IN GPR1; IF SO, GO TO STEP 5. 00810000
- * 4. LOAD THE ADDRESS OF THE NEXT FILE IN THE SPOOL READER 00811000
- * FILE CHAIN, AND GO TO STEP 1. 00812000
- * 5. INSPECT THE FILE TO SEE IF ITS OWNER ID MATCHES THE 00813000
- * CALLER'S USER ID; IF NOT, GO TO STEP 4. 00814000
- * 6. RETURN TO THE CALLER. 00815000
- *. 00816000
- SPACE 3 00817000
- GETSFB EQU * HERE TO LOCATE A PARTICULAR SPOOL FILE @V293598 00818000
- L R7,ARSPRD START OF READER FILE CHAIN @V293598 00819000
- GS01 LTR R7,R7 IS THERE A FILE HERE ?? @V293598 00820000
- BZ MSG042E NO - NO MATCHING FILE FOUND @V293598 00821000
- CH R1,SFBFILID IS THIS THE ONE ?? @V293598 00822000
- BE GS03 PERHAPS - CHECK THE OWNER ID@V293598 00823000
- GS02 L R7,SFBPNT ADDR OF NEXT SFB IN CHAIN @V293598 00824000
- B GS01 GO INSPECT THIS ONE @V293598 00825000
- SPACE 00826000
- GS03 CLC SFBUSER(8),VMUSER DOES THE CALLER OWN THE FILE@V293598 00827000
- BCR 8,R4 YES - GO BACK TO PROCESS IT @V293598 00828000
- B GS02 OTHERWISE LOOK SOME MORE @V293598 00829000
- EJECT 00830000
- *. 00831000
- * OPERATION OF STACK - 00832000
- * 00833000
- * 1. COMPUTE THE AMOUNT OF STORAGE NEEDED TO HOLD THE MESSAGE 00834000
- * TO BE STACKED, AND CALL DMKFREE TO RESERVE THAT AMOUNT 00835000
- * FROM FREE STORAGE. 00836000
- * 2. BUILD THE MESSAGE ELEMENT BY STORING THE ELEMENT SIZE, 00837000
- * MESSAGE CHARACTER COUNT, AND MESSAGE TEXT IN THE RESERVED 00838000
- * FREE STORAGE. 00839000
- * 3. STARTING AT THE ANCHOR IN THE VMBLOK, SCAN THE CONSOLE 00840000
- * OUTPUT STACK TO FIND THE END; ENQUEUE THE NEW ELEMENT 00841000
- * AT THE END OF THE STACK, AND RETURN. 00842000
- * 00843000
- * (THE STACKED LINES WILL BE PRINTED BY DMKCFM ON RETURN 00844000
- * TO THAT ROUTINE FOLLOWING THE COMPLETION OF COMMAND 00845000
- * PROCESSING.) 00846000
- *. 00847000
- SPACE 3 00848000
- STACK EQU * HERE TO STACK CONSOLE OUTPUT LINES @V293598 00849000
- LR R4,R0 GET SIZE OF DATA @V293598 00850000
- LR R2,R1 SET DATA ADDRESS @V293598 00851000
- LA R0,7(R4) ROUND UP TO DOUBLE WORD @V293598 00852000
- SRL R0,3 GET SIZE IN DOUBLE WORDS @V293598 00853000
- A R0,F1 ONE MORE FOR CHAINING @V293598 00854000
- CALL DMKFREE GET BUFFER @V293598 00855000
- STH R4,4(R1) SAVE LINE SIZE @V293598 00856000
- STH R0,6(R1) SAVE BUFFER SIZE @V293598 00857000
- BCTR R4,0 DECREMENT FOR CHAR OP @V293598 00858000
- EX R4,STMOVE MOVE DATA TO STACK @V293598 00859000
- SR R0,R0 ZERO @V293598 00860000
- ST R0,0(R1) CLEAR POINTER @V293598 00861000
- LA R2,VMSTKO GET OUTPUT STACK POINTER @V293598 00862000
- STLOOP L R4,0(R2) GET POINTER TO STACK BUFFER @V293598 00863000
- LTR R4,R4 TEST FOR END OF CHAIN @V293598 00864000
- BZ STCHAIN FOUND END, CHAIN THIS BUFFER@V293598 00865000
- LR R2,R4 POINT TO THIS BUFFER @V293598 00866000
- B STLOOP LOOP TO FIND THE END @V293598 00867000
- SPACE 00868000
- STCHAIN ST R1,0(R2) CHAIN AT END @V293598 00869000
- BR R3 RETURN @V293598 00870000
- * 00871000
- STMOVE MVC 8(0,R1),0(R2) EX FOR STACK BUFFER MOVE @V293598 00872000
- EJECT 00873000
- **************************************** 00874000
- * 00875000
- * ERROR EXITS FROM DMKCST 00876000
- * 00877000
- **************************************** 00878000
- SPACE 2 00879000
- MSG003E EQU * HERE IF INVALID OPTION FOR THIS COMMAND @V293598 00880000
- LA R2,003 ERROR MSG DMKCST003E @V293598 00881000
- B EXIT8 EXIT TO ERROR MODULE @V293598 00882000
- SPACE 2 00883000
- MSG006E EQU * HERE IF DEVICE TYPE IS INVALID @V293598 00884000
- LA R2,006 ERROR MSG DMKCST006E @V293598 00885000
- LM R0,R1,SAVEWRK6 COUNT & ADDR OF INVALID TYPE@V293598 00886000
- B EXIT8 EXIT TO ERROR MODULE @V293598 00887000
- SPACE 2 00888000
- MSG022E EQU * HERE IF VIRTUAL ADDRESS MISSING OR @V293598 00889000
- * 00890000
- LA R2,022 ERROR MSG DMKCST022E @V293598 00891000
- B EXIT8R1 .. @V293598 00892000
- SPACE 2 00893000
- MSG026E EQU * HERE IF OPERAND MISSING OR INVALID @V293598 00894000
- LA R2,026 ERROR MSG DMKCST026E @V293598 00895000
- B EXIT8R1 .. @V293598 00896000
- SPACE 2 00897000
- MSG027E EQU * HERE IF SPOOL ID MISSING OR INVALID @V293598 00898000
- LA R2,027 ERROR MSG DMKCST027E @V293598 00899000
- B EXIT8R1 .. @V293598 00900000
- SPACE 2 00901000
- MSG040E EQU * HERE IF DEVICE DOES NOT EXIST @V293598 00902000
- LA R2,040 ERROR MSG DMKCST040E @V293598 00903000
- LM R0,R1,SAVEWRK6 COUNT AND ADDRESS OF OPTION @V293598 00904000
- B EXIT8 @V293598 00905000
- SPACE 2 00906000
- MSG042E EQU * HERE IF SPOOL FILE DOES NOT EXIST @V293598 00907000
- LA R2,042 ERROR MSG DMKCST042E @V293598 00908000
- LM R0,R1,SAVEWRK6 COUNT & ADDRESS OF SPOOL ID @V293598 00909000
- B EXIT8 @V293598 00910000
- SPACE 2 00911000
- MSG424E EQU * HERE ON PAGING ERROR @V305435 00912000
- MVC SFBFLAG,SAVEWRK9 RESTORE FLAG IF IT WAS ORIG.ON @VA09978 00912100
- L R1,SAVEWRK1 ADDR OF SYS VIRT PAGE @VM01086 00913000
- CALL DMKPGTVR RETURN THE PAGE @VM01086 00914000
- LA R2,424 MESSAGE NUMBER @V305435 00915000
- B EXIT8R1 RETURN @V305435 00916000
- EJECT 00917000
- **************************************** 00918000
- * 00919000
- * FINAL EXIT BACK TO DMKCFM 00920000
- * 00921000
- **************************************** 00922000
- SPACE 3 00923000
- CSTEXIT EQU * HERE FOR NORMAL EXIT FROM DMKCST @V293598 00924000
- SR R2,R2 CLEAR ERROR REGISTER @V293598 00925000
- B EXIT1 NOW EXIT @V293598 00926000
- SPACE 2 00927000
- EXIT8R1 SR R1,R1 @V293598 00928000
- SR R0,R0 @V293598 00929000
- EXIT8 ICM R0,14,ID+3 MOVE IN MODULE ID @V293598 00930000
- EXIT1 STM R0,R2,SAVEWRK5 SAVE CALL GPRS @V293598 00931000
- L R1,SAVEWRK4 ADDRESS OF 24 BYTE AREA @V293598 00932000
- LTR R1,R1 ADDRESS PRESENT ?? @V293598 00933000
- BZ EXIT2 NO --- @V293598 00934000
- LA R0,3 LENGTH OF AREA @V293598 00935000
- CALL DMKFRET RETURN AREA TO FREE STORAGE @V293598 00936000
- EXIT2 LM R0,R2,SAVEWRK5 RESTORE GPRS @V293598 00937000
- LTR R2,R2 ERROR CODE PRESENT ?? @V293598 00938000
- BNZ ERREXIT YES -- @V293598 00939000
- EXIT3 EXIT EXIT NO CALL TO ERMSG @V293598 00940000
- SPACE 00941000
- ERREXIT CALL DMKERMSG EXIT TO MESSAGE MODULE @V293598 00942000
- SPACE 00943000
- * MODULE DMKERMSG WILL GIVE SVC16 AND RETURN CONTROL TO DMKCFM 00944000
- EJECT 00945000
- **************************************** 00946000
- * 00947000
- * EXECUTED INSTRUCTIONS 00948000
- * 00949000
- **************************************** 00950000
- SPACE 3 00951000
- CLCALL CLC 0(0,R1),=C'ALL ' COMPARE FOR ALL @V293598 00952000
- CLCRDR CLC 0(0,R1),=C'RDR ' COMPARE FOR RDR @V293598 00953000
- CLCPCH CLC 0(0,R1),=C'PCH ' COMPARE FOR PCH @V293598 00954000
- CLCPRT CLC 0(0,R1),=C'PRT ' COMPARE FOR PRT @V293598 00955000
- CLCPRINT CLC 0(0,R1),=C'PRINTER ' COMPARE FOR PRINTER @V293598 00956000
- CLCPUN CLC 0(0,R1),=C'PUNCH ' COMPARE FOR PUNCH @V293598 00957000
- CLCREAD CLC 0(0,R1),=C'READER ' COMPARE FOR READER @V293598 00958000
- CLCCONS CLC 0(0,R1),=C'CONSOLE ' COMPARE FOR CONSOLE @V293598 00959000
- CLCDEV CLC 0(0,R1),=C'DEV ' COMPARE FOR DEV @V293598 00960000
- CLCFILE CLC 0(0,R1),=C'FILE ' COMPARE FOR FILE @V293598 00961000
- CLCQUERY CLC 0(0,R1),=C'QUERY ' COMPARE FOR QUERY @V293598 00962000
- * 00963000
- CLIALL CLI =AL1(CSTRDR+TYPPRT+TYPPUN),X'00' MASK = RDR PRT @V293598 00964000
- * PUNCH 00965000
- TMRDR TM =AL1(CSTRDR),X'00' MASK = READER @V293598 00966000
- TMPRT TM =AL1(TYPPRT),X'00' MASK = PRINTER @V293598 00967000
- TMPUN TM =AL1(TYPPUN),X'00' MASK = PUNCH @V293598 00968000
- TMTYPE TM VDEVTYPE,X'00' TEST VDEV TYPE @V293598 00969000
- TMCON TM =AL1(CSTCON),X'00' MASK = CONSOLE @V293598 00970000
- EJECT 00971000
- **************************************** 00972000
- * 00973000
- * MESSAGES AND CONSTANTS 00974000
- * 00975000
- **************************************** 00976000
- SPACE 2 00977000
- EJECT 00978000
- CSTRDR EQU X'20' @V293598 00979000
- CSTCON EQU X'10' @V293598 00980000
- PSA , @V306638 00981000
- COPY CONBUF @V306638 00982000
- COPY DEVTYPES @V306638 00983000
- COPY EQU @V306638 00984000
- COPY RBLOKS @V306638 00985000
- COPY SAVE @V306638 00986000
- COPY SPOOL @V306638 00987000
- COPY UDIRECT @V306638 00988000
- COPY VBLOKS @V306638 00989000
- COPY VMBLOK @V306638 00990000
- END 00991000
ibm/vm370-lib/cp/dmkcst.assemble_src.txt ยท Last modified: 2023/08/06 13:36 by Site Administrator