Type ASSEMBLE
Source Lines : 1,496
Fixes Applied : 6
Most Recent Version : Thursday, December 7, 1978
Last Fix ID : [HRC068DK]
Module
DMKCFO
Function
PROCESS PRIVILEGED SET COMMANDS
Attributes
REENTRANT, PAGEABLE, CALLED VIA SVC
Operation
1. CALL DMKSCNFD TO SEE IF THERE IS A SECOND ARGUMENT. IF NONE IS FOUND, SET A FLAG TO INDICATE THIS AND CONTINUE. IF HAVE ONE, SAVE IT IN SAVEWRK5/6. 2. USING THE INDEX SET BY DMKCFC, BRANCH TO THE APPROPRIATE ROUTINE TO HANDLE THE REQUEST. TSTONOFF - THIS IS THE SUBROUTINE TO TEST THE ON/OFF ARGUMENT. IF THE ARGUMENT = ON, RETURN ON REGISTER 8. IF THE ARGUMENT = OFF, RETURN ON REGISTER 10. IF NO OTHER ARGUMENTS ARE LEGAL, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFS026E. IF SOMETHING ELSE LEGAL, RETURN ON REGISTER 7. SET PRIORITY 1. SETPRIOR - THIS ROUTINE WILL PROCESS THE SET PRIORITY REQUEST. FIRST CALL DMKSCNFD TO GET THE 'NN' ARGUMENT. IF NONE IS FOUND, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO026E. 2. CALL DMKSCNAU TO FIND THE USER VMBLOK. IF BLOK NOT FOUND, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO045E. 3. CALL DMKCVTDB TO CONVERT THE 'NN' ARGUMENT TO BINARY. IF THE CONVERT FAILS, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO003E. 4. STORE THE 'NN' VALUE IN THE VMBLOK. 5. EXIT - RETURN TO DMKCFM SET DUMP 1. SETDUMP - THIS ROUTINE WILL PROCESS THE SET DUMP REQUEST. CALL DMKSCNFD TO GET NEXT ARGUMENT. IF NONE FOUND, GO TO STEP 3. 2. IF ARGUMENT IS 'ALL' TURN ON THE ALL FLAG AND GO TO STEP 4. IF NOT ALL, CONTINUE WITH NEXT STEP. 3. RESET THE ALL FLAG. 4. IF A DEVICE IS ALREADY ACTIVE AS A DUMP DEVICE, RETURN IT TO THE SYSTEM. THEN IF THIS IS AN AUTO REQUEST, GO TO STEP 9. 5. CALL DMKCVTHB TO CONVERT THE RADDR TO BINARY. IF THE CONVERT FAILS, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO021E. 6. CALL DMKSCNRU TO FIND THE DEVICE BLOKS. IF NOT FOUND, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO040E. 7. IF THE DEVICE IS A TAPE THAT IS DEDICATED, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO140E. IF A NONPRINTER TYPE UR DEVICE, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO006E. IF THE DEVICE IS OFFLINE, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO046E. 8. STORE THE DEVICE ADDRESS IN THE DUMP DEVICE WORD AND EXIT. 9. GET THE DEVICE ADDRESS FOR THE AUTO DASD DEVICE AND GO TO STEP 8. SET LOGMSG 1. SETLOGM - ROUTINE TO PROCESS SET LOGMSG REQUEST. IF NO SECOND ARGUMENT , GO TO STEP 5. IF THE SECOND ARGUMENT IS A NULL REQUEST, GO TO STEP 8. 2. CALL DMKCVTDB TO CONVERT THE LINE NUMBER TO BINARY. IF THE CONVERT FAILS, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO026E. 3. SEARCH FOR THE LINE NUMBER. IF NOT FOUND, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO041E. IF THE LINE IS FOUND, BAL TO STEP 9 TO READ THE INPUT LINE. IF A NULL LINE IS ENTERED, GO TO NEXT STEP. ELSE - OVERLAY THE OLD MESSAGE WITH THE NEW AND GO TO STEP 10. 4. CALL DMKFRET TO FRET THE OLD MESSAGE BLOK AND THEN GO TO STEP 10. 5. FIND THE LAST LOGMSG IN THE CHAIN. THEN BAL TO STEP 9 TO READ THE INPUT LINE. IF RECEIVE A NULL LINE, GO TO STEP 7. ELSE CONTINUE WITH NEXT STEP. 6. CALL DMKFREE TO GET STORAGE FOR A NEW MESSAGE BLOK. MOVE THE MESSAGE INTO THE BLOK AND GO TO STEP 5. 7. CALL DMKFRET TO FRET THE READ BUFFER AND GO TO STEP 10. 8. FOR EACH EXISTING MESSAGE BLOK, CALL DMKFRET TO RETURN THE BLOK TO FREE STORAGE. THEN GO TO STEP 10. 9. CALL DMKQCNWT TO SEND THE PROMPT MESSAGE 'LOGMSG:'. THEN CALL DMKFREE TO OBTAIN STORAGE FOR A READ BUFFER. SET UP THE RETURN FROM THE READ TO POINT TO THE ADDRESS CONTAINED IN THE BAL REGISTER 10. THEN CALL DMKQCNRD TO READ THE INPUT LINE. 10. RESEQUENCE THE LINE NUMBERS IN ALL EXISTING MESSAGE BLOKS. THEN CALL DMKCVTDT TO GET THE DATE AND TIME. UPDATE THE DATE AND TIME FOR CHANGING THE LOGMSG. THIS WILL BE USED BY LOGON. THEN EXIT. SET RESERVED 1. SETRESRV - SET FLAG TO INDICATE A RESERVE REQUEST AND GO TO STEP 2. SET FAVORED 2. SETFAVOR - ROUTINE TO PROCESS THE SET FAVORED REQUEST. IF THERE IS NO SECOND ARGUMENT, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO026E. IF HAVE ONE, CALL DMKSCNAU TO FIND USERID VMBLOK. IF CAN'T FIND, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO045E. IF HAVE USER, CALL DMKSCNFD TO FIND NEXT ARGUMENT. IF NONE IS FOUND, GO TO STEP 5. IF ARGUMENT=OFF, GO TO STEP 6 - ELSE CONTINUE. 3. CALL DMKCVTDB TO CONVERT THE XX TO BINARY. IF THE CONVERT FAILS, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO026E. IF OK, CHECK IF THIS IS A RESERVE REQUEST. IF IT IS, GO TO STEP 7 - ELSE CONTINUE. 4. IF A FAVORED PERCENTAGE USER IS ALREADY ACTIVE, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO175E. IF NOT CALL DMKFREE TO OBTAIN STORAGE FOR A TRQBLOK(TIMER BLOK). INITIALIZE THE TIMER BLOK AND SET THE FAVORED AND PERCENTAGE FLAGS IN THE VMBLOK. THEN CALL DMKSTKIO TO PUT THE TIMER BLOK ON THE QUEUE. THEN EXIT. 5. IF THIS IS A RESERVE REQUEST, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO026E. IF FAVORED REQUEST, SET THE FAVORED FLAG IN THE VMBLOK AND EXIT. 6. IF THIS IS A RESERVE REQUEST, GO TO STEP 8. IF FAVORED, RESET THE FAVORED FLAG IN THE VMBLOK AND EXIT. 7. IF RESERVE IS ALREADY ACTIVE FOR OTHER THAN THIS USER CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO175E. IF NOT, CHECK IF THE NUMBER OF PAGES SPECIFIED WILL FIT IN THIS VIRTUAL MACHINE. IF NOT CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO026E. IF THIS IS OK, TURN ON THE RESERVE FLAG IN THE USERS VMBLOK. THEN GO TO STEP 9. 8. TURN OFF THE RESERVE FLAG IN THE VMBLOK. 9. RESET THE RESERVE FLAGS IN THE CORTABLE AND EXIT. SET RECORD 1. SETRECD - ROUTINE FOR THE SET RECORD REQUEST. IF RECORDING ALREADY ACTIVE, CALL DMKSCNRU TO GET THE RDEVBLOK ADDRESS FOR THE ACTIVE DEVICE. IF NOT ACTIVE JUST GO TO NEXT STEP. 2. SET UP FOR RETURN FRON THE SUBROUTINE LABELED TSTONOFF AND BAL R10 TO THAT ROUTINE. 3. IF RETURN FOR OFF, RESET THE IRMFLAGS IN THE RDEVBLOK AND CALL DMKFRET TO FRET THE IRMBLOK. THEN EXIT. 4. IF THE RETURN IS FOR 'CPU', CALL DMKMCIMS THEN EXIT. 5. IF RETURN FOR ON, CHECK IF IRM IS ACTIVE. IF NOT ,CALL DMKFREE TO OBTAIN STORAGE FOR AN IRMBLOK. IN ANY EVENT CLEAR THE IRMBLOK TO BINARY ZERO. 7. CALL DMKSCNFD TO GET THE NEXT ARGUMENT WHICH SHOULD BE A RADDR. IF ARGUMENT IS NOT FOUND, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO07. IF FOUND, CALL DMKCVTHB TO CONVERT THE ADDRESS TO BINARY. IF CONVERT FAILS, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO07. IF CONVERT IS GOOD CALL DMKSCNRU TO GET THE DEVICE BLOK ADDRESSES. IF CAN'T FIND, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO040E. 7. CALL DMKSCNFD TO GET THE NEXT ARGUMENT. IF NONE FOUND, GO TO STEP 14. IF ONE IS FOUND, CHECK THE ARGUMENT. IF ARGUMENT=LIMIT, GO TO STEP 8; FOR 'AND', GO TO STEP 9; FOR 'OR', GO TO STEP 10; FOR 'BYTE', GO TO STEP 11; FOR 'BIT', GO TO STEP 12; AND IF NONE OF THESE, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO003E. 8. BAL R10 TO STEP 13 TO GET THE 'NN' ARGUMENT. STORE THE LIMIT VALUE IN THE IRMBLOK AND GO TO STEP 7. 9. IF 'OR' HAS BEEN PREVIOSLY PROCCESSED, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO013E. ELSE SET THE 'AND' FLAG IN THE IRMBLOK AND GO TO STEP 7. 10. IF THE 'AND' OPTION HAS BEEN PREVIOSLY PROCCESSED, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO013E. ELSE SET THE 'OR' FLAG IN THE IRMBLOK AND GO TO STEP 7. 11. BAL R10 TO STEP 13 TO GET THE BYTE NUMBER. IF NO BYTES HAVE BEEN STORED, STORE THIS VALUE INTO IRMBYT1 OF THE IRMBLOK. IF THE SECOND BYTE ARGUMENT, STORE INTO IRMBYT2 OF THE IRMBLOK. THEN GO TO STEP 7. IF THIS IS THE THIRD REQUEST FOR A BYTE IN THE COMMAND LINE, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO003E. 12. BAL R10 TO STEP 13 TO GET THE BIT NUMBER. IF THIS IS THE FIRST BIT REQUEST, STORE THE VALUE INTO IRMBIT1 OF THE IRMBLOK. IF THE SECOND NUMBER, STORE IT INTO IRMBIT2 OF THE IRMBLOK. THEN GO TO STEP 7. IF THIS IS THE THIRD REQUEST IN THE COMMAND LINE, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO003E. 13. CALL DMKSCNFD TO GET 'NN' ARGUMENT. IF NO ARGUMENT FOUND, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO026E. IF FOUND, CALL DMKCVTDB TO CONVERT THE NUMBER TO BINARY. IF THE CONVERT FAILS, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO026E. IF GOOD CONVERT, RETURN ON REG. 10. 14. IF 'LIMIT' AND AT LEAST ONE 'BYTE/BIT' HAVE NOT BEEN PROCCESSED, CALL DMKERMSG TO SEND ERROR MESSAGE DMKCFO026E. IF OK, SET THE RECORD FLAG IN THE RDEVBLOK AND EXIT. SET SASSIST 1. SETSAS - ROUTINE TO PROCESS SET SASSIST . SET UP FOR RETURN FROM TSTONOFF ROUTINE, AND BAL R10 TO THAT RTN. 2. REMEMBER IF ON|OFF, SET DEFAULT EXIT = SETCOMP 3. IF WE ARE IN UP MODE, GO DIRECTLY TO STEP 7 3. SCAN FOR MORE PARAMETERS. IF NONE, DO 7 FOR BOTH PROCESSOR 4. IF THERE ARE MORE PARAMETERS, BYPASS 'PROC' IF SPECIFIED, TRY TO CONVERT PARAMETER TO BINARY. EXIT WITH DMKCFO003 ON ERROR 5. IF PARAMETER = OUR PROCESSOR ADDRESS, GO TO STEP 7 6. IF PARAMETER = OTHER PROCESSOR ADDRESS, STACK A CPEXBLOK TO RESUME ON THE OTHER PROCESSOR, ELSE EXIT WITH ERROR MESSAGE DMKCFO188. 7. IF OFF,TURN OFF CPMICON IN PSA IF ON, A) IF VM ASSIST IS AVAILABLE FOR THE PROCESSOR, TURN ON CPMICON, ELSE ISSUE DMKCFO184, ADDING OPTIONAL TEXT IF WE ARE IN AP MODE IF WE ARE IN UP MODE, EXIT. ELSE, WHEN BOTH PROCESSORS ARE TO BE SET, COMPARE PROC ADDR TO DETERMINE WHETHER OR NOT TO SWITCH AND REPEAT 7 A SECOND TIME SET CPASSIST 1. SETCPA - ROUTINE TO PROCESS SET CPASSIST. SET UP FOR RETURN FROM TSTONOFF ROUTINE, AND BAL R10 TO THAT RTN. 2. IF RETURN FOR OFF, TURN OFF CPASTON BIT IN PSA AND CHAIN THROUGH VMBLOKS, TURNING OFF THE CP ASSIST FLAG IN VMMCR6, EXITING WHEN BACK TO THE STARTING VMBLOK. 3. IF RETURN FOR ON, SEE IF CP ASSIST IS AVAILABLE ON THE COMPUTER. IF IT ISN'T, ISSUE MSG DMKCFO186E. IF IT IS AVAILABLE, TURN ON CPASTON BIT IN PSA AND CHAIN THROUGH VMBLOKS, TURNING ON THE CP ASSIST FLAG IN VMMCR6, EXIT AFTER RETURNING TO THE STARTING VMBLOK. SET MODE 1. CLEAR MESSAGE INDICATORS. 2. IF SET MODE MAIN, CALL DMKMCIMS. 3. IF SET MODE RETRY, SET THE RETRY MESSAGE SWITCH AND CALL DMKMCIMS. SET MAX 1. IF NO SECOND ARGUEMENT IS SPECIFIED, DEFAULT TO ZERO. OTHERWISE CALL DMKCVTDB TO CONVERT DECIMAL NUMBER TO BINARY. 2. STORE THE MAXIMUM NUMBER OF USERS ALLOWED ON THE SYSTEM
Calls to Other Routines
DMKSCNFD - LOCATE ARGUMENTS IN THE COMMAND LINE DMKQCNWT - TO OUTPUT MESSAGES TO TERMINAL DMKSCNAU - TO FIND USERS VMBLOK ADDRESS DMKCVTBH - TO CONVERT BINARY TO HEX DMKCVTDB - TO CONVERT DECIMAL TO BINARY DMKCVTHB - TO CONVERT HEX TO BINARY DMKSCNRU - TO GET RDEVBLOK ADDRESS DMKSCNRA - TO GET THE DEVICE ADDRESS IN CCU FORM DMKFREE - TO OBTAIN A BLOCK OF FREE STORAGE DMKFRET - TO RETURN A BLOCK OF STORAGE DMKQCNRD - TO READ A RESPONSE FROM THE TERMINAL DMKCVTDT - TO GET THE DATE AND TIME DMKSTKIO - TO STACK A TIMER REQUEST BLOK (TRQBLOK) DMKSTKOP - TO RESUME EXECUTION ON THE OTHER PROCESSOR (AP) DMKMCIMS - TO ENABLE MACHINE CHECK RECORDING GPR2 - MESSAGE INDICATOR DMKERMSG - TO SEND AN ERROR MESSAGE DMKSCHRT - TO FREE A TIMER REQUEST BLOK