Type ASSEMBLE
Source Lines : 1,803
Fixes Applied : 6
Most Recent Version : Tuesday, December 12, 1978
Last Fix ID : [R15315DS]
Module
DMSXCP ( EXCP ROUTINE )
Function
PROVIDE THE FACILITY TO SIMULATE THE DOS/VS EXCP (SVC 0) UNDER THE CMS/DOS ENVIRONMENT. EXCP (EXECUTE CHANNEL PROGRAM) REQUESTS THE INITIATION OF AN I/O OPERATION TO A SPECIFIC LOGICAL UNIT.
Attributes
CMSDOS SEGMENT RESIDENT MODULE REENTRANT
Operation
1. SET UP NECESSARY ADDRESSABILITIES AND SAVE SOME REGISTERS IN THE EXCP WORK AREA. CHECK IF THE SPECIFIED CCW ADDRESS IN THE CCB IS NOT ZERO. 2. DETERMINE IF THE SPECIFIED LOGICAL UNIT IN THE CCB IS ASSIGNED. IF IT IS ASSIGNED, USE THE PUB DEVICE TYPE TO INDEX AND BRANCH TO THE ONE INTERNAL ROUTINE THAT WILL PROCESS THAT SPECIFIC DEVICE. IF THE LOGICAL UNIT IS ASSIGNED TO IGNORE, ANOTHER ROUTINE IS GIVEN CONTROL. 3. LOGICAL UNIT ASSIGNED TO 'IGNORE'. VERIFY THAT ALL THE CCW'S SPECIFIED ARE VALID. SEARCH THROUGH CCW CHAIN LOOKING FOR ANY READS. IF NO READ CCW IS FOUND, THE CCB IS POSTED WITH THE NORMAL C.E. + D.E. . IF A READ CCW IS FOUND, ASIDE FROM THE NORMAL C.E. + D.E., THE CCB IS POSTED FOR EOF. 4. LOGICAL UNIT ASSIGNED TO 'PRINTER'. A 4 DOUBLE WORD WORK AREA IS ACQUIRED FROM FREE STORAGE TO BUILD THE DMSPIOSI PLIST. THE PLIST IS INITIALIZED WITH THE COMMAND NAME AND THE BUFDATA POINTER. THE FIRST USER CCW IS MOVED TO 'BUFDATA', AND A NO-OP CCW IS MOVED AFTER IT. IF THE CCW IS CHAINED, AN INTERNAL FLAG IS SET TO REMEBER THERE ARE MORE CCW'S TO EXECUTE. IF CCW IS NOT CHAINED, IT IS CHAINED TO THE NO-OP CCW. AN SVC 202 IS MADE TO DMSPIOSI TO EXECUTE THIS CCW. UPON RETURN, IF THERE ARE MORE CCWS, THE OPERATION IS REPEATED AS BEFORE. OTHERWISE, THE CCB IS POSTED ACCORDINGLY. 5. LOGICAL UNIT ASSIGNED TO 'READER' OR 'PUNCH'. CHECK IF CCW CODE IS VALID. TURN STACKER SELECT AND DATA MODE BITS OFF (IF ON) AND PASS CCW CODE THROUGH TABLE OF SUPPORTED CCWS. ONCE A MATCH IS FOUND (WILL MATCH ON READ, WRITE, OR NO-OP), THE PLIST FOR DMSCIO IS BUILT, AND AN SVC 202 IS MADE TO CARDRD OR CARDPH (READ OR WRITE) TO PERFORM THE I/O OPERATION. UPON RETURN (OR IF THE CCW IS TO BE NO-OPED), IF THE CCW IS CHAINED, THE OPERA- TION IS REPEATED AS BEFORE. OTHERWISE, THE CCB IS POSTED ACCORDINGLY. 6. LOGICAL UNIT ASSIGNED TO 'TERMINAL'. CHECK IF CCW CODE IS VALID BY PASSING CCW THROUGH A TABLE OF SUPPORTED CCWS. ONCE A MATCH IS FOUND (WILL MATCH ON READ, WRITE, OR NO-OP), THE PLIST FOR DMSCRD OR DMSCWR IS BUILT. IF READING, A 160 BYTE BUFFER IS ACQUIRED FROM FREE STORAGE TO HOLD THE INPUT LINE. AN SVC 202 IS ISSUED TO CONREAD OR TYPLIN TO PERFORM THE I/O OPERATION. UPON RETURN, IF THE CCW IS CHAINED, THE OPERATION IS REPEATED AS BEFORE. OTHERWISE, THE CCB IS POSTED ACCORDINGLY. IF A READ WAS ISSUED, THE NUMBER OF BYTES SPECIFIED IN THE CCW ARE MOVED TO THE USER'S BUFFER. THEN THE ACQUIRED FREE STORAGE AREA IS FREED. 7. LOGICAL UNIT ASSIGNED TO 'TAPE'. THE VIRTUAL DEVICE ADDRESS IS DECODED INTO A HEX ( EBCDIC ) REPRESENTATION FOR ANY POSSIBLE ERROR MESSAGE SUBSTITUTION. TWO DUMMY CCWS (MODESET AND TIC) ARE MOVED TO THE EXCP WORK AREA. A TEST IS MADE TO DETERMINE IF THE PUB CONTAINS A MODE SET VALUE. IF NOT, THE DEFAULT VALUE X'B3' IS USED. THE USER CCW CHAIN ADDRESS IS STORED INTO THE ADDRESS PORTION OF THE TIC CCW AND A CALL IS MADE TO DIAGNOSE THE CCW CHAIN TO CP. RETURN IS ONLY MADE IF AN I/O ERROR IS RETURNED BY CP (EXCLUDING UNIT EXCEPTION OR INCORRECT LENGTH). IF AN I/O ERROR OCCURED, THE SENSE BYTES ARE TESTED TO DIFFERENTIATE BETWEEN FILE PROTECTED TAPE OR I/O ERROR. OTHERWISE, THE CCW IS POSTED ACCORDINGLY. 8. LOGICAL UNIT ASSIGNED TO 'DISK'. FIRST A CHECK IS MADE TO DETERMINE IF I/O IS TO CMS FORMATTED DISK, OR TO O/S OR DOS FORMATTED DISK. IF THE I/O IS TO A CMS FORMATTED DISK, THE CCW IS CHECKED FOR VALIDITY. IF THE CCW IS 'TIC', THE NEXT CCW IN THE CHAIN IS PROCESSED. IF THE CCW IS VALID AND NOT 'TIC', THE CCW IS PASSED THROUGH THE TABLE OF SUPPORTED CCW CODES. ONCE A MATCH IS FOUND, CONTROL WILL PASS TO THE ROUTINE TO PROCESS THAT CCW CODE. SUPPORTED CCW CODES UNDER CMS/DOS ARE: READ DATA, WRITE DATA, SEARCH ID, WRITE COUNT KEY & DATA, READ COUNT KEY & DATA, READ KEY AND DATA, AND READ COUNT. ALL OTHER VALID CCWS ARE NO- OPED. ONCE THE CCW HAS BEEN PROCESSED SUCCESSFULLY, A CHECK IS MADE TO DETERMINE IF THE CCW IS CHAINED. IF SO, THE NEXT CCW IS PROCESSED AS BEFORE, OTHERWISE, THE CCB IS POSTED ACCORDINGLY. IF THE DISK IS NOT A CMS FORMATTED DISK, A CHECK IS MADE TO DETERMINE IF THE DISK IS O/S OR DOS FORMATTED. THE CCW CHAIN IS THEN PASSED THROUGH A TEST TO FIND OUT IF THERE ARE ANY WRITE CCWS. IF A WRITE CCW IS FOUND, THE DISK IS CHECKED FOR WRITE MODE. IF THE DISK IS R/O THE CHANNEL PROGRAM IS NOT EXECUTED. NOW, THE CHANNEL PROGRAM IS DIAGNOSED TO CP FOR EXECUTION. UPON RETURN FROM THE CP DIAGNOSE, THE CCB IS POSTED ACCORDINGLY.
Calls to Other Routines
DMSFRE, DMSPIO, DMSCIO, DMSCRD, DMSCWR DMSBRD, DMSBWR, DMSFNS, DMKGIO, DMSERR