
      HED TABLE AND ERROR MESSAGES
      ORG 16000B
* 
SAT   EQU *         SWAP AREAS TABLE
*                                    EACH ENTRY IS 2 WORDS LONG 
*                                    CONSISTING OF THE DISC ADDRESS 
*                                    ALLOCATED FOR A SWAP AREA
TRKTB BSS 64        TABLE OF DISC ADDRESSES 
*                                    ALLOCATED FOR SWAP AREAS 
* 
      SUP 
DIRBF DEC 0,0,0,0,0,-1,0,-1,0,0,0,0 
      DEC -1,-1,-1,-1,0,-1,0,-1,0,0,0,0 
LBRY  OCT 6412
      ASC 5,LIBRARY?
ILIN  OCT 5111
      ASC 6,LLEGAL INPUT
      OCT 6400
MTSC  OCT 5115
      ASC 11,AG TAPE SELECT CODE? 
SYID  OCT 5123
      ASC 11,YSTEM IDENTIFICATION?
DISMD OCT 5104
      ASC 10,ISC MODIFICATIONS? 
RQSTD OCT 5102
      ASC 8,EGIN WITH 'DISC'
      OCT 6400
BDDL  OCT 5102
      ASC 6,AD DELIMITER
      OCT 6400
DZMS  OCT 5104
      ASC 11,ISC 0 MUST BE IN 15,0
      OCT 6400
ILSCD OCT 5111
      ASC 9,LLEGAL SELECT CODE
      OCT 6400
ILUN  OCT 5111
      ASC 9,LLEGAL UNIT NUMBER
      OCT 6400
DZMBP OCT 5104
      ASC 11,ISC 0 MUST BE PRESENT
AASM  OCT 5104      LF D
      ASC 2,ISC 
AADN  BSS 1 
      ASC 7, NOT PRESENT, 
DAIV  OCT 5104
      ASC 9,ISC ALREADY IN USE
      OCT 6400
LUML  OCT 6412
      ASC 12,MLOCK OR MUNLOCK COMMAND 
      ASC 2,S?
MNBPT OCT 5116
      ASC 8,UMBER OF PORTS? 
COPT  OCT 5103
      ASC 11,ONFIGURATION OPTIONS?
NDIT  OCT 5116
      ASC 18,UMBER OF DIRECTORY TRACKS PER DISC?
NID   OCT 5116
      ASC 10,UMBER OF ID TRACKS?
BDLBL OCT 5104
      ASC 5,ISC NUMBER
DIS#  BSS 1 
      ASC 11, NOT LABELED FOR TSB,               [B]
DYWLD EQU * 
      OCT 6412
      ASC 12,DO YOU WANT IT LABELED?
LBDOS OCT 6412
      ASC 11,(NOW LABELED FOR DOS)
EOTM  OCT 5105
      ASC 5,ND OF TAPE
      OCT 6400
CHKSM OCT 5103
      ASC 7,HECKSUM ERROR 
      OCT 6400
DATER OCT 5104
      ASC 3,ATE?
ILDTE OCT 5111
      ASC 6,LLEGAL DATE 
      OCT 6400
TIMER OCT 5124
      ASC 3,IME?
ILTIM OCT 5111
      ASC 6,LLEGAL TIME 
      OCT 6400
MTBDO OCT 5102
      ASC 6,AD DATE ORDER 
      OCT 051015    R - CR
      OCT 6400
EOFM  OCT 5125
      ASC 12,NEXPECTED END OF FILE, 
TAPER OCT 5124
      ASC 10,APE CANNOT BE READ,
LABOR ASC 9,LOAD/DUMP ABORTED 
      OCT 6412
SYSD  OCT 5111      LF I
      ASC 18,NSUFFICIENT TABLE SPACE ALLOCATED, 
SYSL  OCT 5123
      ASC 12,YSTEM LIBRARY OVERFLOW,
WEOOM OCT 5117
      ASC 9,UT OF DISC SPACE, 
BADAD OCT 5111
      ASC 7,LLEGAL ADDRESS
      OCT 6400
BADD  OCT 5102
      ASC 11,AD LOGICAL UNIT NUMBER 
      OCT 6400
IVBN  OCT 5111
      ASC 10,NVALID BLOCK NUMBER
LBTF  OCT 5114
      ASC 12,OCKED BLOCKS TABLE FULL
DONEM OCT 6412
      ASC 2,DONE
      OCT 6412
TAPMS OCT 5124
      ASC 4,APE BAD 
      OCT 6412
TTSM  OCT 5106      LF - F
      ASC 9,IRST TAPE TOO SHORT 
      OCT 52015     T - CR
VRFY  OCT 5126
      ASC 4,ERIFY?
MTAE  EQU * 
      OCT 5124      LF - T
      ASC 5,APE ERROR 
MTAEV BSS 6 
      ASC 2, LOS
      OCT 52015     T - CR
MTASA OCT 5125      LF - U
      ASC 10,NRECOVERED ENTRIES.
      ASC 12, ANOTHER SET AVAILABLE?
MFEN  EQU * 
      OCT 5012      LF - LF 
      ASC 14,FOLLOWING ENTRIES NOT FOUND: 
      OCT 6412      CR - LF 
MRIE  OCT 5116      LF - N
      ASC 6,O ROOM FOR
MRIDS BSS 6 
      OCT 6400
MTDEM BSS 6                                      [B]
      ASC 4, DELETED
FLW   OCT 6412      CR - LF 
      ASC 20,____ MAY CONTAIN FEATURES NOT SUPPORTED
      ASC 7,ON THIS SYSTEM
FLWF  ASC 10, (       VS       )
FLWD  OCT 6412
      ASC 14,DO YOU TAKE RESPONSIBILITY?
STAPE ASC 2,TAPE                                 [B]
SDISC ASC 2,DISC                                 [B]
ILSL  OCT 5111      LF - I
      ASC 10,LLEGAL SYSTEM CODE,
      UNS 
      SPC 3 
* 
*  CHECK FOR PAGE OVERFLOW
* 
      LDA 16000B                                 [B]
      HED SLEEP ROUTINE 
      ORG 20000B
* 
* 
*         SLEEP ROUTINE 
* 
*         THIS SECTION OF THE SLEEP ROUTINE IS CALLED AFTER 
*     THE SYSTEM LIBRARY SLEEP ROUTINE HAS REMOVED THE USERS. 
*         THIS SECTION USES THE EQT TABLE, DIREC & TTY TABLE IN CORE
*     TO RESTORE THE CURRENT SYSTEM TO THE DISCS. 
*         THE NON-SLEEP RELOAD ( RESUSITATION ) ENTERS HERE 
*     AND LIKEWISE FINISHES THE SLEEP PROCESS.
* 
* 
SLDM  EQU * 
      STA RSLFL     SET SLEEP/HIBERNATE FLAG
      CLA 
      STA MBUSY     CLEAR DISC DRIVER FLAG
      STA SLEPT     SAY SYSTEM SLEPT WHEN 
*                                     THE EQT IS WRITTEN OUT
      LDA GMQBQ     CHANGE BACK TO PROPER 
      STA GMQBP       MESSAGE QUEUE BUFFER GETTER 
      JSB JDSEQ,I   INITIALIZE INTERRUPT LOCATIONS
* 
*     WRITE OUT THE DIREC TABLE 
* 
      DLD MLTBF 
      STA MWORD 
      LDA QDMF2 
      STA DSERA,I   SET DISC ERR FLAG NON-ZERO
      JSB DISCQ,I 
      RSS           DISC WRITE OK 
      JMP SLDER,I   DISC WRITE ERROR
* 
*     WRITE LATEST EQUIPMENT TABLE TO DISC
* 
      DLD MLTBE     WRITE OUT 
      STA MWORD       THE EQT SEGMENT 
      LDA QDME2 
      STA DSERA,I   SET DISC ERR FLAG NON-ZERO
      JSB DISCQ,I 
      RSS           DISC WRITE OK 
      JMP SLDER,I   DISC WRITE ERROR
      HED MAG TAPE DUMP 
* 
*  IF THE MAG TAPE SELECT IS NON-ZERO, TSB IS DUMPED TO TAPE. 
*  ON MAG TAPE FAILURES (HLT 11B) THE DUMP OF THE CURRENT 
*  TAPE MAY BE RETRIED BY CORRECTING THE CAUSE OF THE ERROR AND 
*  PRESSING RUN.
* 
MTDMP EQU * 
      CLA 
      STA SDFLG     NOT SELECTIVE DUMP
      LDA MAGSC     CHECK THE MAG TAPE SELECT CODE
      SZA,RSS         FOR MAG TAPE SLEEP
      JMP MTDM8     NO
      JSB MTDIP,I   YES, CONFIGURE MAG TAPE DRIVERS 
* 
* 
MTDM1 EQU * 
      LDA MTSNR 
MDSE  EQU * 
      STA TSV1R     SET FAKE RETURN ADDRESS 
      LDA QM10      SET COUNTER FOR              [B]
      STA DSECT       SOFT DISC FAILURES         [B]
      CLA 
      STA LEOS      END OF SET FLAG _ FALSE 
      CLA,INA       SET THE REEL NUMBER 
      STA TLABL+TLRN   TO ONE 
      LDA YEAR
      STA TLABL+TLYR  SET YEAR, 
      LDA DATE
      STA TLABL+TLD1    HOUR OF YEAR, 
      LDA TIME
      STA TLABL+TLD2      AND TENTHS OF SECONDS 
      DLD TLRT+TLSL COPY SYSTEM LEVEL & FEATURE 
      DST TLABL+TLSL  CODES FOR THE DUMP
      JMP TENWS     INITIALIZE FIRST REEL 
* 
MTSNR DEF *+1 
      LDA VTBL1     SET VERIFY BUFFER            [B]
      STA VTBLA       AT 54000B                  [B]
*                          *
**  DUMP EQUIPMENT TABLE  **
*                          *
      LDA EQTLM     WRITE 
      LDB DDIRA       EQUIPMENT 
      JSB MTWR          TABLE TO TAPE 
      JSB EOTCH     CHECK FOR END OF TAPE 
* 
*     DUMP THE DIREC TABLE
* 
      LDA DICLN     = LENGTH
      LDB DICPT     => DIREC TABLE
      JSB MTWR      WRITE IT OUT
      JSB EOTCH     CHECK FOR END OF TAPE 
      SKP 
*                   * 
**  DUMP ID TABLE  ** 
*                   * 
      LDA QD4       SET INCREMENT = 4 
      STA INCR        FOR IDEC TABLE
      LDA IDEC1     => FIRST DISC ADDRESS 
      STA FDAD        IN IDEC TABLE 
      ADA QD2       => FIRST LENGTH WORD IN IDEC TBL
      LDB IDECL     => LAST LENGTH WORD+INCR IN IDEC
      JSB CMIDR 
*                           * 
**  DUMP DIRECTORY TRACKS  ** 
*                           * 
      LDA QD7       SET INCREMENT = 7 
      STA INCR        FOR DIREC 
      LDA DICPT     => FIRST
      ADA QD5         DISC ADDRESS
      STA FDAD          IN DIREC
      LDA DICPT     => FIRST LENGTH WORD IN DIREC 
      LDB DIRUQ     =>LAST LENGTH WORD+INCR IN DIREC
      JSB CMIDR     WRITE OUT THE DIRECTORY 
*                 * 
**  DUMP SYSTEM  ** 
*                 * 
* 
*  THE SYSTEM IS READ INTO CORE IN ITS ENTIRETY.  IT IS DUMPED IN 
*  SEGMENTS AS DEFINED IN THE SYSTEM SEGMENT INFORMATION TABLE. 
* 
      LDA MTBLN     WRITE SYSTEM
      LDB MLTBA       SEGMENT TABLE 
      JSB MTWR          TO TAPE 
      JSB EOTCH     CHECK FOR END OF TAPE 
      LDA MLTBA,I   SET SEGMENT 
      STA DTMP0         COUNTER 
      LDA MLTBA     SET TABLE 
      INA 
MTDM6 EQU * 
      STA DTMP1       POINTER 
      LDA DTMP1,I   A= - WORD COUNT 
      LDB ADTBR     B=> BUFFER IN CORE
      STA MWORD 
      LDA DTMP1 
      ADA QD2       A => DISC ADDRESS 
      JSB DISCQ,I   READ IN SEGMENT 
      LDA DTMP1,I 
      LDB ADTBQ 
      JSB MTWR      WRITE SEGMENT TO TAPE 
      JSB EOTCH     CHECK FOR END OF TAPE 
      LDA DTMP1     ADVANCE POINTER TO
      ADA QD4         THE NEXT SEGMENT
      ISZ DTMP0     MORE SEGMENTS?
      JMP MTDM6     YES 
      SKP 
*                         * 
**  DUMP SYSTEM LIBRARY  ** 
*                         * 
* 
*  THE SYSTEM LIBRARY IS DUMPED ONE PROGRAM AT A TIME.  AN
*  END-OF-FILE MARK FOLLOWS THE LAST ONE. 
* 
      DLD DSLLC     GET DISC ADDRESS
      DST DTMP2       OF SYSTEM LIBRARY 
      LDB QM512 
      STB MWORD     READ IN 
      LDB ADTBR       THE SYSTEM
      LDA DT2P          LIBRARY 
      JSB DISCQ,I         LENGTH TABLE
      LDA ADTBQ,I   GET COUNT OF ENTRIES
      STA DTMP0       IN LENGTH TABLE 
      LDB ADTBQ     SET INITIAL POINTER 
      STB DTMP1       TO LENGTH TABLE 
MTDM7 EQU * 
      LDB DTMP1,I   GET THIS ENTRIES LENGTH 
      STB MWORD 
      LDA DT2P      READ THE
      LDB DTRKR       SYSTEM LIBRARY
      JSB DISCQ,I       PROGRAM FROM THE DISC 
      LDA MWORD     GET LENGTH AND
      LDB DTRKB       CORE ADDRESS
      JSB MTWR          AND WRITE IT TO TAPE
      JSB EOTCH     CHECK FOR END OF TAPE 
      ISZ DTMP1     ADVANCE LENGTH POINTER
      LDA MWORD     GET THE LENGTH
      CCB 
      ASR 8           AND CONVERT TO NEGATIVE SECTORS 
      CMA,CLE,INA   ADVANCE THE DISK
      ADA DTMP3       ADDRESS TO THE
      STA DTMP3         BEGINNING OF
      SEZ                 THE NEXT SYSTEM 
      ISZ DTMP2             LIBRARY PROGRAM 
      ISZ DTMP0     DONE? 
      JMP MTDM7     NO
MTKD  EQU * 
      JSB MTWF      YES, WRITE EOF MARK 
      JSB TENCH       AND CHECK FOR END OF TAPE 
      SKP 
*      SECTION TO DUMP THE USER LIBRARY ONTO MAG TAPE 
* 
*      THE DTMP WORDS MUST CONTAIN STATUS INFORMATION 
* SUFFICIENT TO RESTART THE MAG TAPE DUMP AT ITS
* CURRENT POSITION WHENEVER TENCH IS CALLED.
* TENCH SAVES ONLY THOSE VARIABLES AND EXPECTS
* THAT BY RESTORING THEM A VERIFY PASS MAY BE RUN 
* THAT WILL WRITE EXACTLY THE SAME DATA AS THE
* WRITE PASS. 
* 
* 
      LDA VTBL2     SET VERIFY BUFFER 
      STA VTBLA       AT 44000B 
      CLA 
      STA QDIPT     INITIALIZE BLOCK IN CORE WORD 
      LDA DICPT     GET POINTER TO
      STA DTMP0       FIRST DIREC ENTRY 
      LDA IDTBQ     POINTER TO THE FIRST ENTRY
      STA DTMP1 
MTKBB EQU * 
      LDA DTMP0 
      JSB QDIRD     ASSURE PROPER DIR TRACK IN CORE 
      LDA DTMP1     => CURRENT DIR ENTRY
      STA MOVES     SET AS MOVE SOURCE
      LDA ADTBQ 
      STA MOVED 
      LDB QM12      MAKE A COPY OF THE DIR ENTRY
      JSB MOVEW       AT THE BEGINNING OF THE FILE
      LDA DTMP1 
      STA MOVES 
      LDA SVIDA     SAVE ID & FILENAME           [B]
      STA MOVED       IN SAVE AREA
      LDB QM4           IN CASE OF
      JSB MOVEW           DISC ERROR
* 
      DLD ADTBL+8   GET THE DISC ADDRESS
      DST DTMP2     SAVE IN THE DTMPS 
      LDA ADQ11,I   GET LENGTH
      SZA,RSS       FORGET ENTRY IF LENGTH ZERO,
      JMP MTKBY       IT'S A PSEUDO ENTRY 
      STA DTMP4     SAVE THE LENGTH 
      LDA SDFLG     CHECK FOR SELECTIVE DUMP
      SZA,RSS 
      JMP MTKBF     NO, REGULAR SLEEP OR HIB
      LDA ADQ10,I   GET THE FLAG WORD 
      SZA 
      JMP MTKBH     FLAGGED TO BE DUMPED
      LDA ADTBQ,I   CHECK THE ID IF NOT FLAGGED 
      JSB EFIDQ,I 
      JMP MTKBY     ID NOT IN TABLE 
      JMP MTKBH     ID IN TABLE, DUMP FILE
* 
*      CHECK FOR SLEEP.  IF SLEEP CHECK THE LAST CHANGE DATE
* 
MTKBF EQU * 
      LDA RSLFL 
      SSA           SKIP IF SLEEP OR RESUSITATION 
      JMP MTKBH     OTHERWISE, HIBERNATE EVERYTHING 
* 
      LDA HDATE     GET LAST HIB DATE 
      SZA,RSS 
      JMP MTKBH     NEVER BEEN HIBERNATED 
      CMA,INA 
      ADA ADQ6,I    COMPARE TO LAST CHANGE DATE 
      STA QTMP0     SAVE RESULTS
* 
* WE MUST CHECK TO SEE ABOUT THE DECEMBER TO JANUARY
* TRANSITION. 
* 
      LDA ADQ6,I    GET LAST CHANGE DATE
      SZA,RSS 
      JMP MTKBH     NEVER BEEN HIBERNATED 
      CMA,INA 
      ADA DATE      COMPARE TO THE CURRENT DATE 
      LDB HDATE     DETERMINE IF AN 
      CMB,INB         END-OF-YEAR 
      ADB DATE          SITUATION IS EXTANT 
      SSB 
      JMP *+3 
      IOR QTMP0     DATE-HDATE >= 0 
      RSS 
      AND QTMP0     DATE-HDATE < 0
      SSA 
      JMP MTKBY     ENTRY IS ON THE LAST HIBERNATE TAPE 
* 
MTKBH EQU * 
      JSB MTKBL     CALCULATE THE WORD COUNT
      LDA DT2P      => DISC ADDRESS 
      LDB ADQ12     CORE ADDRESS FOR APPEND 
      STA DSERA,I   SET DISC ERR FLAG NON-ZERO
      JSB DISCQ,I   READ IN THE FIRST BLOCK 
      JMP *+3       OK                           [B]
      JSB DSER      DISC ERROR                   [B]
      JMP MTKBY     FORGET LIBRARY ENTRY         [B]
      LDA QM12      GET THE WORD COUNT
      ADA MWORD 
      JMP MTKBR     AND WRITE TO TAPE 
* 
*     MAIN WRITE LOOP 
* 
MTKBJ EQU * 
      JSB MTKBL     CALCULATE WORD COUNT
      LDA DT2P      => DISC ADDRESS 
      LDB ADTBR 
      STA DSERA,I   SET DISC ERR FLAG NON-ZERO
      JSB DISCQ,I   READ IN THE RECORDS 
      JMP *+3       OK                           [B]
      JSB DSER      DISC ERROR                   [B]
      JMP MTKBV     WRITE PREMATURE EOF          [B]
      LDA MWORD     GET THE WORD COUNT
MTKBR EQU * 
      LDB ADTBQ       AND ADDRESS 
      JSB MTWR          FOR THE TAPE WRITE
      JSB TENCH     CHECK FOR END OF TAPE 
* 
      LDA DTMP3     ADVANCE 
      CLE             THE DISC
      ADA QD4           ADDRESS 
      STA DTMP3 
      SEZ 
      ISZ DTMP2 
      LDA DTMP4     GET THE LENGTH
      SSA           SKIP IF BLOCK COUNT 
      JMP MTKBT 
      ADA QM4       SUBTRACT ONE TAPE RECORD
      SZA 
      SSA 
      JMP MTKBV     JUMP OUT WHEN DONE
      STA DTMP4     NOT DONE, STORE NEW SIZE
      JMP MTKBJ     CONTINUE
MTKBT EQU * 
      ADA QD1K      SUBTRACT ONE TAPE RECORD
      STA DTMP4 
      SSA           SKIP WHEN DONE
      JMP MTKBJ 
MTKBV JSB MTWF      WRITE A FILE MARK AT THE END
      JSB TENCH     CHECK FOR END OF TAPE 
MTKBY EQU * 
      LDA DTMP0,I   GET THE LENGTH OF THIS
      CMA,INA       DIRECTORY TRACK 
      ADA IDTBQ 
      LDB DTMP1     ADVANCE TO THE NEXT 
      ADB QD12        DIRECTORY ENTRY 
      STB DTMP1 
      CPB A         SEE IF ENTIRE TRACK USED
      RSS 
      JMP MTKBB     NO, TRY NEXT ENTRY
      LDA IDTBQ     SET NEW BEGIN ADDRESS 
      STA DTMP1 
MTKBZ EQU * 
      LDA DTMP0     GET POINTER TO DIREC
      ADA QD7       AND ADVANCE IT TO THE 
      STA DTMP0     NEXT ENTRY
      CPA DIRUQ     ARE WE DONE?
      JMP QEOT      YES!
      LDA A,I       GET LENGTH OF THIS TRACK
      SZA           SKIP IF NO ENTRIES ON TRACK 
      JMP MTKBB     ELSE, GO PROCESS NEXT ENTRY 
      JMP MTKBZ     TRY NEXT DIRECTORY TRACK
QEOT  EQU * 
      JSB MTWF      WRITE AN EXTRA FILE MARK
      CCA 
      STA QEOTF,I   FAKE AN END OF TAPE 
      STA LEOS      SET END OF SET FLAG 
      JSB TENCH     GO TEST END OF TAPE 
      SKP 
MTDM8 EQU * 
      LDA QD8       PRINT 
      LDB DONEA       'DONE'
      JSB TT35Q,I 
      LDA SDFLG     CHECK FOR SELECTIVE LOAD
      SZA 
      JMP RLDDQ,I   ASK QUESTION AGAIN IF SO
      HLT 77B       ALLOW NEW DUMP
      JMP MTDMP       ON "RUN"
      SPC 3 
*                                              *
**  ROUTINE TO WRITE OR VERIFY A TAPE RECORD  **
*                                              *
MTWR  NOP           WRITE OR VERIFY RECORD
      DST MTEMP     SAVE BUFFER LENGTH & ADDRESS
      LDA MTVFL     ARE WE
      SZA,RSS         VERIFYING?
      LDB VTBLA     YES, GET THE RIGHT BUFFER ADDRES
      LDA MTEMP     RESTORE A-REGISTER
      JSB MTP,I 
MTVFL OCT 1         THIS WORD IS A ONE FOR SLEEP, 
*                                   CHANGED TO A ZERO FOR VERIFY
      JMP MTDER     TAPE
      JMP MTDER       ERRORS
      LDB MTVFL 
      SZA           SKIP IF NOTHING READ OR WRITTEN 
      SZB           VERIFYING?
      JMP MTWR,I    NO. RETURN
* 
**  VERIFY THE RECORD IN BUFFER 
* 
      CPA MTEMP     SAME RECORD LENGTH? 
      RSS           YES- OK 
      JMP MTDER     NO. ERROR 
      LDB VTBLA     => FIRST WORD OF SECOND BUFFER
MTVR  LDA B,I       IS THERE
      CPA MTEMP+1,I   A MATCH?
      INB,RSS       YES. CONTINUE 
      JMP MTDER     NO. ERROR 
      ISZ MTEMP+1   NEXT WORD 
      ISZ MTEMP     GONE THROUGH THE ENTIRE BUFFER? 
      JMP MTVR      NO. 
      JMP MTWR,I    YES, RETURN 
      SKP 
*                                  *
**  WRITE OR VERIFY A FILE MARK  ** 
*                                  *
MTWF  NOP           TO WRITE OR VERIFY A FILE MARK
      CLA 
      CPA MTVFL     WRITE OR VERIFY ? 
      JMP MTWFY     VERIFY
      JSB MTP,I     WRITE AN EOF MARK 
      OCT 2 
      JMP MTDER     TAPE
      JMP MTDER       ERRORS
      JMP MTWF,I
MTWFY EQU * 
      LDA QM5       TRY TO READ A SHORT 
      LDB DTRKB       RECORD INTO AN AVAILABLE BUFFER 
      JSB MTP,I 
      OCT 0 
      JMP MTWFZ 
      JMP MTDER     EXPECT END OF FILE
      JMP MTDER     EXPECT END OF FILE
MTWFZ EQU * 
      BLF,BLF       EOF BIT TO SIGN 
      SSB           SKIP IF NO EOF
      JMP MTWF,I    YES, OKAY 
*                *
**  TAPE ERROR  **
*                *
MTDER CLC 0,C 
      LDA QD12      PRINT 
      LDB TAPMA       TAPE ERROR
      JSB TT35Q,I       MESSAGE 
      HLT 11B       WAIT FOR RETRY
      CLA 
      STA LEOS      END OF SET FLAG _ FALSE 
      INA           SET FLAG
      STA MTVFL       FOR WRITE 
      JMP TENBR       AND RESTART THIS REEL 
*                  *
**   DISC ERROR   **
*                  *
DSER  NOP 
      LDA SVIDA     => CURRENT ENTRY             [B]
      LDB DEM3A     => ERROR MESSAGE             [B]
      JSB CFFWQ,I   CONVERT <ID> <NAME> INTO MESSAGE
      LDA QD32      GET CHARACTER 
      LDB DEM2A       AND ADDRESS 
      JSB TT35Q,I   "DISC ERROR <ID> <NAME> LOST" 
      ISZ DSECT     TOO MANY DISC ERROR?
      JMP DSER,I    RETURN
      LDA QD24      PRINT 
      LDB DEM1A       "TOO MANY DISC ERROR" 
      JMP ERRID,I       AND ABORT                [B]
      HED   RESUSITATION
* 
* 
RESU  EQU * 
      JSB JDSEQ,I   SET INTERRUPT LOCATIONS 
      LDA SSTLM     GET THE SST LENGTH
      STA MWORD 
      LDB SSTLD     CORE LOCATION 
      LDA BSDAE       AND DISC ADDRESS
      JSB DISCQ,I   READ THE SST
* 
      LDA QM32      READ
      STA MWORD       IN
      LDA TS0A          THE 
      LDB LBLBI           DISC
      JSB DISCQ,I           LABEL 
      DLD LBLBF+8   SAVE SYSTEM & FEATURE CODES 
      DST TLRT+TLSL   IN TAPE LABEL BUFFER FOR DUMP 
      CPA SYSCQ,I   LOADER FOR THIS SYSTEM?      [B]
      RSS           YES - OK
      JMP ILSID,I   NO ERROR
* 
      LDA MAGSC     IS THERE A MAG TAPE UNIT
      SZA,RSS         ON THIS SYSTEM? 
      JSB GMTSB,I   NO - ASK FOR MT SELECT CODE 
      NOP           CR - DON'T WANT MT DUMP 
* 
      CLA,INA       A= +1 SEZ RESUSITATION
      JMP SLDM
