Table of Contents

DMSTPE Abstract

Statistics

Type ASSEMBLE
Source Lines : 1,885
Fixes Applied : 7
Most Recent Version : Tuesday, December 12, 1978
Last Fix ID : [HRC002DS]

Synopsis

Module

       DMSTPE (TAPE)

Function

       TAPE COMMAND. TO PERFORM CERTAIN TAPE FUNCTIONS, I.E.
       DUMP A CMS FILE, LOAD A CMS FILE, SET TAPE MODE, SCAN,SKI
       REW, RUN, FSF, FSR, BSF, BSR, ERG, AND WTM

Attributes

       TRANSIENT, REFRESHABLE, CALLED VIA SVC 202

Operation

       1.  TAPE LOOKS FOR AN OPTIONS LIST.  IF IT FINDS ONE, IT THEN
           PROCESSES EACH ONE BY SETTING A FLAG IN OPTBYTE OR
           CHANGING THE ENTRIES IN THE TAPEIO PARAMETER LIST.

       2.  AFTER ALL OPTIONS HAVE BEEN PROCESSED(IF ANY), IT FINDS
           THE MODESET BYTE IN THE DEVICE TABLE FOR THE SYMBOLIC TAPE
           UNIT SPECIFIED IN THE TAPEIO PARAMETER LIST.  IF THE
           USER HAS SPECIFIED A MODESETB(NOW IN THE TAPEIO PARAMETER
           LIST) IT IS STORED IN THE APPROPRIATE PLACE IN THE DEVICE
           TABLE.  IF NOT, THE MODESET BYTE FROM THE DEVICE TABLE IS
           STORED IN THE APPROPRIATE SLOT OF THE TAPEIO PARAMETER
           LIST.
       THE SAVING OF THE MODE SETTING BETWEEN
       COMMANDS  OCCURS ONLY IF TAPES WITH VIRTUAL ADDRESS
       IN RANGE OF 180-187, 288-28F (TAP0-TAP7, TAP8-TAPF) ARHRC002DS

       3.  TAPE LOOKS FOR THE FUNCTION THE USER WANTS PERFORMED.

       DUMP -
       1.  FSTLKP IS CALLED TO FIND THE FILE TO BE DUMPED.  IF IT IS
             FOUND, 'HX' IS PREVENTED AND IT'S FST IS ALTERED TO INDI
           CATE A FIXED LENGTH FILE WITH A RECORD LENGTH OF 800
           BYTES.  THEN EACH RECORD IS READ(VIA RDBUF) AND WRITTEN
           ONTO TAPE(VIA TAPEIO) UNTIL EOF IS REACHED.

       2.  AT EOF, THE REAL FST IS WRITTEN AND A CHECK IS MADE TO SEE
           IF THE USER WANTS TO WTM.  IF SO, ONE IS WRITTEN.  THEN
           2 WTM ARE WRITTEN(VIA TAPEIO) AND BACKSPACED OVER.

       3.  A CHECK IS MADE TO SEE IF * WAS ENTERED FOR FILENAME,
           FILETYPE OR FILEMODE.  IF SO 1. IS REPEATED.  ELSE RETURN.

       LOAD, SCAN, SKIP(AS INDICATED BY THE SETTING OF A SWITCH)
           FOR SCANNING OR SKIPPING THE TAPE,
       1.  THE TAPE IS READ(VIA TAPEIO) UNTIL THE NAME OF THE FILE
           ENCOUNTERED.  IF A FILID HAD BEEN ENTERED, IT IS
           COMPARED WITH THAT ON THE TAPE FOR A MATCH.
           FOR LOADING A FILE, EACH RECORD IS READ
           (VIA TAPEIO) AND WRITTEN INTO A TEMPORARY FILE(TAPE
           CMSUT1) VIA WRBUF.  *WHEN THE LAST RECORD IS READ, THE
           FILEID (IF GIVEN) IS CHECKED, AND IF MATCH, THE
           FILE STATUS TABLE AND THE USERS FILE DIRECTORY ARE UPDATED

       2.  IF THE FILENAME AND FILETYPE MATCHED THE ONE SPECIFIED
           BY THE USER, RETURN.  IF NOT CONTINUE WITH 1.

       3.  ON EOF, CHECK TO SEE IF THE USER SPECIFIED EOFN.  IF SO,
           SEE IF THE NUMBER OF EOF MARKS HIT EQUALS THE NUMBER
           SPECIFIED.  IF SO RETURN.  IF NOT SEE IF THE USER
          SPECIFIED EOT. IF NOT, RETURN. IF SO, CHECK
           FOR 2 CONSECUTIVE TAPE MARKS; IF FOUND, STOP.
           IF ONLY ONE TAPE MARK, CONTINUE AT STEP 1.


       REW,RUN,ERG,WTM,FSF,FSR,BSF,BSR -
       1.  THE FUNCTION IS MOVED INTO THE TAPEIO PARAMETER LIST.

       2.  TAPEIO IS CALLED 'N' TIMES TO PERFORM THE FUNCTION.

Calls to Other Routines

       TYPLIN - TYPE A LINE ON THE TERMINAL
       PRINTIO - PRINT A LINE ON THE PRINTER
       WRBUF - WRITE A FILE ON THE DISK
       RDBUF - READ A FILE FROM THE DISK
       FINIS - CLOSE A FILE ON THE DISK
       ERASE - ERASE A FILE ON THE DISK
       FSTLKP - FIND THE FILE STATUS TABLE FOR A FILE
       UPDISK - UPDATE THE USER'S FILE DIRECTORY
       TAPEIO - PHYSICALLY PERFORMS THE TAPE FUNCTION REQUESTED
       KILLEX - IF 'KX' IS ENTERED