      HED ***  DISC COMMAND OVERLAY FOR DISC-UP COMMAND *** 
      ORG LIBRA                                  X] 
*                                                X] 
*     BRING A NEW DISC UP                        X] 
*                                                X] 
*     DISC-UP,#                                  X] 
*                                                X] 
      LDA SCHAN     GET SUBCHANNEL
      LDB SDISC       AND DISC ADDRESS. 
      CLB 
      MPY .+14      COMPUTE 
      ADA DIRD0       DIRECTORY 
      LDB 0,I           ADDRESS (B.P.)
      SZB 
      JMP UP.1      ALREADY UP
      CLF 0 
      LDA DCLC1,I   SAVE "BLOCK/UNBLOCK" WORD 
      STA UBLK        IN SCHEDULER. 
      STB DCLC1,I   BLOCK CLOCK.
      STB STATS     CLEAR STATUS STORAGE WORD.
      LDB PLDR5,I   REPLACE "HALT" IN 
      STB PLDR2,I     DISC DRIVER.
      LDA SDISC 
      LDB .-5 
      STB WORD          VALID 
      LDB LIBDI           USER
      JSB DISCL             DISC? 
      LDA HLT10     RESTORE THE 'HLT  10B' IN     (D) 
      STA PLDR2,I   THE DISC DRIVER               (D) 
      LDA UBLK      RESTORE 'BLOCK/UNBLOCK'       (D) 
      STA DCLC1,I   WORD IN SCHEDULER             (D) 
      LDA STATS     GET DISC STATUS.
      SLA           ANY ERRORS? 
      JMP DUP.9 jj
* 
      LDB LIBD      NO. 
      INB 
      LDA 1,I 
      CPA TS             IS IT A USER DISC
      RSS 
      JMP DUP.5          NO 
      LDA .-3       SET COUNTER 
      STA LTEMP       FOR 3 WORDS 
      INB 
DUP10 LDA B,I       LOAD LABEL WORD.
      CPA DUSYA,I   CHECK IF
      RSS             SYSTEM DISC 
      JMP DUP11     NOT SYSTEM DISC.
      INB           NEXT
      ISZ DUSYA       WORD
      ISZ LTEMP     DONE? 
      JMP DUP10     NO. 
      JMP DUP.5     SYSTEM DISC - INVALID 
DUP11 LDB LIBD
      LDA B,I       GET USER DISC FLAG. 
      SSA           IF=1, OUTPUT ERROR MESSAGE. 
      JMP DIS12     IF=0, CHECK IF SYSTEM 
      CLB           SET B                         (D) 
      CPA SYSID      DOES SYSID = DISCID?         (D) 
      LDB .-1       YES                           (D) 
      STB UBLK      IN ANY CASE, SET THE FLAG     (D) 
      LDA SDISC 
      INA 
      LDB .-3      READ 3 WORDS                  X] 
      STB WORD     FROM THE DISC                 X] 
      LDB DTABI                                  X] 
      JSB DISCL                                  X] 
*                                                X] 
*     THE ADT LENGTH AND THE DIRECTORY TRACK LENGTHS ARE
*     NOW IN CORE AT DCNT, DTIL & DT2L           X] 
*                                                X] 
*     NOW READ THE SYSTEM DISC INTO CORE         X] 
*     AND FIND WHERE TO INSERT THE NEW ADT.      X] 
*                                                X] 
      LDA ADLEN          CHECK
      ADA DCNT             IF 
      ADA P3072              ENOUGH 
      SSA                      ROOM 
      JMP DUP.1 
      ADA P3072    CHECK IF TOO BIG              X] 
      SSA,RSS 
      JMP DUP.4     OK. 
DUP.1 CMA,INA       TOO BIG.
      ADA DCNT
      STA DCNT
*                                                X] 
*                                                X] 
DUP.4 LDA ADLEN    READ THE SYSTEM ADT           X] 
      STA WORD     INTO USER CORE                X] 
      LDA ADLOC                                  X] 
      LDB LIBDI                                  X] 
      JSB DISCL                                  X] 
*                                                X] 
      LDA SCHAN    COMPUTE DISC ADDRESS          X] 
      INA          THAT FOLLOWS THE              X] 
      CLE,ERA      NEW DISC ADDRESS              X] 
      RAR 
      SEZ,RSS                                    X] 
      IOR B100
      STA SDIS1                                  X] 
*                                                X] 
      LDB LIBD     SET POIKNTER TO START OF ADT  X] 
DUP.3 LDA 1,I      LOAD ADT ENTRY                X] 
      CPA .-1      LAST ONE?                          [X] 
      JMP DUP.2     YES                                [X]
      AND DHMSK    GET DISC ADDRESS              X] 
      CPA SDIS1    RIGHT ONE?                    X] 
      JMP DUP.2    YES                           X] 
      ADB .+2      NEXT ENTRY                    X] 
      JMP DUP.3                                  X] 
DUP.2 STB DADT     SAVE IT                       X] 
      LDB ADLEN    LOAD LENGTH                   X] 
      CMB          AND COMPUTE                   X] 
      ADB LIBD     END OF CURRENT ADT            X] 
*                                                X] 
      STB MOVES    SET SOURCE ADDRESS            X] 
      LDB DCNT     LOAD COUNT OF NEW SPACE       X] 
      CMB,INB      MAKE IT +                     X] 
      ADB MOVES    COMPUTE FINAL ADDRESS         X] 
      STB MOVED    SET DESTINATION ADDRESS       X] 
      LDB MOVES    COMPUTE THE NUMBER            X] 
      CMB          OF WORDS TO MOVE              X] 
      ADB DADT                                   X] 
      JSB MOVEB    SEPARATE THE ADT TABLE        X] 
*                                                X] 
*                                                X] 
      LDA DCNT     READ NEW ADT                  X] 
      STA WORD     INTO POSTION                  X] 
      LDA DADT     LOAD CORE ADDRESS             X] 
      IOR BIT15    SET FOR INPUT                 X] 
      STA 1        SAVE IN B                     X] 
      LDA SDISC    LOAD AND FORM DISC ADDRESS    X] 
      ADA .+2                                    X] 
      JSB DISCL    LOAD IN NEW ADT               X] 
      LDA DADT,I     LOAD FIRST TRACK ENTRY 
      AND DHMSK       CHECK IF RIGHT DISC 
      CPA SDISC 
      RSS 
      JMP SUBER 
*                                                X] 
*     THE NEW SYSTEM ADT SHOULD NOW BE IN CORE   X] 
*                                                X] 
      LDA ADLEN    UPDATE WORD COUNT             X] 
      ADA DCNT     FOR THE ADT                   X] 
      STA ADLEN                                  X] 
      STA WORD     WRITE THE NEW SYSTEM ADT      X] 
      LDA ADLOC    TO THE SYSTEM DISC            X] 
      LDB LIBD                                   X] 
      JSB DISCL                                  X] 
*                                                X] 
*     ADT TABLE HAS BEEN UPDATED                 X] 
*     NOW WE UPDATE THE BASE PAGE DIRECTORY      X] 
*                                                X] 
      LDA SCHAN    MULTIPLY SUBCHANNEL BY 14     X] 
      MPY .+14                                   X] 
      ADA DIRD0    ADD DIREC. BP ADDRESS         X] 
      LDB DT1L     SET DIRECTORY TRACK LENGTH    X] 
      STB 0,I                                    X] 
      ADA .+7      LOAD AND SET                  X] 
      LDB DT2L     2ND DIREC TRACK               X] 
      STB 0,I      LENGTH                        X] 
*                                                X] 
      LDB SDISC    LOAD DISC ADDRESS             X] 
      ADB B200     SET TO TRACK 1 SECTOR 0
      ADA .-1      SET DIRECT TRACK 1            X] 
      STB 0,I      DISC ADDRESS                  X] 
      ADB B200     SET TO TRACK 2 
      ADA .+7      DISC ADDRESS                  X] 
      STB 0,I                                    X] 
*                                                X] 
      ADA .-12     SET CORE ADDRESS              X] 
      IOR BIT15    TO DIRECT ENTRY 1             X] 
      STA SDIS1    SAVE IT                       X] 
      LDB .-4      SET WORD COUNT TO -4          X] 
      STB WORD                                   X] 
      LDA SDISC    GET DISC ADR                  X] 
      ADA B200       AND SET IT 
      LDB SDIS1    LOAD CORE ADDRESS             X] 
      JSB DISCL    READ FORST DIRECT TRACK       X] 
*                                                X] 
      LDB .-4                                    X] 
      STB WORD                                   X] 
      LDA SDISC    GET DISC ADDRESS              X] 
      ADA B200     FOR SECOND TRACK              X] 
      ADA B200
      LDB SDIS1                                  X] 
      ADB .+7                                    X] 
      JSB DISCL    READ IT IN                    X] 
*                                                X] 
*     DIRECTORY HAS BEEN UPDATED                 X] 
*                                                X] 
      LDA .-5       READ
      STA WORD
      LDA SDISC 
      LDB LIBDI 
      JSB DISCL       LABEL.
      LDB LIBD      SET USER DISC FLAG=1. 
      LDA B,I 
      IOR BIT15 
      STA B,I 
      LDA SDISC 
      JSB DISCL     WRITE LABEL BACK OUT. 
* 
      CLA           DID SYSID = DISCID?           (D) 
      CPA UBLK                                    (D) 
      JMP DUP.6     NO, INFORM OPERATOR           (D) 
      CLF 0         ALL OK, EXIT
      STA LIB       CLEAR LIB INDICATOR 
      JMP LEND      ALL DONE
* 
DUP.9 LDA PNRDY     OUTPUT "ALREADY UP" 
      RSS             MESSAGE.
UP.1  LDA UPALR     OUTPUT
      LDB .-6         "ALREADY UP"
      JMP DMES          MESSAGE.
* 
DUP.5 LDA UPMS1 
      LDB .-7 
      JMP DMES
* qq
DUP.6 LDA UPMS2 LLLL
      LDB .-14                                   (D)
      JMP DMES                                    (D) 
* 
UPAMS OCT 5127      LF-W
      ASC 13,ARNING! DISC ID NOT SYS ID 
UPALR DEF *+1 {{
      OCT 5101      LF-A
      ASC 5,LREADY UP!
PNRDY DEF *+1 1k
      OCT 5104      LF-D
      ASC 5,ISC ERROR 
DUSYA DEF SYSAA 
TS    ASC 1,TS
HLT10 HLT 10B                                     (D) 
UBLK  NOP 
$UP   EQU *                                      X] 
      HED TSB - EXECUTION OF SYSTEM START UP
* 
**  THIS OVERLAY IS LOADED INTO CORE WHEN SYSTEM IS BROUGHT UP. 
* 
      ORG LIBRA 
      CLA           CLEAR 
      CLC 0,C         ALL 
      ISZ A             DEVICES.
      JMP *-2 
      LDA NPORT     SET COUNTER TO
      STA TCNTR       NUMBER OF PORTS.
      LDB TTYTP,I   B=> START OF TTY TABLE. 
TSB1  EQU * 
      STB TPNTR     SAVE IN ADDRESS POINTER.
      ADB .+?TSTA   B=> ?TSTA 
      LDA IOBT      SET INPUT                    [E]
      STA B,I         MODE BIT                   [E]
      ADB .+?RPRM-?TSTA  B=> ?RPRM
      STB TSPNT     SAVE ?RPRM POINTER. 
      LDA B,I       OUTPUT ?RPRM
      LDB TPNTR,I I4
      JSB MUXR,I
      ISZ TSPNT     BUMP POINTER. POINTS TO ?SPRM 
      LDA TSPNT,I   OUTPUT ?SPRM
      LDB TPNTR,I 
      JSB MUXR,I
      ISZ TSPNT     BUMP POINTER. POINTS TO ?PPRM 
      LDA TSPNT,I   OUTPUT ?PPRM
      IOR BB360 
      OTA DSCB
      LDB TPNTR          BUMP POINTER TO NEXT 
      ADB .+TTY01-TTY00    USER'S TABLE.
      ISZ TCNTR     BUMP COUNTER. DONE? 
      JMP TSB1      NO. 
* 
      LDA NPORT     A= NUMBER OF PORTS
      ADA .+16        NOT INITIALIZED.
      CMA,INA,SZA,RSS   ANY PORTS LEFT? 
      JMP TSB3      NO. 
      STA TCNTR     YES. SET COUNTER. 
      ADB .+?TSTA   B=> ?TSTA 
      LDA NIBT      SET NO INPUT                 [E]
TSB2  STA B,I         ALLOWED BIT                [E]
      ADB .+TTY01-TTY00  BUMP POINTER TO NEXT USER. 
      ISZ TCNTR     BUMP COUNTER. DONE? 
      JMP TSB2      NO. 
TSB3  EQU * ~~
      LDA DATIM+1   INITIALIZE TIMES FOR
      STA SPT1A,I     PHONES LOGIC. 
      LDA DATIM 
      STA SPT2A,I 
      CCA           READ
      STA WORD        SYSTEM
      LDA B100          ID
      LDB SYSDF           CODE. 
      JSB DISC,I
      LDA .+3       START UP TBG
      OTA CLOCK       COUNTING IN 
      STC CLOCK,C       100 MS UNITS. 
      STC MPX,C     START UP MUX. 
      STC DSCB,C    START UP PHONES.
      CLC ?SC       CLEAR CONSOLE.
      LDA .+6       OUTPUT "READY"
      LDB READY       ON
      JSB TTY35,I       SYSTEM CONSOLE. 
      JMP TSCH1,I   EXIT TO SCHEDULER 
* 
* 
TSCH1 DEF SCH1
SYSDF DEF SYSID,I 
SPT1A DEF SPT1
SPT2A DEF SPT2
BB360 OCT 360 
$TSB  EQU * 
      HED OVERLAY AUTO RESTART
* 
*  THIS IS PART OF THE AUTO RESTART LOGIC WHICH IS
*  LOADED INTO THE OVERLAY SECTION. 
*  THE FIRST PART OF THE CORE RESIDENT AUTO RESTART 
*  LOGIC MUST HAVE BEEN EXECUTED BEFORE CONTROL CAN 
*  COME TO THIS SECTION.
* 
* 
      ORG LIBRA 
      LDA .+5       INITIALIZE J AS POWER FAIL
      STA POWJ      POINTER AND I AS DMA POINTER. 
      INA 
      STA POWI
      LDA .+3       RESET TBG FREQUENCY.
      OTA CLOCK 
      LDA PPWFL,I   COPY FLAG WORDS.
      STA POWF
      LDB TBITS     IF CONSOLE FLAG WAS CLEAR, SET
      AND .+4       UP CORRECT CONSOLE STATE     [E]
      SZA,RSS       OTHERWISE LEAVE IT SET IN 
      OTB ?SC       INPUT STATE.
* 
      LDA POWF      IF DMA FLAG WAS SET,
      SLA           SET IT. 
      STF 6 
* 
* 
*  NOW TEST THE DEVICE FLAGS. IF A FLAG WAS 
*  CLEAR, EXECUTE A "CLF SC". IF IT WAS SET, TAKE 
*  STRONGER ACTION. 
* *q
POW4 LDA POWF       GET FLAG WORD. THE ONE TO BE
      RAR           TESTED IS IN BIT 0 AND I= ITS 
      STA POWF      SELECT CODE.
      SSA           WAS FLAG SET? 
      JMP POW5      YES.
* 
      LDA POWI      NO. BUILD "CLF SC" INSTRUCTION
      ADA CLF0
      STA *+1 
      NOP             AND EXECUTE IT. 
POW6  LDA POWI
      CPA .+20B     TESTING DONE? 
      JMP POW14     YES.
      ISZ POWI      NO. BUMP I AND LOOP.
      JMP POW4
* 
*  FLAG WAS SET. TEST IF DRIVER WAS ACTUALLY
*  ENTERED. IF SO, PERFORM A DUMMY INTERRUPT
*  TO PREVENT IT FROM BEING REENTERED.
* *q
* 
*  DEVICE FLAG WAS SET. CHECK IF IT WAS PENDING.
* qq
POW5  LDB POWTB     COMPUTE LOCATION OF RET. ADDR.
      ADB POWJ      OF HIGHEST PRIORITY DRIVER NOT
      LDB B,I       YET TESTED. 
      LDA B,I       GET ITS RETURN ADDRESS. 
      STA POWSV     SAVE TEMPORARILY. 
      LDB POWTB 
      ADB POWI      WAS DRIVER INTERRUPTED? 
      CMA 
      ADA B,I 
      SSA Au
      JMP ADB11     MAY BE. DO MORE CHECKING. 
      LDA POWI      MIGHT IF CHECKING ON MUX(DATA). 
      CPA MPX       DOES "I" POINT TO MUX(DATA)?
      RSS 
      JMP POW6      NO. INTERRUPT WAS PENDING!
      LDA POWSV     YES.INTERRUPTED IN "MUXOR"? 
      CMA 
      ADA MUXR
      SSA,RSS 
      JMP POW6      NO. INTERRUPT WAS PENDING.
      ADA POWD7     MAY BE. 
      SSA 
      JMP POW6      NO. INTERRUPT WAS PENDING.
      JMP POW99     YES. INTERRUPTED IN "MUXOR".
ADB11 ADB .+11B B_
      ADA B,I 
      SSA 
      JMP POW6      INTERRUPT WAS PENDING!
* 
*  INTERRUPT HAS OCCURRED.
*  PERFORM A DUMMY INTERRUPT. 
* 
POW99 EQU * 
      LDA ADB11     PLACE "ADB 11B" IN TRAP CELL
      STA POWI,I
      LDA POWI
      IOR STF0      CREATE "STF SC"              [E]
      STA POWSF                                  [E]
      IOR STC0      CREATE "STC SC"              [E]
      STA POWST 
      XOR B4000     CREATE "CLC SC" 
POWSF STF 0         EXECUTE "STF SC"             [E]
POWST STC 0         EXECUTE "STC SC"
STF0  STF 0         ENABLE INTERRUPT, CAUSING EXE-
      STA POWCL     CUTION OF "ADB 10B".
CLF0  CLF 0         DISABLE INTERRUPT.
POWCL CLC 0         DISABLE DEVICE. 
      LDA B,I       RESTORE CORRECT CONTENTS
      STA POWI,I      OF TRAP CELL. 
      LDA POWI      UPDATE POINTERS.
      STA POWJ
      JMP POW6      GO TEST NEXT DEVICE.
* 
* 
*  ALL DUMMY INTERRUPTS ARE DONE. 
*  NOW RE-INSTATE MUX AND PHONES. 
* 
POW14 EQU * 
      LDA NPORT     SET COUNTER TO
      STA PPCTR       NUMBER OF PORTS.
      LDB TTYTP,I   B=> START OF TTY TABLES.
POW90 EQU * *%
      STB PTNUM     SAVE ?TNUM POINTER. 
      ADB .+?RPRM   B=> ?RPRM 
      STB RPRMP     SAVE ?RPRM POINTER. 
      LDA B,I       OUTPUT ?RPRM
      ADB .-5         => TO ?TSTA                 (L) 
      LDB 1,I         GET STATUS WORD             (L) 
      RBR,SLB         SKIP IF NIBT IS 0           (L) 
      AND NECHO       TURN OFF ECHO               (L) 
      LDB PTNUM,I 
      JSB POW91 
      JSB POW92 
      ISZ RPRMP     => ?SPRM
      LDA RPRMP,I    OUTPUT ?SPRM 
      LDB PTNUM,I 
      JSB POW91 
      LDB PTNUM     B=> ?TNUM 
      ADB .+?TSTA   B=> ?TSTA 
      LDA B,I       A= ?TSTA
      AND BIT1T7
      SZA,RSS       NIBT SET? 
      JMP POW93     NO. 
      JSB POW92     YES. CHECK SEEKING. 
      LDA SYNCC     SEND SYNC. CHAR.
      LDB PTNUM,I 
      JSB POW91 
POW93 EQU * 
      ISZ RPRMP     => ?PPRM
      LDA RPRMP,I   A= ?PPRM
      IOR OC360     TURN ON "DTR" AND "RQS" 
      OTA DSCB      OUTPUT ?PPRM
      LDB PTNUM     ADJUST POINTER TO NEXT
      ADB .+TTY01-TTY00 USER'S TABLE. 
      JSB POW92     CHECK SEEKING.
      ISZ PPCTR     BUMP COUNTER. DONE? 
      JMP POW90     NOT YET.
* 
      CLB 
      LDA PPNSK,I   WAS DISC DRIVER BUSY? 
      SZA,RSS 
      JMP POW95     NO. SET FLAG=0. 
      LDA PPOWP,I   YES. FAILED IN DISC DRIVER? 
      ADA POWD5 ~~
      SSA 
      JMP POW94     NO. SET FLAG=1. 
      ADA POWD6     MAY BE. 
      SSA 
      INB           YES. SET FLAG=2.
POW94 EQU * 
      INB           NO. SET FLAG=1. 
POW95 EQU * 88
      STB PCKFL,I 
* 
**    TURN ON 2762 MOTER
* *q
      LDA FILLR     IS CONSOLE                   [E]
      CPA .-1         A HP 2762A?                [E]
      JMP POW98     NO                           [E]
      LDA B120K     YES, INITIALIZE              [E]
      OTA ?SC         INTERFACE                  [E]
      LDA ESC                                    [E]
      JSB POWSC     OUTPUT ESCAPE                [E]
      LDA H           H SEQUENCE                 [E]
      JSB POWSC                                  [E]
      LDB .-13                                   [E]
      LDA B377      OUTPUT 13 DELAY              [E]
      JSB POWSC       CHARACTERS TO              [E]
      ISZ B             GIVE MOTOR TIME          [E]
      JMP *-2             TO COME UP TO SPEED    [E]
      LIA ?SC       DELETE MOTOR FAIL SIGNAL     [E]
* qq
POW98 LDA PPWSW,I   RESTORE                      [E]
      OTA 01          SWITCH REGISTER.
      LDA PPWEO,I    RESTORE E AND O
      CLO              REGISTERS. 
      SLA,ELA 
      STO 
* 
      JMP PPW57,I   GO TO CORE RESIDENT SECTION.
      SPC 3 
* 
**
***   I/O SUBROUTINES 
**
* *q
* 
**    2762A I/O ROUTINE 
* 
POWSC NOP                                        [E]
      OTA ?SC                                    [E]
      STC ?SC,C     OUTPUT CHARACTER             [E]
      SFS ?SC       WAIT FOR DATA                [E]
      JMP *-1         TO BE ACCEPTED             [E]
      JMP POWSC,I                                [E]
      SPC 1 
* 
*  OUTPUT PARAMETER/DATA TO MUX.
* 
POW91 NOP 
      RBL,RBL       POSITION UNIT NR. 
      OTA MPX       OUTPUT PARAMETER/DATA.
      OTB MPX+1     OUTPUT UNIT NR. 
      STC MPX 
      JMP POW91,I I5
* 
* 
*  CHECK SEEKING ON MUX.
* 
POW92 NOP 
      LIA MPX+1     GET STATUS. 
      SSA           CHECK SEEKING BIT.
      JMP *-2       NOT CLEAR YET.
      JMP POW92,I 
* 
* 
ESC   OCT 233 
H     OCT 310 
PCKFL DEF CKFLG 
PPNSK DEF PNDSK 
PPOWP DEF POWP
POWD5 ABS -LDISC
POWD6 ABS -LDSND+LDISC
POWTB DEF *-4       POINTER TO TABLE BELOW. 
* 
*  THIS TABLE POINTS TO DRIVER RETURN ADDRESSES.
* 
      DEF POW       POWER FAIL. 
      DEF PDINT 
      DEF ?TT2      SYSTEM CONSOLE. 
POWH1 EQU * 
      BSS 2         DISC. 
      BSS 1         PHOTOREADER 
      DEF MPXIO     MUX(DATA) 
POWH3 EQU * 
      BSS 1         MUX(STATUS) 
      DEF DSCBL     PHONES
      DEF CLKIN     TNG.
* 
* 
*  THIS TABLE CONTAINS THE LENGTH OF EACH DRIVER
*  SO THAT POWER FAIL/AUTO RESTART ROUTINE CAN
*  DETERMINE IF A DRIVER WAS ENTERED. 
* 
      ABS LDSND-DINT  DISC
      ABS TTYED-?TT2  CONSOLE.
POWH4 EQU * 
      BSS 2         DISC
      BSS 1         PHOTOREADER 
      ABS MPXED-MPXIO   MUX(DATA) 
POWH6 EQU * *V
      BSS 1         MUX(STATUS) 
      ABS DSCED-DSCBL   PHONES
      ABS CLKED-CLKIN TBG.
* 
* *q
*  THIS TABLE CONTAINS THE CORRECT
*  CONTENTS OF THE TRAP CELLS.
* 
      JSB ?ADIN,I 
      JSB T35DR,I  CONSOLE. 
POWH8 EQU * 
      BSS 2   DISC
      BSS 1   PHOTOREADER 
      JSB MPXO,I         MUX(DATA)
POWH0 EQU * 
      BSS 1   MUX(STATUS) 
      JSB DSCBA,I   PHONES
      JSB CLKDR,I   TBG.
POWH7 EQU * 
* 
      ORG POWH1 
POWI  BSS 1 1J
POWJ  BSS 1 
POWF  BSS 1 
      ORG POWH3 
STC0  STC 0 
      ORG POWH4 
PPCTR BSS 1 LL
PTNUM BSS 1 
RPRMP BSS 1 
      ORG POWH6 
OC360 OCT 360 
      ORG POWH8 
PPW57 DEF POW57 
POWSV BSS 1 
POWD7 ABS MUXND-MUXOR 
      ORG POWH0 
PPWSW DEF POWSW 
      ORG POWH7 
PPWEO DEF POWEO 
PPWFL DEF POWFL 
$PFRS EQU * 
      HED SAVE AREA FOR POWER FAILURE 
* 
*  THIS AREA IS USED TO SAVE DATA OF THE LIBRARY
*  ROUTINE WHICH WAS IN CORE AT THE TIME
*  OF POWER FAILURE.
* *q
* 
      ORG LIBRA 
      NOP           RESERVE 2 SECTORS 
      BSS 254         ON THE DISC.
      NOP 
$PFSW EQU * 
      HED LANGUAGE PROCESSOR ERROR MESSAGES 
      ORG LIBRA 
      DEC -7-~
      ASC 15,OUT OF STORAGE 
      DEC -13 
      ASC 15,ILLEGAL OR MISSING INTEGER 
      DEC -13 
      ASC 15,EXTRANEOUS LIST DELIMITER
      DEC -14 
      ASC 15,MISSING ASSIGNMENT OPERATOR
      DEC -15 
      ASC 15,CHARACTERS AFTER STATEMENT END 
      DEC -14 
      ASC 15,MISSING OR ILLEGAL SUBSCRIPT 
      DEC -15 
      ASC 15,MISSING OR BAD LIST DELIMITER
      DEC -14 
      ASC 15,MISSING OR BAD FUNCTION NAME 
      DEC -15 
      ASC 15,MISSING OR BAD SIMPLE VARIABLE 
      DEC -12 
      ASC 15,MISSING OR ILLEGAL 'OF'
      DEC -13 
      ASC 15,MISSING OR ILLEGAL 'THEN'
      DEC -12 
      ASC 15,MISSING OR ILLEGAL 'TO'
      DEC -13 
      ASC 15,MISSING OR ILLEGAL 'STEP'
      DEC -14 
      ASC 15,MISSING OR ILLEGAL DATA ITEM 
      DEC -8
      ASC 15,ILLEGAL EXPONENT 
      DEC -10 0}
      ASC 15,SIGN WITHOUT NUMBER
      SPC 2 
      ORG LIBRA 
      DEC -14 
      ASC 15,MISSING RELATIONAL OPERATOR
      DEC -11 
      ASC 15,ILLEGAL READ VARIABLE
      DEC -14 
      ASC 15,ILLEGAL SYMBOL FOLLOWS 'MAT' 
      DEC -15 
      ASC 15,MATRIX CANNOT BE ON BOTH SIDES 
      DEC -15 
      ASC 15,NO '*' AFTER RIGHT PARENTHESIS 
      DEC -15 
      ASC 15,NO LEGAL BINARY OPERATOR FOUND 
      DEC -12 
      ASC 15,MISSING LEFT PARENTHESIS 
      DEC -13 
      ASC 15,MISSING RIGHT PARENTHESIS
      DEC -15 
      ASC 15,PARAMETER NOT STRING VARIABLE
      DEC -11 
      ASC 15,UNDECIPHERABLE OPERAND 
      DEC -15 
      ASC 15,MISSING OR BAD ARRAY VARIABLE
      DEC -15 
      ASC 15,STRING VARIABLE NOT LEGAL HERE 
      DEC -15 5b
      ASC 15,MISSING OR BAD STRING OPERAND
      DEC -8
      ASC 15,NO CLOSING QUOTE 
      DEC -14 
      ASC 15,72 CHARACTERS MAX FOR STRING 
      DEC -15 5b
      ASC 15,STATEMENT HAS EXCESSIVE LENGTH 
      SPC 2 
      ORG LIBRA 
      DEC -15 
      ASC 15,MISSING OR BAD FILE REFERENCE
      DEC 15
      ASC 15,UNDEFINED STATEMENT REFERENCE
      DEC 13
      ASC 15,NEXT WITHOUT MATCHING FOR
      DEC 12
      ASC 15,SAME FOR-VARIABLE NESTED 
      DEC 11
      ASC 15,FUNCTION DEFINED TWICE 
      DEC 13;;
      ASC 15,VARIABLE DIMENSIONED TWICE 
      DEC 12
      ASC 15,LAST STATEMENT NOT 'END' 
      DEC -7
      ASC 15,UNMATCHED FOR
      DEC -9
      ASC 15,UNDEFINED FUNCTION 
      DEC -8
      ASC 15,ARRAY TOO LARGE
      DEC -14 4<
      ASC 15,ARRAY OF UNKNOWN DIMENSIONS
      DEC 7 
      ASC 15,OUT OF STORAGE 
      DEC 13;;
      ASC 15,DIMENSIONS NOT COMPATIBLE
      DEC -14 
      ASC 15,CHARACTERS AFTER COMMAND END 
      DEC -13 
      ASC 15,BAD FORMAT OR ILLEGAL NAME 
      DEC -13 
      ASC 15,MISSING OR PROTECTED FILE
      SPC 2 
      ORG LIBRA 
      DEC 11
      ASC 15,GOSUBS NESTED TEN DEEP 
      DEC 13
      ASC 15,RETURN WITH NO PRIOR GOSUB 
      DEC 12
      ASC 15,SUBSCRIPT OUT OF BOUNDS
      DEC 11
      ASC 15,NEGATIVE STRING LENGTH 
      DEC 15
      ASC 15,NON-CONTIGUOUS STRING CREATED
      DEC 8 
      ASC 15,STRING OVERFLOW
      DEC 6 
      ASC 15,OUT OF DATA
      DEC 9 
      ASC 15,DATA OF WRONG TYPE 
      DEC 12
      ASC 15,UNDEFINED VALUE ACCESSED 
      DEC 9 9L
      ASC 15,MATRIX NOT SQUARE
      DEC 15
      ASC 15,REDIMENSIONED ARRAY TOO LARGE
      DEC 11
      ASC 15,NEARLY SINGULAR MATRIX 
      DEC 12
      ASC 15,LOG OF NEGATIVE ARGUMENT 
      DEC 12
      ASC 15,SQR OF NEGATIVE ARGUMENT 
      DEC 9 
      ASC 15,ZERO TO ZERO POWER 
      DEC 15
      ASC 15,NEGATIVE NUMBER TO REAL POWER
      SPC 2 
      ORG LIBRA Ah
      DEC 15
      ASC 15,ARGUMENT OF SIN OR TAN TOO BIG 
      DEC -15 
      ASC 15,OVER/UNDERFLOWS - WARNING ONLY 
      DEC -15 
      ASC 15,LAST INPUT IGNORED, RETYPE IT
      DEC -13 
      ASC 15,TOO MANY FILES STATEMENTS
      DEC 141
      ASC 15,NON-EXISTENT FILE REQUESTED
      DEC 15
      ASC 15,WRITE TRIED ON READ-ONLY FILE
      DEC 13
      ASC 15,END-OF-FILE/END OF RECORD
      DEC 15
      ASC 15,INVALID PROGRAM NAME IN CHAIN
      DEC 15
      ASC 15,NON-EXISTENT PROGRAM REQUESTED 
      DEC 12
      ASC 15,CHAIN REQUEST IS A FILE
      DEC 14
      ASC 15,PROGRAM CHAINED IS TOO LARGE 
      DEC -13 
      ASC 15,COM STATEMENT OUT OF ORDER 
      DEC 14
      ASC 15,ARGUMENT OF TIM OUT OF RANGE 
      DEC -6                                     (D)
      ASC 15,PROGRAM BAD                         (D)
      DEC -14 
      ASC 15,BAD INPUT, RETYPE FROM ITEM
      DEC 13
      ASC 15,LOG OF ZERO - WARNING ONLY 
      SPC 2 
      ORG LIBRA                                 (D) 
      DEC 15
      ASC 15,ZERO TO NEGATIVE POWER-WARNING 
      DEC 1588
      ASC 15,DIVIDE BY ZERO - WARNING ONLY
      DEC 14
      ASC 15,EXP OVERFLOW - WARNING ONLY
      DEC 12
      ASC 15,OVERFLOW - WARNING ONLY
      DEC 121
      ASC 15,UNDERFLOW - WARNING ONLY 
      DEC -13 3_
      ASC 15,EXTRA INPUT - WARNING ONLY 
      DEC -8
      ASC 15,READ-ONLY FILES: 
      SPC 2 
      ORG 0 
      NOP           SIGNAL LOADER THAT WE'RE DONE.
      END 
