ibm:vm370-lib:cp:dmkcpb.assemble_src
Table of Contents
DMKCPB Source
References
- Fixes Applied : 4
- This Source Date : Saturday, December 9, 1978
- Last Fix ID : [R09019DK]
Source Listing
- DMKCPB.ASSEMBLE.txt
- CPB TITLE 'DMKCPB (CP) VM/370 - RELEASE 6' 00001000
- ISEQ 73,80 VALIDATE SEQUENCING OF INPUT 00002000
- *. 00003000
- * 00004000
- * MODULE NAME - 00005000
- * 00006000
- * DMKCPB 00007000
- * 00008000
- * FUNCTION - 00009000
- * 00010000
- * TO SIMULATE THE REAL MACHINES PUSH BUTTONS. 00011000
- * 00012000
- * ATTRIBUTES - 00013000
- * 00014000
- * REENTRANT, PAGEABLE, CALLED VIA SVC 00015000
- * 00016000
- * ENTRY POINTS - 00017000
- * DMKCPBSR - TO PROCESS THE 'SYSTEM' COMMAND. 00018000
- * DMKCPBEX - TO PROCESS THE 'EXTERNAL' COMMAND. 00019000
- * DMKCPBRY - TO PROCESS THE 'READY' COMMAND. 00020000
- * DMKCPBNR - TO PROCESS THE 'NOTREADY' COMMAND. 00021000
- * DMKCPBRS - TO PROCESS THE 'RESET' COMMAND. 00022000
- * DMKCPBRW - TO PROCESS THE 'REWIND' COMMAND. 00023000
- * 00024000
- * ENTRY CONDITIONS - 00025000
- * 00026000
- * GPR9 - ADDRESS OF COMMAND LINE BUFFER 00027000
- * GPR11 - ADDRESS OF VMBLOK 00028000
- * GPR12 - ADDRESS OF ENTRY POINT 00029000
- * GPR13 - ADDRESS OF SAVEAREA 00030000
- * 00031000
- * 00032000
- * EXIT CONDITIONS - 00033000
- * 00034000
- * NORMAL - 00035000
- * GPR2 = 0 00036000
- * 00037000
- * ERROR - 00038000
- * GPR2 = ERROR MESSAGE CODE NUMBER 00039000
- * 00040000
- * 00041000
- * CALLS TO OTHER ROUTINES - 00042000
- * 00043000
- * DMKSCNFD - TO LOCATE NEXT ARGUMENT IN THE COMMAND LINE 00044000
- * DMKCVTHB - CONVERT HEXADECIMAL ADDRESSES TO BINARY 00045000
- * DMKSCNVU - TO LOCATE ADDRESSES OF THE VIRTUAL DEVICE BLOKS 00046000
- * DMKQCNWT - TO OUTPUT MESSAGES TO THE TERMINAL 00047000
- * DMKVATBC - TO RELEASE SHADOW TABLES FOR V370R 00048000
- * DMKFREE - TO OBTAIN STORAGE FROM FREE STORAGE 00049000
- * DMKFRET - TO RETURN STORAGE TO FREE STORAGE 00050000
- * DMKIOSQR - TO PERFORM REAL I/O OPERATIONS 00051000
- * DMKPGSPO - TO CLEAR VIRTUAL STORAGE TO BINARY ZEROS 00052000
- * DMKERMSG - TO SEND ERROR MESSAGES TO THE TERMINAL. 00053000
- * DMKCFPRR - TO HANDLE SYSTEM RESET FUNCTION 00054000
- * DMKPTRAN - TO BRING A PAGE IN CORE 00055000
- * DMKVATMD - TO ENTER TRANSLATE MODE 00056000
- * DMKCVTBH - CONVERT BINARY DATA TO HEXADECMAL 00057000
- * DMKCFPRD - TO RESET A VIRTUAL DEVICE 00058000
- * 00059000
- * 00060000
- * EXTERNAL REFERENCES - 00061000
- * 00062000
- * DMKSYSVM - LOCATION OF THE SYSTEM VMBLOK 00063000
- * 00064000
- * 00065000
- * TABLES/WORKAREAS - 00066000
- * 00067000
- * RDEVBLOK, IOBLOK, VMBLOK, VDEVBLOK, VCUBLOK, VCHBLOK 00068000
- * 00069000
- * 00070000
- * REGISTER USAGE - 00071000
- * 00072000
- * GPR0 - ARGUMENT LENGTH (PASSED BACK FROM DMKSCNFD) 00073000
- * GPR1 - ARGUMENT ADDRESS (PASSED BACK FROM DMKSCNFD) 00074000
- * GPR2 -PASS PARAMETERS TO CALLED ROUTINES 00075000
- * GPR3 - WORK REG 00076000
- * GPR4 - WORK REG 00077000
- * GPR5 - WORK REG 00078000
- * GPR6 - VCHBLOK ADDRESS 00079000
- * GPR7 - VCUBLOK ADDRESS 00080000
- * GPR8 - VDEVBLOK ADDRESS 00081000
- * GPR9 - RDEVBLOK ADDRESS 00082000
- * GPR10 - IOBLOK ADDRESS 00083000
- * GPR11 - VMBLOK ADDRESS 00084000
- * GPR12 - BASE REG 00085000
- * GPR13 - SAVEAREA ADDRESS 00086000
- * GPR14 - LINKAGE REG 00087000
- * GPR15 - LINKAGE REG 00088000
- * 00089000
- * 00090000
- * 00091000
- *** NOTE 00092000
- * 00093000
- *** THIS MODULE CONTAINS DEACTIVATED CODE NOT SUPPORTED IN 00094000
- *** RELEASE 1.0 OF VM/370. 00095000
- * 00096000
- ***NOTE 00097000
- * 00098000
- * 00099000
- * OPERATION - 00100000
- * 00101000
- * THE VARIOUS SUBROUTINES IN THIS MODULE ARE CALLED BY DMKCFM. 00102000
- * THE FORMAT AND DESCRIPTION OF EACH COMMAND IS LISTED 00103000
- * IN SEPARATE PROLOGUES BELOW. 00104000
- * 00105000
- * 00106000
- *. 00107000
- EJECT 00108000
- COPY OPTIONS 00109000
- COPY LOCAL 00110000
- SPACE 2 00111000
- DMKCPB START 00112000
- SPACE 00113000
- MODID DC CL8'DMKCPB' 00114000
- SPACE 00115000
- USING PSA,R0 00116000
- USING VMBLOK,R11 00117000
- USING SAVEAREA,R13 00118000
- SPACE 00119000
- EXTRN DMKERMSG 00120000
- EXTRN DMKCFPRR,DMKCFPRD 00121000
- EXTRN DMKCVTBH 00122000
- EXTRN DMKCVTHB 00123000
- EXTRN DMKSSSMQ,DMKSTKCP,DMKDSPCH @V60B6B8 00123500
- EXTRN DMKVIOMK 00124000
- EXTRN DMKPGSPO 00125000
- EXTRN DMKIOSQR 00126000
- EXTRN DMKSCNFD 00127000
- EXTRN DMKSCNVU 00128000
- EXTRN DMKIOSRW 00129000
- EXTRN DMKVATBC,DMKVATMD 00130000
- EXTRN DMKTRCEX @VA09019 00130500
- EJECT 00131000
- *********************************************************************** 00132000
- *********************************************************************** 00133000
- * * 00134000
- * * 00135000
- * 'SYSTEM' * 00136000
- *********************************************************************** 00137000
- *. 00138000
- * SUBROUTINE NAME - 00139000
- * DMKCPBSR 00140000
- * 00141000
- * FUNCTION - 00142000
- * SIMULATES SYSTEM RESET AND PSW RESTART. IN ADDITION ALLOWS 00143000
- * THE CLEARING OF STORAGE. 00144000
- * 00145000
- * COMMAND FORMAT - 00146000
- * 00147000
- * +----------+-----------+ 00148000
- * | SYSTEM | CLEAR | 00149000
- * | SYS | RESET | 00150000
- * | | RESTART | 00151000
- * +----------+-----------+ 00152000
- * 00153000
- * OPERATION - 00154000
- * 1. CALL DMKSCNFD TO LOCATE ARGUMENT. IF NO ARGUMENT 00155000
- * IS FOUND, CALL DMKERMSG TO SEND ERROR MESSAGE 00156000
- * DMKCPB026E. 00157000
- * 2. IF ARGUMENT=RESTART, GO TO STEP 6; IF RESET, GO TO 00158000
- * STEP 8; IF CLEAR, GO TO NEXT STEP. IF NONE OF 00159000
- * THESE, CALL DMKERMSG TO SEND ERROR MESSAGE 00160000
- * DMKCPB026E. 00161000
- * 3. CLEAR - CALL DMKPGSPO TO CLEAR STORAGE TO BINARY 00162000
- * ZERO. 00163000
- * 4. CALL DMKCFPRR TO RESET ALL PENDING INTERRUPTS. 00164000
- * 5. CALL DMKQCNWT TO SEND THE 'STORAGE CLEARED-SYSTEM 00165000
- * RESET' MESSAGE AND EXIT. 00166000
- * 6. RESTART - TRANS IN VIRTUAL PAGE ZERO INTO STORAGE. 00167000
- * 7. STORE CURRENT VIRTUAL PSW INTO LOCATION EIGHT. THEN 00168000
- * SET THE CURRENT PSW TO THE CONTENTS OF LOCATION ZERO 00169000
- * AND EXIT. 00170000
- * 8. RESET - BAL TO SUBROUTINE AT LABEL RESYSTEM TO 00171000
- * RESET ALL THE VIRTUAL DEVICES. 00172000
- * 9. CALL DMKQCNWT TO SEND MESSAGE 'SYSTEM RESET' AND 00173000
- * EXIT. 00174000
- * 00175000
- * RESPONSES - 00176000
- * STORAGE CLEARED-SYSTEM RESET 00177000
- * SYSTEM RESET 00178000
- * 00179000
- * ERROR MESSAGES - 00180000
- * DMKCPB012E INVALID PSW - (PSW) 00181000
- * DMKCPB026E OPERAND MISSING OR INVALID 00182000
- *. 00183000
- EJECT 00184000
- DMKCPBSR RELOC SYSTEM RESET, PSW RESTART, OR CLEAR 00185000
- CALL DMKSCNFD FIND ARGUMENT 00186000
- BNZ CFP026 NONE FOUND 00187000
- LR R2,R0 LENGTH TO GPR2 00188000
- LR R3,R1 ADDRESS TO GPR3 00189000
- BCTR R2,0 MINUS ONE FOR EX 00190000
- EX R2,SYSCOMP1 CHECK FOR CLEAR 00191000
- BE CLEARMEM BRANCH IF IT IS 00192000
- EX R2,SYSCOMP2 TRY RESET 00193000
- BE RESALL BRANCH IF COMPARE 00194000
- EX R2,SYSCOMP3 HOPE ITS RESTART 00195000
- BE PSWREST IF DON'T TAKE THIS BRANCH-- BAD NEWS 00196000
- B CFP026 GOT A BAD ARGUMENT 00197000
- CLEARMEM CL R2,F4 PROPER LENGTH ????? 00198000
- BNE CFP026 NO ------ 00199000
- SR R2,R2 INDICATE A CLEAR OPERATION TO PGSPO 00200000
- CALL DMKCFPRR SYSTEM RESET 00201000
- CALL DMKPGSPO CLEAR ALL OF VIRTUAL MEMORY 00202000
- MSG 'STORAGE CLEARED - SYSTEM RESET' 00203000
- B WRTAPL GO CLEAR PA2 FLAG @VM03094 00204000
- SPACE 2 00205000
- RESALL CL R2,F4 PROPER LENGTH ???? 00206000
- BNE CFP026 BRANCH IF NOT 00207000
- CALL DMKCFPRR SYSTEM RESET 00208000
- MSG 'SYSTEM RESET' 00209000
- WRTAPL EQU * RESET EXTERNAL INTERRUPT FLAG @VM03094 00210000
- NI VMQSTAT,X'FF'-VMPA2APL CLEAR PA2 FLAG @VM03116 00211000
- B RESWRT SEND MESSAGE AND EXIT @VM03094 00212000
- SPACE 3 00213000
- PSWREST CL R2,F6 PROPER LENGTH ???? 00214000
- BNE CFP026 NOT IF WE TAKE THIS BRANCH 00215000
- SR R1,R1 BRING IN USER PAGE ZERO 00216000
- TRANS 2,1,OPT=(BRING,DEFER) 00217000
- LM R3,R4,VMPSW LOAD CURRENT PSW 00218000
- STM R3,R4,8(R2) STORE INTO USERS LOC. 8 00219000
- TM VMPSTAT,VMV370R EC MODE ALLOWED ???? 00220000
- BZ CKPSW NO --- 00221000
- TM 1(R2),EXTMODE RESTART PSW = EXTENDED ???? 00222000
- BZ CKMODE NO ---- 00223000
- OI VMESTAT,VMEXTCM TURN ON EC MODE 00224000
- TM 0(R2),TRANMODE TRANSLATE MODE 00225000
- BZ CKZERO NO ------ 00226000
- CALL DMKVATMD ENTER TRANSLATE MODE 00227000
- SPACE 00228000
- CKZERO TM 2(R2),X'D8' ALLOW ONLY PER OTHER BITS ZERO 00229010
- BZ PSWOK YES - PSW OK TO USE 00230000
- B ERROR NO - SEND ERROR MESSAGE 00231000
- SPACE 00232000
- CKMODE TM VMESTAT,VMEXTCM WERE WE IN EC MODE ??? 00233000
- BZ PSWOK NO - 00234000
- CALL DMKVATBC CLEAR SHADOW TABLES 00235000
- NI VMESTAT,X'FF'-VMEXTCM RESET EC MODE 00236000
- B PSWOK . . . 00237000
- SPACE 00238000
- CKPSW TM 1(R2),EXTMODE EXTENDED MODE PSW ???? 00239000
- BO ERROR YES - SEND ERROR MESSAGE 00240000
- PSWOK EQU * 00241000
- LM R0,R1,0(R2) LOAD PSW FROM USERS LOCATION ZERO 00242000
- STM R0,R1,VMPSW STORE INTO VIRTUAL PSW IN VMBLOK 00243000
- TM VMTRCTL,VMTREX+VMTRBRIN TRACING? @VA09019 00243100
- BZ NOTRAC NO - GO ON @VA09019 00243200
- L R4,FFS DUMMY INT CODE INTO R4 @VA09019 00243300
- LM R0,R1,8(R2) OLD PSW INTO R0,R1 @VA09019 00243400
- LM R2,R3,VMPSW NEW PSW INTO R2, R3 @VA09019 00243500
- CALL DMKTRCEX CALL EXTERNAL INTERUPT TRACE @VA09019 00243600
- NOTRAC EQU * @VA09019 00243700
- B RESXRUN GO RUN THE VIRTUAL MACHINE 00244000
- SPACE 00245000
- ERROR L R1,0(,R2) LOAD FIRST HALF OF BAD PSW 00246000
- CALL DMKCVTBH CONVERT TO PRINTABLE FORM 00247000
- STM R0,R1,SAVEWRK2 SAVE FOR LATER 00248000
- L R1,4(,R2) LOAD SECOND HALF OF PSW 00249000
- CALL DMKCVTBH CONVERT IT 00250000
- MVC SAVEWRK4(2),BLANKS STICK BLANKS BETWEEN 1ST AND LAST 00251000
- STCM R0,15,SAVEWRK4+2 STORE FIELD 00252000
- STCM R1,15,SAVEWRK5+2 . . . 00253000
- LA R0,18 FIELD LENGTH 00254000
- LA R1,SAVEWRK2 ADDRESS OF PSW 00255000
- B CFP012 GO SEND MESSAGE 00256000
- SPACE 00257000
- SYSCOMP1 CLC 0(0,R3),=C'CLEAR ' EXECUTED COMPARE 00258000
- SYSCOMP2 CLC 0(0,R3),=C'RESET ' . . . 00259000
- SYSCOMP3 CLC 0(0,R3),=C'RESTART ' . . . 00260000
- EJECT 00261000
- *********************************************************************** 00262000
- * * 00263000
- * 'EXTERNAL' * 00264000
- * * 00265000
- *********************************************************************** 00266000
- *. 00267000
- * 00268000
- * SUBROUTINE NAME - 00269000
- * DMKCPBEX 00270000
- * 00271000
- * FUNCTION - 00272000
- * TO CAUSE AN EXTERNAL INTERRUPT TO BE PRESENTED TO THE 00273000
- * VIRTUAL MACHINE. 00274000
- * 00275000
- * COMMAND FORMAT - 00276000
- * 00277000
- * +------------+--------+ 00278000
- * | EXTERNAL | CODE | 00279000
- * | EXT | | 00280000
- * +------------+--------+ 00281000
- * 00282000
- * OPERATION - 00283000
- * 1. SET UP DEFAULT INTERRUPT CODE TO X'40'. THEN CALL 00284000
- * DMKSCNFD TO LOCATE ARGUMENT. IF NONE FOUND, GO TO 00285000
- * STEP THREE. 00286000
- * 2. CALL DMKCVTHB TO CONVERT CODE TO BINARY. IF CONVERT FAILS, 00287000
- * CALL DMKERMSG TO SEND ERROR MESSAGE DMKCPB005E. ELSE - 00288000
- * SET INTERRUPT CODE TO THIS VALUE. 00289000
- * 3. SET EXTERNAL INTERRUPT PENDING FLAG AND EXIT. 00290000
- * 00291000
- * RESPONSES - 00292000
- * SINCE CONTROL IS GIVEN TO THE VIRTUAL MACHINE, ANY RESPONSES 00293000
- * WILL COME FROM THE VIRTUAL MACHINE PROCESSING. 00294000
- * 00295000
- * ERROR MESSAGES - 00296000
- * DMKCPB005E INVALID HEXDATA - (HEXDATA) 00297000
- *. 00298000
- EJECT 00299000
- DMKCPBEX RELOC SIMULATE PRESSING THE INTERRUPT KEY 00300000
- SLR R3,R3 ZERO REGISTER THREE @V200198 00301000
- L R4,=X'00400040' SET DEFAULT CODE @V200198 00302000
- CALL DMKSCNFD FIND CODE IF ANY @V200198 00303000
- BNZ SETCODE NO CODE, GO SET DEFAULT @V200198 00304000
- STM R0,R1,SAVEWRK2 SAVE LENGTH AND ADDRESS @V200198 00305000
- CALL DMKCVTHB CONVERT CODE @V200198 00306000
- BNZ BADCODE INVALID CODE SPECIFIED @V200198 00307000
- CL R1,=A(X'FF') CHECK FOR CLASS ZERO @V200198 00308000
- BH NOTZERO MUST BE CLASS ONE @V200198 00309000
- LTR R4,R1 PUT CODE IN REG4 @VA04309 00310300
- BZ BADCODE IMPOSSIBLE CONDITION @VA04309 00310600
- ST R4,SAVEWRK5 STORE FOR TESTING BITS @V200198 00311000
- SLL R4,16 MAKE ROOM FOR MASK BITS @V200198 00312000
- N R1,=A(X'C0') SELECT BUTTON AND TIMER CODES @V200198 00313000
- BZ *+6 NONE THERE, SKIP @VM08922 00314000
- OR R4,R1 SAVE RESULTING MASK BITS @V200198 00315000
- TM SAVEWRK5+3,X'3F' CHECK FOR SIGNSL LINES @V200198 00316000
- BZ SETCODE NONE THERE, GO SET WHAT WE HAVE @V200198 00317000
- O R4,=A(X'20') PUT IN MASK BIT FOR SIGNAL LINES @V200198 00318000
- B SETCODE ALL DONE,GO SET CODE @V200198 00319000
- NOTZERO TM VMPSTAT,VMV370R EXTENDED MACHINE? @V200198 00320000
- BZ BADCODE NO, ALL OTHER CODES ILLEGAL @V200198 00321000
- LM R3,R4,=X'1040000010040800' CODE FOR COMPARATOR @V200198 00322000
- CL R1,=A(X'1004') SETTING COMPARATOR? @V200198 00323000
- BE SETCODE YES, SET IT @V200198 00324000
- LM R3,R4,=X'1050000010050400' CODE FOR CPU TIMER @V200198 00325000
- CL R1,=A(X'1005') SETTING TIMER 00326000
- BNE BADCODE NO --- OTHERS NOT SUPPORTED 00327000
- SPACE 00328000
- SETCODE SLR R5,R5 PARAMETER IS MEANINGLESS HERE @V200198 00329000
- LA R2,VMPXINT START OF EXTERNAL INTERRUPT @V200198 00330000
- * BLOCKS 00331000
- USING XINTBLOK,R2 EXTERNAL INTERRUPT BLOCK @V200198 00332000
- XLOOP LR R6,R2 PRESERVE POINTER TO PREVIOUS @V200198 00333000
- L R2,XINTNEXT-XINTBLOK(,R6) NEXT? @V200198 00334000
- LTR R2,R2 @V200198 00335000
- BZ XADD NOPE, ADD TO END OF CHAIN @V200198 00336000
- C R3,XINTSORT CHECK FOR COLLATING SEQUENCE @V200198 00337000
- BH XLOOP KEEP LOOKING... @V200198 00338000
- BL XADD FITS RIGHT IN HERE @V200198 00339000
- O R4,XINTCODE SAME COLLATING SEQUENCE @V200198 00340000
- ST R4,XINTCODE SO OR TO STORAGE @V200198 00341000
- B RESXRUN RETURN TO CALLER @V200198 00342000
- XADD LA R0,XINTSIZE NUMBER OF DOUBLEWORDS @V200198 00343000
- CALL DMKFREE GET BLOCK FORM FREE STORAGE @V200198 00344000
- ST R1,XINTNEXT-XINTBLOK(,R6) CHAIN TO PREVIOUS @V200198 00345000
- * BLOCK 00346000
- STM R2,R5,XINTNEXT-XINTBLOK(R1) BUILD NEW @V200198 00347000
- * INTERRUPT BLOCK 00348000
- B RESXRUN GO RUN THE VIRTUAL MACHINE 00349000
- SPACE 00350000
- BADCODE LM R0,R1,SAVEWRK2 RELOAD LENGTH AND ADDRESS OF ARG. 00351000
- B CFP005 . . . 00352000
- EJECT 00353000
- *********************************************************************** 00354000
- * * 00355000
- * 'READY' * 00356000
- * * 00357000
- *********************************************************************** 00358000
- *. 00359000
- * 00360000
- * SUBROUTINE NAME - 00361000
- * DMKCPBRY 00362000
- * 00363000
- * FUNCTION - 00364000
- * TO SIMULATE A DEVICE END INTERRUPT TO THE SPECIFIED DEVICE. 00365000
- * 00366000
- * COMMAND FORMAT - 00367000
- * 00368000
- * +---------+---------+ 00369000
- * | READY | VADDR | 00370000
- * | R | | 00371000
- * +---------+---------+ 00372000
- * 00373000
- * OPERATION - 00374000
- * 1. BAL R10 TO SUBROUTINE 'FNDVADDR' TO GET ADDRESSES OF THE 00375000
- * VBLOKS. 00376000
- * 2. IF THE DEVICE IS BUSY, JUST EXIT SINCE THE DEVICE END WILL 00377000
- * COME ANYWAY. 00378000
- * 2.1 IF THE DEVICE IS A VIRTUAL CHANNEL-TO-CHANNEL ADAPTER, 00379000
- * ISSUE MSG DMKCPB006E AND EXIT. 00380000
- * 3. SET INTERRUPT PENDING FLAGS IN THE VDEVBLOK,VCUBLOK, 00381000
- * VCHBLOK, AND VMBLOK - THEN EXIT. 00382000
- * 00383000
- * RESPONSES - 00384000
- * A NULL LINE WILL BE SENT ON A SUCCESSFUL OPERATION 00385000
- * 00386000
- * ERROR MESSAGES - 00387000
- * DMKCPB006E INVALID DEVICE TYPE - (ADDR) 00388000
- * DMKCPB022E VADDR MISSING OR INVALID 00389000
- * DMKCPB040E DEV (ADDR) DOES NOT EXIST 00390000
- *. 00391000
- EJECT 00392000
- DMKCPBRY RELOC CAUSE A VIRTUAL DEVICE END INTERRUPT 00393000
- BAL R10,FNDVADDR GO GET VBLOKS 00394000
- USING VCHBLOK,R6 00395000
- USING VCUBLOK,R7 00396000
- USING VDEVBLOK,R8 00397000
- TM VDEVSTAT,VDEVBUSY IS THE DEVICE BUSY ? 00398000
- BO RESEXT RETURN AND LET IT READY NATURALLY 00399000
- LA R1,CLASSPEC*256+TYPCTCA CHECK FOR VIRTUAL CTCA 00400000
- CH R1,VDEVTYPC IS IT A CHAN-TO-CHAN ADAPTER ? 00401000
- BNE CPBRYOK NO -- IT'S O.K. TO READY IT 00402000
- TM VDEVSTAT,VDEVDED DEDICATED CTCA ? 00403000
- BO CPBRYOK YES - ALSO O.K. 00404000
- TM VDEVSTAT,VDEVNRDY IF THE CTCA IS NOT READY NOW... 00405000
- BO BADTYPE ...'COUPLE' CMD MUST READY IT, NOT US 00406000
- CPBRYOK EQU * MAKE DEVICE READY, PRESENT DEVICE END 00407000
- NI VDEVSTAT,255-VDEVNRDY TURN OFF NOT READY FLAG 00408000
- OI VDEVSTAT,VDEVPEND INDICATE AN INTERRUPT IS PENDING 00409000
- MVI VDEVINTS,DE SET DEVICE END STATUS 00410000
- L R1,=A(DMKVIOMK) LOAD ADDRESS OF INTERRUPT MASKS 00411000
- LH R2,VDEVADD LOAD THE VIRTUAL DEVICE ADDRESS 00412000
- AR R2,R2 MULTIPLY IT BY 2 00413000
- LA R2,0(R1,R2) POINT TO PROPER MASK 00414000
- OC VCUDVINT,0(R2) SET PENDING FLAG IN VCUBLOK 00415000
- LH R2,VCUADD LOAD THE VIRTUAL CONTROL UNIT ADDRESS 00416000
- SRL R2,3 MULTIPLY IT BY 2 00417000
- LA R2,0(R1,R2) POINT TO THE PROPER MASK 00418000
- OC VCHCUINT,0(R2) SET PENDING FLAG IN VCHBLOK 00419000
- LH R2,VCHADD LOAD THE VIRTUAL CHANNEL ADDRESS 00420000
- SRL R2,7 MULTIPLY IT BY 2 00421000
- LA R2,0(R1,R2) POINT TO THE PROPER MASK 00422000
- OC VMIOINT,0(R2) FLAG CHANNEL PENDING IN VMBLOK 00423000
- OI VMPEND,VMIOPND FLAG SUMMARY PENDING BYTE 00424000
- B RESEXT RETURN 00425000
- DROP R6,R7,R8 00426000
- EJECT 00427000
- *. 00428000
- * SUBROUTINE NAME - 00429000
- * DMKCPBNR 00430000
- * 00431000
- * FUNCTION - 00432000
- * TO CAUSE THE VIRTUAL DEVICE TO APPEAR NOT READY. 00433000
- * 00434000
- * COMMAND LINE FORMAT - 00435000
- * +------------+---------+ 00436000
- * | NOTREADY | VADDR | 00437000
- * | NOTR | | 00438000
- * +------------+---------+ 00439000
- * 00440000
- * OPERATION - 00441000
- * 1. BAL R10 TO SUBROUTINE 'FNDVADDR' TO GET THE ADDRESSES OF 00442000
- * THE VBLOKS. 00443000
- * 2. IF THE VIRTUAL DEVICE IS NOT A VIRTUAL CONSOLE OR SPOOLED 00444000
- * UNIT RECORD DEVICE, CALL DMKERMSG TO SEND ERROR MESSAGE 00445000
- * DMKCPB006E. IF OK, SET THE VDEVNRDY FLAG IN THE VDEVSTAT. 00446000
- * 00447000
- * RESPONSES - 00448000
- * NONE 00449000
- * 00450000
- * ERROR MESSAGES - 00451000
- * DMKCPV006E INVALID DEVICE TYPE - (ADDR) 00452000
- * DMKCPB022E VADDR MISSING OR INVALID 00453000
- * DMKCPB040E DEV (ADDR) DOES NOT EXIST 00454000
- *. 00455000
- EJECT 00456000
- DMKCPBNR RELOC 00457000
- BAL R10,FNDVADDR GET VBLOK ADDRESSES 00458000
- USING VDEVBLOK,R8 00459000
- TM VDEVTYPC,CLASURO+CLASURI UNIT RECORD ????? 00460000
- BNZ CHKDED IF UR, GO CHECK IF DEDICATED 00461000
- TM VDEVTYPC,CLASTERM MIGHT BE A CONSOLE 00462000
- BZ BADTYPE IF IT ISN'T, GO SEND ERROR MESSGAE 00463000
- CLI VDEVTYPE,TYP3210 MAKE SURE IT'S A CONSOLE 00464000
- BNE BADTYPE NOPE -- CAN'T MAKE NOTREADY 00465000
- SPACE 00466000
- CHKDED TM VDEVSTAT,VDEVDED DEDICATED ????? 00467000
- BO BADTYPE YES -- CAN'T MAKE NOTREADY 00468000
- OI VDEVSTAT,VDEVNRDY SET NOT READY FLAG 00469000
- DROP R8 00470000
- B RESEXT RETURN 00471000
- EJECT 00472000
- *********************************************************************** 00473000
- * * 00474000
- * 'RESET' * 00475000
- * * 00476000
- *********************************************************************** 00477000
- *. 00478000
- * SUBROUTINE NAME - 00479000
- * DMKCPBRS 00480000
- * 00481000
- * FUNCTION - 00482000
- * TO RESET ALL PENDING INTERRUPTS FROM THE SPECIFIED DEVICE. 00483000
- * 00484000
- * COMMAND FORMAT - 00485000
- * 00486000
- * +---------+---------+ 00487000
- * | RESET | VADDR | 00488000
- * | RESET | | 00489000
- * +---------+---------+ 00490000
- * 00491000
- * OPERATION - 00492000
- * 1. BAL R10 TO SUBROUTINE 'FNDVADDR' TO GET THE VBLOKS. 00493000
- * 2. CALL DMKCFPRD TO RESET THE DEVICE. 00494000
- * 3. IF DEVICE TYPE IS TYPIBM1 OR TYPTELE2, CALL DMKVDBRL TO 00495000
- * RELEASE THE DEVICE. 00496000
- * 4. CALL DMKQCNWT TO SEND THE RESPONSE 'DEVICE RESET' - EXIT. 00497000
- * 00498000
- * RESPONSES - 00499000
- * DEVICE RESET 00500000
- * 00501000
- * ERROR MESSAGES - 00502000
- * DMKCPB022E VADDR MISSING OR INVALID 00503000
- * DMKCPB040E DEV (ADDR) DOES NOT EXIST 00504000
- *. 00505000
- EJECT 00506000
- DMKCPBRS RELOC RESET A VIRTUAL DEVICE 00507000
- BAL R10,FNDVADDR GET VBLOKS 00508000
- USING VCHBLOK,R6 00509000
- USING VCUBLOK,R7 00510000
- USING VDEVBLOK,R8 00511000
- CALL DMKCFPRD RESET THE VIRTUAL DEVICE 00512000
- SPACE 00513000
- RESMSG MSG 'DEVICE RESET' 00514000
- SPACE 00515000
- RESWRT CALL DMKQCNWT,PARM=NORET SEND VERIFICATION MESSAGE 00516000
- SPACE 00517000
- RESEXT EXIT RETURN TO THE CALLER 00518000
- SPACE 2 00519000
- RESXRUN EQU * ADJUST RETURN ADDRESS FOR RUNNING V.M. 00520000
- L R1,SAVERETN ADD FOUR TO RETURN ADDRESS... 00521000
- LA R1,4(0,R1) ...TO TAKE MACHINE OUT OF... 00522000
- ST R1,SAVERETN ...CONSOLE FUNCTION MODE 00523000
- EXIT , EXIT TO DMKCFM, RUN THE VIRTUAL MACHINE 00524000
- EJECT 00525000
- ********************************************************************** 00526000
- * * 00527000
- * 'REWIND' * 00528000
- * * 00529000
- ********************************************************************** 00530000
- *. 00531000
- * SUBROUTINE NAME - 00532000
- * DMKCPBRW 00533000
- * 00534000
- * FUNCTION - 00535000
- * ISSUE A REWIND TO THE REAL TAPE DEVICE ASSOCIATED WITH THE 00536000
- * VIRTUAL ADDRESS SPCIFIED. 00537000
- * 00538000
- * COMMAND FORMAT - 00539000
- * 00540000
- * +----------+---------+ 00541000
- * | REWIND | VADDR | 00542000
- * | REW | | 00543000
- * +----------+---------+ 00544000
- * 00545000
- * OPERATION - 00546000
- * 1. BAL R10 TO SUBROUTINE 'FNDVADDR' TO GET THE ADDRESSES 00547000
- * OF THE VBLOKS. 00548000
- * 2. IF THE DEVICE IS NOT A TAPE, CALL DMKERMSG TO SEND ERROR 00549000
- * MESSAGE DMKCPB006E. 00550000
- * 3. CALL DMKFREE TO OBTAIN STORAGE FOR AN IOBLOK AND CCW. 00551000
- * 4. INITIALIZE THE IOBLOK TO DO A SENSE OPERATION. CALL 00552000
- * DMKIOSQR TO DO THE SENSE. GO TO DMKDSPCH TO WAIT FOR THE 00553000
- * SENSE TO COMPLETE¬ WHEN SENSE IS DONE| CHECK IF THE TAPE 00554000
- * IS READY. IF NOT, CALL DMKFRET TO FRET THE IOBLOK AND 00555000
- * THEN CALL DMKQCNWT TO SEND THE RESPONSE 'REWIND NOT 00556000
- * PERFORMED' AND EXIT. 00557000
- * 5. IF TAPE IS READY, SET UP THE IOBLOK FOR A REWIND AND 00558000
- * CALL DMKIOSQR TO DO THE REWIND. CALL DMKQCNWT TO SEND THE 00559000
- * RESPONSE 'REWIND COMPLETE' AND EXIT. 00560000
- * 00561000
- * RESPONSES - 00562000
- * REWIND COMPLETE 00563000
- * REWIND NOT PERFORMED 00564000
- * 00565000
- * ERROR MESSAGE - 00566000
- * DMKCPB006E INVALID DEVICE TYPE - (ADDR) 00567000
- * DMKCPB022E VADDR MISSING OR INVALID 00568000
- * DMKCPB040E DEV (ADDR) DOES NOT EXIST 00569000
- *. 00570000
- EJECT 00571000
- DMKCPBRW RELOC REWIND A TAPE 00572000
- BAL R10,FNDVADDR GET VBLOKS 00573000
- USING VDEVBLOK,R8 00574000
- CLI VDEVTYPC,CLASTAPE IS THIS A TAPE DEVICE 00575000
- BNE BADTYPE INVALID TYPE 00576000
- L R8,VDEVREAL LOAD ADDRESS OF RDEVBLOK 00577000
- DROP R8 00578000
- USING RDEVBLOK,R8 00579000
- USING RCUBLOK,R7 00580000
- USING RCHBLOK,R6 00581000
- L R7,RDEVCUA ADDRESS OF RCUBLOK 00582000
- TM RCUTYPE,RCUSUB IS THIS A SUBORDINATE CU @VA01081 00583000
- BZ *+8 NO- BRANCH @VA01081 00584000
- L R7,RCUPRIME YES- POINT TO THE PRIME CU @VA01081 00585000
- L R6,RCUCHA ADDRESS OF RCHBLOK 00586000
- LA R0,IOBSIZE LOAD SIZE OF IOBLOK @VA04137 00587100
- CALL DMKFREE GET STORAGE FOR IOBLOK 00588000
- LR R10,R1 MAKE R10 BASE FOR IOBLOK 00589000
- USING IOBLOK,R10 00590000
- XC IOBLOK(IOBSIZE*8),IOBLOK CLEAR IOBLOK 00591000
- ST R11,IOBUSER REQUESTOR OF THE SERVICE 00592000
- LA R0,3 SIZE OF RCWTASK NEEDED @VA04137 00593500
- CALL DMKFREE @VA04137 00594000
- ST R1,IOBCAW SAVE ADDRESS OF RCWTASK @VA04137 00594500
- LA R0,1 GET BUFFER FOR THE SENSE DATA 00595000
- CALL DMKFREE ..... 00596000
- MVC 0(8,R1),ZEROES CLEAR BUFFER 00597000
- LR R7,R1 SAVE THE BUFFER ADDRESS 00598000
- LM R3,R6,REWCCWS LOAD THE SENSE AND REWIND CCW'S 00599000
- OR R3,R1 ADDRESS OF SENSE BUFFER TO CCW 00600000
- L R1,IOBCAW POINT TO RCWTASK @VA04137 00601090
- USING RCWTASK,R1 @VA04137 00601180
- XC RCWTASK(24),RCWTASK CLEAR RCWTASK @VA04137 00601270
- STM R3,R4,RCWCCW MOVE IN SENSE CCW @VA04137 00601360
- LA R3,3 ESTABLISH RCWTASK SIZE @VA04137 00601450
- STH R3,RCWCCNT STORE TOTAL NO. OF DBL-WORDS @VA04137 00601540
- L R15,FFS INITIALIZE RCWHEAD .... @VA04137 00601630
- STH R15,RCWHEAD ... TO 'FFFF' @VA04137 00601720
- LA R15,RCWCCW NOW WE HAVE TO.... @VA04137 00601810
- ST R15,IOBCAW POINT IOBCAW TO CCW @VA04137 00601900
- ST R13,IOBMISC SAVE ADDRESS OF SAVEAREA 00602000
- STM R5,R8,SAVEWRK2 SAVE REGISTERS NEEDED UPON RETURN 00603000
- LA R1,SENSRETN ADDRESS OF RETURN FROM SENSE 00604000
- ST R1,IOBIRA STORE IT 00605000
- TM RDEVSTAT,RDEVBUSY IF THE DEVICE IS ALREADY BUSY... 00606000
- BO NOREW ...WE WON'T START THE REWIND 00607000
- CALL DMKIOSQR QUEUE IT 00608000
- GOTO DMKDSPCH WAIT FOR IT 00609000
- SPACE 00610000
- SENSRETN EQU * 00611000
- USING *,R12 00612000
- SL R12,=A(SENSRETN-DMKCPB) REESTABILISH ADDRESSABLITY 00613000
- USING DMKCPB,R12 00614000
- L R13,IOBMISC RELOAD SAVEAREA ADDRESS 00615000
- LM R5,R8,SAVEWRK2 RESTORE NEEDED REGISTERS 00616000
- TM 0(R7),X'40' TEST FOR INT. REQ. 00617000
- BO NOREW DON'T DO REWIND IF IT IS 00618000
- LR R1,R7 BEFORE DOING REWIND 00619000
- LA R0,1 FRET THE SENSE BUFFER 00620000
- CALL DMKFRET ..... 00621000
- L R1,IOBCAW POINT TO CCW @VA04137 00622150
- SL R1,F16 POINT TO BEGINNING OF RCWTASK @VA04137 00622300
- STM R5,R6,RCWCCW MOVE REWIND CCW INTO RCWTASK @VA04137 00622450
- L R1,=A(DMKIOSRW) IRA ADDRESS 00623000
- ST R1,IOBIRA STORE IT 00624000
- L R1,ASYSVM USE THE SYSTEM VMBLOK FOR THE REW. 00625000
- ST R1,IOBUSER ....... 00626000
- CALL DMKIOSQR QUEUE REWIND 00627000
- MSG 'REWIND COMPLETE' 00628000
- B RESWRT SEND MESSAGE AND GET OUT 00629000
- SPACE 00630000
- NOREW LR R1,R7 FRET SENSE BUFFER 00631000
- LA R0,1 .... 00632000
- CALL DMKFRET .... 00633000
- L R1,IOBCAW POINT TO CCW @VA04137 00633150
- SL R1,F16 POINT TO BEGINNING OF RCWTASK @VA04137 00633300
- LH R0,RCWCCNT GET SIZE OF RCWTASK @VA04137 00633450
- CALL DMKFRET RELEASE RCWTASK @VA04137 00633600
- DROP R1 @VA04137 00633750
- LR R1,R10 FRET THE IOBLOK 00634000
- LA R0,IOBSIZE .... @VA04137 00635500
- CALL DMKFRET .... 00636000
- MSG 'REWIND NOT PERFORMED' 00637000
- B RESWRT SEND RESPONSE AND EXIT 00638000
- SPACE 00639000
- DROP R8,R10 00640000
- SPACE 00641000
- BADTYPE LM R0,R1,SAVEWRK2 LOAD ADDRESS AND LENGTH OF BAD ARG. 00642000
- B CFP006 GO SEND ERROR MESSAGE 00643000
- SPACE 00644000
- REWCCWS CCW 04,0,SILI,6 SENSE CCW 00645000
- CCW 07,0,SILI,1 REWIND CCW 00646000
- EJECT 00647000
- *. 00648000
- * SUBROUTINE NAME - 00649000
- * FNDVADDR 00650000
- * 00651000
- * FUNCTION - 00652000
- * TO LOCATE AND VERIFY THE EXISTENCE OF A VADDR. 00653000
- * 00654000
- * OPERATION - 00655000
- * 1. CALL DMKSCNFD TO LOCATE THE VADDR. IF NONE IS FOUND, CALL 00656000
- * DMKERMSG TO SEND ERROR MESSAGE DMKCFP022E. 00657000
- * 2. IF THE LENGTH OF THE ARGUMENT IS OVER THREE CHARACTERS, 00658000
- * CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFP 022E. 00659000
- * 3. CALL DMKCVTHB TO CONVERT THE ADDRESS TO BINARY. IF THE 00660000
- * CONVERT FAILS, CALL DMKERMSG TO SEND ERROR MESSAGE 00661000
- * DMKCFP022E. 00662000
- * 4. CALL DMKSCNVU TO LOCATE THE VBLOK ADDRESSES. IF NOT FOUND, 00663000
- * CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFP040E. 00664000
- * 5. IF EVERYTHING OS OK, RETURN ON R10. 00665000
- *. 00666000
- SPACE 3 00667000
- FNDVADDR EQU * 00668000
- CALL DMKSCNFD GET DEVICE ADDRESS 00669000
- BNZ CFP022 BRANCH IF CAN'T FIND 00670000
- STM R0,R1,SAVEWRK2 SAVE LEN AND ADDR FOR POSSIBLE ERROR 00671000
- CL R0,F3 CAN ONLY HAVE THREE CHARACTERS 00672000
- BH CFP022 BRANCH IF HE GOOFED 00673000
- CALL DMKCVTHB CONVERT THE ADDRESS TO BINARY 00674000
- BNZ CFP022 BAD CONVERT IF BRANCH 00675000
- MAXDV R15 GET HIGHEST VIRTUAL DEVICE 00676000
- CLR R1,R15 VALID VIRTUAL ADDRESS ? 00677000
- BH CFP022 NOPE ---- 00678000
- CALL DMKSCNVU NOW LETS GET THE BLOKS 00679000
- BNZ CPBCKMSS MAY BE RESET OF MSS PENDING VADDR@V60B6B8 00680000
- BR R10 RETURN--- 00681000
- EJECT 00682000
- CFP005 LA R2,005 LOAD ERROR CODE 00683000
- B CALLERM . . . 00684000
- SPACE 00685000
- CFP006 LA R2,006 ERROR CODE 00686000
- B CALLERM . . . 00687000
- SPACE 00688000
- CFP012 LA R2,012 ERROR CODE 00689000
- B CALLERM . . . 00690000
- CFP026 LA R2,26 ERROR CODE 00691000
- B NOVAR 00692000
- CFP022 LA R2,22 ERROR CODE 00693000
- B NOVAR . . . 00694000
- CFP040 CALL DMKCVTBH CONVERT TO PRINTABLE FORM 00695000
- N R1,X40FFS BLANK HIGH BYTE 00696000
- SLR R0,R0 ZERO LENGTH REGISTER 00697000
- LA R2,40 ERROR CODE 00698000
- B CALLERM . . . 00699000
- CPBCKMSS EQU * SEE IF DEVICE HAS I/O PENDING @V60B6B8 00699020
- * 00699040
- * IF THE VADDR SPECIFIED IS MAPPED TO AN MSS 3330V, 00699060
- * THEN IT IS POSSIBLE THAT DMKVSI OR DMKDGD 00699080
- * HAS QUEUED A SIO, PENDING THE VOLUME MOUNT 00699100
- * AND VDEVBLOK BUILD. IF THIS IS THE CASE, 00699120
- * CLEAR THE PENDING I/O. 00699140
- * 00699160
- L R3,MSSQADD ADDR OF Q OF MSSCOM BLOCKS @V60B6B8 00699180
- LTR R3,R3 IS THE VCON = 0,POSSIB. NO DMKSSS@VA09319 00699185
- BZ CFP040 NO, BAD RESET COMMAND @VA09319 00699190
- L R3,0(R3) POINTER TO FIRST MSSCOM BLOCK @V60B6B8 00699200
- USING OSVSCOM,R3 ASSEMBLER ADDRESSABILITY @V60B6B8 00699220
- TESTBLOK EQU * SEE IF THERE IS A BLOCK @V60B6B8 00699240
- LTR R3,R3 IS THERE A BLOCK PTR @V60B6B8 00699260
- BZ CFP040 NO, BAD RESET COMMAND @V60B6B8 00699280
- CLC VMUSER(8),MSSUSER IS BLOCK FOR THIS USER @V60B6B8 00699300
- BE TESTDEV YES, SEE IF THIS DEVICE @V60B6B8 00699320
- NEXTCOM EQU * GET NEXT MSSCOM BLOCK @V60B6B8 00699340
- L R3,MSSNEXT NEXT BLOCK CHAIN PTR @V60B6B8 00699360
- B TESTBLOK SEE IF THERE IS ONE @V60B6B8 00699380
- TESTDEV EQU * SEE IF THIS DEVICE IS PENDING @V60B6B8 00699400
- L R4,MSSTASK2 CPEXBLOK PTR @V60B6B8 00699420
- LTR R4,R4 IS THERE ONE @V60B6B8 00699440
- BZ NEXTCOM NO, TEST FOR ANOTHER MSSCOM @V60B6B8 00699460
- DROP R3 @V60B6B8 00699480
- * 00699500
- * TEST TO SEE IF THE VADDR ON THE RESET COMMAND IS THE 00699520
- * SAME AS THE VADDR WHICH HAS MSS I/O PENDING 00699540
- * 00699560
- C R1,CPEXMISC-CPEXBLOK(R4) IS IT THIS VADDR @V60B6B8 00699580
- BNE CFP040 NO, JUST BAD PARAMETER @V60B6B8 00699600
- LR R1,R4 CPEXBLOK ADDR @V60B6B8 00699620
- LA R0,4 RETURN CODE VALUE @V60B6B8 00699640
- ST R0,CPEXMISC-CPEXBLOK(R1) SET ERROR CODE @V60B6B8 00699660
- CALL DMKSTKCP STACK THE EXBLOK @V60B6B8 00699680
- GOTO DMKDSPCH AND CALL THE DISPATCHER @V60B6B8 00699700
- SPACE 00700000
- NOVAR SR R1,R1 ZERO ARG REG 00701000
- CALLERM ICM R0,14,MODID+3 INSERT MODULE ID 00702000
- CALL DMKERMSG CALL MESSAGE MODULE 00703000
- * 00704000
- * MESSAGE MODULE RETURNS DIRECTLY TO DMKCFM 00705000
- * 00706000
- MSSQADD DC V(DMKSSSMQ) @V60B6B8 00706500
- EJECT 00707000
- LTORG 00708000
- EJECT 00709000
- OSVSCOM MSSCOM @V60B6B8 00709500
- PSA , @V306638 00710000
- COPY DEVTYPES @V306638 00711000
- COPY EQU @V306638 00712000
- COPY IOBLOKS @V306638 00713000
- COPY RBLOKS @V306638 00714000
- COPY SAVE @V306638 00715000
- COPY VBLOKS @V306638 00716000
- COPY VMBLOK @V306638 00717000
- COPY XINTBLOK @V306638 00718000
- END DMKCPB 00719000
ibm/vm370-lib/cp/dmkcpb.assemble_src.txt Β· Last modified: 2023/08/06 13:36 by Site Administrator