
SPEBE EQU * 
      DST JTMP2     SAVE THE
      DST ADTBL+8     DISC ADDRESS
      LDA SRFLG     CHECK FOR RELOAD
      SZA,RSS 
      JMP SPEBH     RELOAD
      JSB DIRLK     MUST GET THE DIRECTORY TRACK
      HLT 31B       S'FUNNY, WAS THERE A MINIT AGO
      LDA DATE      SET LAST CHANGED DATE 
      STA ADJ6,I      INTO DIRECTORY ENTRY
      CLA           SELECTIVE LOAD, 
SPEBH EQU * 
      STA ADJ10,I   CLEAR 'MUST BE RECOVERED' FLAG
      LDA DIRP      => CURRENT DIRECTORY ENTRY
      STA MOVDJ,I   SAVE AS MOVE DESTINATION
      LDA ADJ0      => TAPE VERSION OF THE DIRECTORY
      STA MOVSJ,I     AND SET AS SOURCE 
      LDB JM12      GET WORD COUNT
      JSB MOVEJ,I     AND MOVE ENTRY IN 
      JSB MTKBM,I   FIND THE RECORD SIZE
      ADB JM12      ADD THE DIR ENTRY LENGTH
      CPB JTMP1     WAS RECORD OF CORRECT SIZE
      RSS 
      JMP SPEX      FILE FAILS
      LDA JT2P      GET POINTER TO DISC ADDRESS 
      LDB ADJ12     GET CORE ADDRESS
SPEBX EQU * 
      JSB DISCJ,I   WRITE OUT THIS RECORD 
      LDA JTMP3     ADVANCE 
      CLE             THE DISC
      ADA JD4           ADDRESS 
      STA JTMP3 
      SEZ 
      ISZ JTMP2 
      LDA JDTM4,I   GET THE LENGTH
      SSA           SKIP IF BLOCK COUNT 
      JMP SPKBT 
      ADA JM4       DECREMENT 
      SZA 
      SSA 
      JMP SPKBV     JUMP OUT WHEN DONE
      STA JDTM4,I   NOT DONE, STORE NEW SIZE
SPKBM EQU * 
      JSB MTRDJ,I   READ THE NEXT RECORD
      JMP SPEF      FILE MARK - - UNEXPECTED
      JMP SPEX      TAPE READ ERROR 
      STA JTMP1 
      JSB MTKBM,I   FIND THE RECORD SIZE
      CPB JTMP1       AND CHECK FOR CORRECTNESS 
      RSS 
      JMP SPEX      WRONG LENGTH RECORD 
      LDA JT2P
      LDB ADTBJ     GET THE CORE ADDRESS
      JMP SPEBX       AND GO WRITE TO DISC
SPKBT EQU * 
      ADA JD1K      SUBTRACT ONE TAPE RECORD
      STA JDTM4,I 
      SSA           SKIP WHEN DONE
      JMP SPKBM 
SPKBV EQU * 
* 
*      WHEN WE HAVE ARRIVED AT THIS POINT, THE NEXT 
* RECORD HAD BETTER BE A FILE MARK SINCE WE'RE
* DONE WITH THE CURRENT ENTRY.
* 
      JSB MTRDJ,I   GO TO READ THE NEXT RECORD
      JMP SPKEB     FILE MARK, OKAY 
      JMP SPEX      TAPE ERROR   ???
      JMP SPEX      UNEXPECTED RECORD 
* 
SPKEB EQU * 
      JSB CDTW      PUT OUT THE GOOD DIRECTORY TRACK
      LDA SRFLG     CHECK FOR SELECTIVE LOAD
      SZA           SKIP IF MAG TAPE LOAD 
      JMP SPKGA     SELECTIVE LOAD
      STA LTP1B,I   SET FOR FSDAD 
      DLD JTMP5     GET BACK PARAMETERS FOR FSDAD 
      JSB FSDAJ,I     AND REMOVE SPACE FROM ADT 
      HLT 31B       S'FUNNY, WAS THERE A MINIT AGO
      ISZ JDECJ,I   UPDATE COUNT OF FILES RECOVERED 
      JMP SPDC      FILES REMAIN, CONTINUE ON 
      JMP SPMD      ALL FILES RECOVERED 
* 
SPKGA EQU * 
      LDA JTMP6     => LENGTH TABLE 
      LDB A,I       B = LENGTH
      STB MWORD 
      ADA JM2       => DISC ADDRESS 
      LDB IDTCJ 
      JSB DISCJ,I   READ IN ADT 
      CLA           TELL DIRGE THAT WE'VE WIPED 
      STA CUDIR       OUT ITS BUFFER
      STA LTP1B,I   SET FOR FSDAD 
* 
      DLD JTMP5     GET BACK PARAMETERS FOR FSDAD 
      JSB FSDAJ,I     AND REMOVE SPACE FROM ADT 
      HLT 31B       HEY!  WHERE'D IT GO?
* 
      LDA JTMP6     => LENGTH 
      ADA JM2       => DISC ADDRESS 
      LDB IDTBJ       THE CORE ADDRESS
      JSB DISCJ,I       AND WRITE BACK THE ADT
      ISZ JDECJ,I   UPDATE COUNT OF FILES RECOVERED 
      JMP SPDC      FILES REMAIN, CONTINUE ON 
      LDA ENTEJ,I   GET END POINTER 
      CPA JLADQ     CHECK FOR EMPTY TABLE 
      JMP SPME      ALL FILES RECOVERED 
      JMP SPDC      ID IN TABLE, CONTINUE ON
* 
*      THE END OF A SET OF TAPES HAS BEEN REACHED.
* WE WILL NOT GET HERE IF ALL OF THE ENTRIES HAVE 
* BEEN RECOVERED UNLESS THERE ARE IDS IN THE EFID 
* TABLE.  WE WILL NOW QUESTION THE OPERATOR AS
* TO THE AVAILABILITY OF ANOTHER SET OF TAPES.
* 
SPEOS EQU * 
      JSB MTJ,I     REWIND AND STANDBY
      OCT 5 
      LDA JDECJ,I   GET THE COUNT OF FILES
      SZA,RSS         YET TO BE RECOVERED 
      JMP SPMC      ID TABLE OR NOT, WE'RE DONE 
SPEOU EQU * 
      LDA JD46      CHARACTER COUNT 
      LDB MTASJ       AND ADDRESS FOR 
      JSB ASRJ,I        "UNRECOVERED ENTRIES . . ." 
      CLA 
      JSB ASRJ,I    GET RESPONSE FROM OPERATOR
      JSB GETCJ,I 
      JMP SPEOV     CR.  ILLEGAL INPUT
      CPA JASY
      JMP SPSNX     "YES", ANOTHER SET
      CPA JASN
      JMP SPRBE     "NO", CLEAN DIRECTORY 
SPEOV EQU *         UNINTELLIGABLE ANSWER 
      LDA JD15
      LDB ILINJ 
      JSB ASRJ,I    "ILLEGAL INPUT" 
      JMP SPEOU 
      SKP 
* 
*      ANOTHER SET EXISTS.  READ THE LABEL AND SKIP 
* TO THE FILE MARK. 
* 
SPSNX EQU * 
      JSB MTJ,I     REWIND
      OCT 3 
      CLA           ZERO OUT
      CLB             SYSTEM LEVEL & FEATURE CODES
      DST TLRV+TLSL     BUFFER
      LDA MLENJ     GET THE EXPECTED TAPE LABEL LENGTH
      LDB TLRVJ       AND THE SECOND BUFFER ADDRESS 
      JSB MTJ,I     READ IN THE LABEL 
      OCT 0 
      JMP SPBL      EOF, BAD LABEL
      JMP SPBL      TAPE ERROR, BAD LABEL 
      STA MTLNB,I   SAVE LABEL LENGTH 
      DLD TLRV      "LB" AND "TS"?
      CPA JLB 
      RSS 
      JMP SPBL
      CPB JTS 
      RSS 
      JMP SPBL
* 
      DLD TLRT+TLSL SET FEATURE CODE ON DISC
      DST STMP0       INTO STMP1
      LDA TLSVJ,I   GET FEATURE CODE ON TAPE
      JSB CKFCA,I     AND CHECK IF VALID
      DEF STAPE                                  [B]
      JMP SPBN      RESPONSIBILITY NOT ACCEPTED  [B]
      DLD STMP0     RESTORE SYSTEM'S             [B]
      DST TLRT+TLSL   LEVEL CODES                [B]
      LDA TLRVN,I   GET THE TAPE NUMBER 
      CPA JD1 
      JMP SPSPA     OKAY, NOW CHECK THE TIME
SPBL  EQU *         BAD LABEL 
      LDB MTBTJ     => "BAD TAPE LABEL" 
SPBM  EQU * 
      LDA JD16      CHAR COUNT FOR BOTH MESSAGES
      JSB ASRJ,I
      JMP SPEOU     GO ASK "ANOTHER SET?" 
SPBN  EQU *                                      [B]
      DLD STMP0     RESTORE SYSTEM'S             [B]
      DST TLRT+TLSL   LEVEL CODES 
      JMP SPEOU                                  [B]
      SKP 
* 
*      LABEL IS SUPERFICIALLY OKAY. . . CHECK FOR 
* DATE OUT OF ORDER.
* 
SPSPA EQU * 
      LDA JM3 
      STA JTMP0     SET COUNT (DATE IS THREE WORDS) 
      LDA TLYTJ     => ORIGINAL DATE
      STA JTMP1 
      LDB TLYVJ     => UPSTART'S DATE 
SPSPE EQU * 
      LDA B,I       NEW DATE
      CMA,INA       - (NEW DATE)
      ADA JTMP1,I   (OLD DATE)-(NEW DATE) 
      SSA 
      JMP SPSQ      NEGATIVE - BAD
      SZA           ZERO - CHECK NEXT WORD
      JMP SPSPO     POSITIVE - OKAY 
      ISZ JTMP1     ADVANCE THE 
      INB             POINTERS
      ISZ JTMP0 
      JMP SPSPE 
* 
SPSQ  EQU *         LABEL DATE IS UNACCEPTABLE
      LDB MTBDJ     => "BAD DATE ORDER" 
      JMP SPBM
* 
SPSPO EQU * 
      LDA TLRVJ     => ALTERNATE TAPE LABEL BUFFER
      STA MOVSJ,I 
      LDA TLRTJ     => PRIMARY TAPE LABEL BUFFER
      STA MOVDJ,I   SET MOVE DESTINATION
      LDB MLENJ 
      JSB MOVEJ,I   MOVE THE LABEL DOWN 
      JMP SPSFM     SKIP OVER THE FIRST EOF 
      SKP 
* 
*      THE OPERATOR HAS ( PERHAPS EVEN WISELY SO ) ELECTED
* TO DISPENSE WITH FURTHER TAPE SPINNING.  WE MUST NOW
* REMOVE ANY UNRECOVERED ENTRIES FROM THE DIRECTORY.
* 
SPRBE EQU * 
      LDA NOMSA,I   WANT
      SZA             MESSAGE?
      JMP SPRBG-1   NO - SKIP IT
      LDA JD32      GET CHARACTER COUNT 
      LDB MFENF       AND CORE ADDRESS FOR
      JSB ASRJ,I        "FOLLOWING ENTRIES NOT FOUND" 
      LDA JDIRC     => FIRST DIREC ENTRY
SPRBG EQU * 
      STA JTMP0 
      JSB DIRGE     GET THIS TRACK IN 
      CLB 
      STB JTMP3     INITIALIZE BUFFER DIRTY FLAG
      SZA,RSS       CHECK FOR ZERO LENGTH 
      JMP SPRBZ     IGNORE IF SO
      CCB 
      DIV JD12      GENERATE THE COUNT OF ENTRIES 
      STA JTMP1     SAVE THE ENTRY COUNT
      LDA IDTBJ 
      ADA JD10      => RECOVERED FLAG 
SPRBM EQU * 
      STA JTMP2 
      LDB A,I       GET THE FLAG
      ADA JD12      => NEXT ENTRY 
      SZB,RSS 
      JMP SPRBV     RECOVERED, LEAVE ALONE
      ADA JM22      => BEGINNING OF CURRENT ENTRY 
      LDB NOMSA,I   WANT
      SZB             MESSAGE?
      JMP SPRBN     NO - SKIP IT
      LDB MTDMJ     => ERROR MESSAGE
      JSB CFFWJ,I   CONVERT ID AND NAME INTO MESSAGE
      LDA JD22
      LDB MTDMJ 
      JSB ASRJ,I    "<ID><NAME> DELETED"
SPRBN LDB JTMP2     GET BACK THE ENTRY ADDRESS
      ADB JM10
      STB MOVDJ,I   AND SET THE DESTINATION 
      ADB JD12
      STB MOVSJ,I   SET THE SOURCE
      ADB CUDIR,I   SUBTRACT THE CURRENT TRACK LENGTH 
      ADB MIDTB 
      JSB MOVEJ,I 
      LDA CUDIR,I 
      ADA JD12      SHORTEN THE DIRECTORY 
      STA CUDIR,I     TRACKS LENGTH 
      ISZ JTMP3     FLAG TO INDICATE REWRITE
      LDA JTMP2 
SPRBV EQU * 
      ISZ JTMP1     CHECK # OF ENTRIES ON THIS TRACK
      JMP SPRBM 
      LDA JTMP3     CHECK TO SEE IF THE DIR TRACK 
      SZA,RSS         WAS UPDATED 
      JMP SPRBZ     NO, DON'T WASTE TIME
      LDA IDTBJ 
      STA MOVSJ,I   SET SOURCE
      LDA JTMP0       AND 
      INA 
      STA MOVDJ,I       DESTINATION 
      LDB JM4       FIX UP
      JSB MOVEJ,I     THE DIREC TABLE 
      JSB CDTW      WRITE OUT DIR IF ALTERED
SPRBZ EQU * 
      LDA JTMP0     GET DIREC POINTER 
      ADA JD7       ADVANCE TO NEXT TRACK 
      CPA JDIRU 
      JMP SPMA
      JMP SPRBG 
* 
SPMD  EQU * 
      JSB MTJ,I     REWIND AND STANDBY
      OCT 5 
* 
*    THIS SECTION WRITES OUT ALL DISC ADT'S 
* 
SPMA  EQU * 
      LDA SRFLG     CHECK FOR SELECTIVE LOAD
      SZA           SKIP IF MAG TAPE LOAD 
      JMP SPMC
      LDB JLADQ     => FIRST CORE BUFFER
      JSB SPDA
      JMP SPMC
* 
SPDG  EQU * 
      LDA JLADQ     DELETE THE REST 
      STA ENTEJ,I     OF THE ID TABLE 
      LDA JDECJ,I   CONTINUE FOR
      SZA             ENTRIES THAT
      JMP SPSFM         ARE ALREADY IN THE DIRECTORY
SPME  EQU * 
      JSB MTJ,I     REWIND AND STANDBY
      OCT 5 
      SKP 
* 
*      THE IDT MUST NOW BE UPDATED TO REFLECT 
*  THE AMOUNT OF DISC SPACE EACH USER NOW HAS.
* 
SPMC  EQU * 
      LDB JIDEC     => FIRST IDEC ENTRY 
      JSB SPMB      READ IN FIRST IDT TRACK 
      LDB ADTBJ 
      STB JTMP2     => CURRENT IDT ENTRY
      ADB JD7       SAVE POINTER TO 
      STB JTMP3       ENTRY'S DISC TOTAL
      CLA           RESET 
      STA B,I         TO ZERO 
* 
      LDA JDIRC     => FIRST DIREC ENTRY
SPMAC EQU * 
      STA JTMP4 
      JSB DIRGE     GET THIS DIRECTORY TRACK IN 
      SZA,RSS 
      JMP SRND      ZERO LENGTH, TRY NEXT 
      CCB 
      DIV JD12      GENERATE THE COUNT OF 
      STA JTMP5       ENTRIES ON THIS DIR TRACK 
* 
      LDB IDTBJ     => FIRST DIR ENTRY
SPMAP EQU * 
      STB DIRP      SET POINTER 
SPMAQ EQU * 
      LDA DIRP,I    GET THE ID
      CPA JTMP2,I   SAME AS THE CURRENT ID? 
      JMP SPMFG     YES, OKAY 
      SZA,RSS       ZERO IS A SPECIAL CASE
      JMP SPMFQ 
      CPA JM1       CHECK FOR END OF DIR
      JMP SPMAS     YES, FINISH OFF IDT 
      LDB JTMP2,I   GET THE CURRENT ID
      CMB,INB 
      ADB A         COMPARE THE TWO 
      SSB 
      JMP SPMFQ     DIR ENTRY OUT OF ORDER
SPMAS EQU * 
      LDB JTMP2 
      ADB JD8       => NEXT ENTRY 
      ISZ JTMP1     CHECK COUNT REMAINING 
      JMP SPMBG     SOME LEFT, KEEP GOING 
      LDA JTMP0 
      ADA JD3       => LENGTH 
      LDB A,I 
      STB MWORD 
      ADA JM2       => DISC ADDRESS 
      LDB ADTBJ 
      JSB DISCJ,I   WRITE OUT TRACK 
      LDB JTMP0     GET THE CURRENT IDEC POINTER
      ADB JD4       ADVANCE THE POINTER 
      CPB JIDEL     CHECK FOR DONE
      JMP SPFR      DONE, JUMP OUT
      JSB SPMB
* 
      LDB ADTBJ 
SPMBG EQU * 
      STB JTMP2 
      ADB JD7 
      STB JTMP3     SAVE POINTER TO TOTAL WORD
      CLA 
      STA B,I         AND SET IT TO ZERO
      JMP SPMAQ 
* 
SPMFG EQU * 
      LDB DIRP      GET POINTER TO THE DIR ENTRY
      ADB JD11      ADVANCE TO THE LENGTH 
      LDA B,I       GET THE LENGTH
      SSA,RSS 
      JMP SPMFL     POSITIVE BLOCKS 
      CCB           CONVERT NEGATIVE
      ASR 8           WORDS TO POSITIVE 
      CMA,INA           BLOCKS
SPMFL EQU * 
      ADA JTMP3,I   ADD TO THE CURRENT
      STA JTMP3,I     TOTAL WORD
* 
SPMFQ EQU * 
      LDB DIRP      GET THE DIRECTORY POINTER 
      ADB JD12        AND ADVANCE IT TO THE 
      ISZ JTMP5         NEXT ENTRY
      JMP SPMAP 
* 
SRND  EQU * 
      LDA JTMP4 
      ADA JD7       ADVANCE TO THE NEXT DIREC ENTRY 
      CPA JDIRU       AND CHECK FOR DONE
      JMP SPFR
      JMP SPMAC     READ IN THE NEXT DIR TRACK
      HED SYSTEM STARTUP SEQUENCE 
* 
*      ALL OF THE INCIDENTALS HAVE BEEN HANDLED.
* 
* 
*     SYSTEM UPDATE AND DISC RELOAD ENTER HERE
* 
SPFR  EQU * 
      JSB RLDCJ,I   LOAD OR DUMP COMMANDS?
* 
* 
*    BALANCE THE DIRECTORY TRACKS BEFORE STARTING UP THE SYSTEM.
* 
      CLA,INA       SAY DON'T WANT INSERTION; 
      STA SUPTA,I     JUST BALANCE DIRECTORY TRACKS 
      JSB ENSUA,I   DO SUPERSAVE
      NOP           DIR FULL RETURN 
* 
* 
*   CLEAR FUSS TABLE
* 
      LDA JM1K      LENGTH OF FUSS TABLE
      STA JTMP0     SET UP COUNTER
      STA MWORD     SAVE FOR DISCZ CALL 
      LDB ADJ0      => BUFFER 
      CLA           SET 
      STA B,I         FUSS
      INB               TABLE 
      ISZ JTMP0           TO
      JMP *-3               ZEROS 
      LDA COM6A,I   => 1ST LIBRARY DISC ADDR
      ADA JD2       => FUSS TABLE DISC ADDR 
      LDB ADJ0      => BUFFER OF ZEROS
      JSB DISCJ,I   WRITE TO DISC 
* 
* 
*    READ BACK THE PIECES OF THE SYSTEM THAT WERE IN THE ADT AND
*    IDT BUFFERS. 
* 
*    PAPER TAPE INITIAL LOAD ENTERS HERE
* 
SPFU  EQU * 
      LDA JM4       THERE ARE FOUR SUCH PIECES
      STA JTMP0 
      LDA LDMDJ     OBSCURE POINTER INTO SST
SPTEA EQU * 
      STA JTMP1 
      JSB RDSEA,I   READ ONE SEGMENT
      LDA JTMP1     ADVANCE THE POINTER 
      ADA JD4         TO THE NEXT ENTRY 
      ISZ JTMP0         AND CHECK THE COUNT 
      JMP SPTEA 
      SKP 
*                                *
**  INITIALIZE USER SWAP AREAS  **
*                                *
* 
*  FOR EACH USER PORT, INITIALIZE THE SWAPPING PORTION OF THE 
*  LANGUAGE PROCESSOR, WRITE IT TO THE APPROPRIATE SWAP TRACK,
* 
      LDA NPORT     SET 
      STA JTMP0       COUNTER 
      LDA TTYDI,I   FOR DISC ADDRESS
      STA JTMP1       IN TTY00
      LDA USTRA     POINTER TO
      STA JTMP2       FIRST USER TRACK ADDRESS
      CLA           INCREMENT FROM TTY00
      STA JTMP3       TO CURRENT TTY TABLE
LDR58 LDA SWPII,I   SWAP AREA COMPILER QUANTITIES 
      LDB ?IDA,I    LOAD ADDRESS OF 
      ADB JTMP3       ID/NAME 
      STB A,I       RECORD IT 
      LDB JTMP3     UPDATE
      ADB INCRA,I     TOTAL 
      STB JTMP3         INCREMENT 
      DLD JTMP2,I   RECORD DISC ADDR
      DST JTMP1,I     IN TTY TABLE
      LDA SWPLA,I        WRITE
      STA MWORD            SWAP 
      LDA JTMP2              AREA 
      LDB SWPAI,I              TO 
      JSB DISCJ,I               DISC
      ISZ JTMP2     => NEXT ENTRY 
      ISZ JTMP2       IN TRKTB
      LDB JTMP1     UPDATE TTY TABLE
      ADB INCRA,I     POINTER TO
      STB JTMP1          DISC ADDRESS 
      ISZ JTMP0     ALL DONE? 
      JMP LDR58     NO
* 
*                       * 
**  GET DATE AND TIME  ** 
*                       * 
* 
*      THIS SECTION REQUESTS THE DATE AND TIME OF DAY 
* FOR THE INTERNAL CLOCKING ROUTINES. 
* 
LDR59 EQU * 
      LDA JD8       PRINT 
      LDB DATEA 
      JSB ASRJ,I      "DATE?" 
      CLA           GET 
      JSB ASRJ,I      RESPONSE
      JSB INTGA,I   GET DAY OF YEAR 
      STA JTMP0     SAVE FOLLOWING CHARACTER
      SZB,RSS       NON-ZERO? 
      JMP ERR6      NO
      LDA B         YES 
      ADB MXDAY 
      SSB,RSS       < 367 ? 
      JMP ERR6      NO
      MPY JD24      CONVERT 
      STA LDATE       TO HOURS
      LDA JTMP0     "/" 
      CPA SLSH        NEXT? 
      JMP LDR60     YES 
ERR6  EQU * 
      LDA JD15      NO, PRINT 
      LDB ILDTA       'ILLEGAL
      JSB ASRJ,I        DATE' 
      JMP LDR59 
LDR60 JSB INTGA,I   GET YEAR
      CPA JB15      MORE CHARACTERS?
      RSS           NO
      JMP ERR6      YES 
      STB LYEAR     SAVE THE YEAR 
      ADB MAXYR 
      SSB,RSS       < 100 ? 
      JMP ERR6      NO
LDR61 EQU * 
      LDA JD8       YES 
      LDB TIMEA     REQUEST 
      JSB ASRJ,I      TIME OF DAY 
      CLA           GET 
      JSB ASRJ,I      RESPONSE
      JSB TWODA,I   GET TWO-DIGIT 
      DEC -24         INTEGER < 24
      STB JTMP0     SAVE IT 
      JSB TWODA,I   GET TWO-DIGIT 
      DEC -60         INTEGER < 60
      LDA B         CONVERT TO TENTHS 
      MPY JD600         OF SECONDS
      ADA MBIAS     SAVE IN SPECIAL 
      STA LTIME       INTERNAL FORM 
      JSB GETCJ,I   EXTRANEOUS DIGITS?
      JMP LDR62     NO
ERR7  EQU * 
      LDA JD15      YES 
      LDB ILTIA     PRINT 
      JSB ASRJ,I      ERROR 
      JMP LDR61 
LDR62 EQU * 
      LDB JTMP0 
      ADB LDATE     CORRECT 
      STB LDATE       HOUR OF YEAR
      LDA YEAR      GET THE LAST KNOWN YEAR 
      SZA,RSS       ON INITIAL LOAD,
      JMP TCHBT       SWALLOW ANYTHING
      CMA,INA 
      ADA LYEAR     COMPUTE THE DIFFERENCE
      SSA 
      JMP TCHDI     DEFINITELY OUT OF ORDER 
      SZA           SKIP IF SAME YEAR 
      JMP TCHAS       OTHERWISE, MUST KLUDGE TO CHECK 
      LDA DATE      GET THE HOUR OF YEAR
      CMA,INA 
      ADA LDATE     FIND THE DIFFERENCE 
      SSA           SKIP IF ORDER OKAY
      JMP TCHDI     DEFINITELY BAD ORDER
TCHAV EQU * 
      ADA JM112     ALLOW HIM 112 HOURS OF
      SSA             SYSTEM NOT RUNNING TIME 
      JMP TCHBT     OKAY, ACCEPT HIS DATE 
* 
TCHDI EQU * 
      LDA JD35      GET THE CHAR COUNT
      LDB TCHAJ       AND ADDRESS FOR 
      JSB ASRJ,I        THE "ARE YOU SURE" QUESTION 
      CLA 
      JSB ASRJ,I    WAIT FOR THE RESPONSE 
      JSB GETCJ,I   GET THE FIRST CHARACTER 
      JMP LDR59     CR, ASK AGAIN 
      CPA JASY      CHECK FOR YES 
      JMP TCHBT     OKAY.  IT'S YOUR SYSTEM.
      JMP LDR59     NO?  WELL I'M FORGIVING 
* 
TCHAS EQU * 
      CPA JD1       YEARS CAN ONLY BE ONE DIFFERENT 
      RSS 
      JMP TCHDI     FAR DISTANT FUTURE
      LDA DATE
      CMA,INA 
      ADA JMHPY     BIAS DATE BY HOURS PER YEAR 
      ADA LDATE 
      JMP TCHAV     NOW CHECK FOR 112 HOUR LIMIT
* 
TCHBT EQU * 
      LDA LYEAR     WE HAVE ACCEPTED THE
      STA YEAR
      LDA LDATE       OPERATORS DATE, NOW 
      STA DATE
      LDA LTIME         COPY IT INTO THE EQT
      STA TIME
*                          *
**  INITIATE TIMESHARING  **
*                          *
* 
*  POWER FAIL, SET TO HALT DURING LOADING, IS SET TO THE POWER FAIL 
*  ROUTINE IN THE SYSTEM. FINALLY, CONTROL TRANSFERS TO TSB.
* 
      CCA           SET THE NOT 
      STA SLEPT       SLEPT FLAG
      DLD MLTBE     WRITE OUT 
      STA MWORD       THE EQT SEGMENT 
      LDA JDME2     => DISC ADDRESS 
      JSB DISCJ,I 
      LDA GMQBA,I   SET DISC MESSAGE BUFFER 
      STA GMQBP       GETTER POINTER
      LDA PWRFA,I   SET POWER-FAIL
      STA 4           INTERRUPT LINK
      JMP TSBA,I    RUN 
