
      HED COLD DUMP PROGRAM 
**********************************************
***                                        ***
**                                          **
*   2000F / 2000C (HIGH-SPEED) TSB SYSTEMS   *
*             COLD DUMP PROGRAM              *
**                                          **
***                                        ***
**********************************************
* 
* 
*  USAGE: 
* 
*     IF I/O PROCESSOR HALTED, NOTE REGISTER VALUES AND START AT 2. 
*     HALT MAIN PROCESSOR, IF NOT ALREADY HALTED.  RECORD VALUE OF
*     P-REGISTER.  LOAD ADDRESS 77000B.  SET MAG TAPE SELECT CODE 
*     INTO SWITCH REGISTER.  MOUNT MAG TAPE WITH WRITE RING, PLACE
*     UNIT ON-LINE, AND PRESS 'RUN'.
* 
*     ON HLT 77 REMOVE TAPE, LABEL IT, AND PRESENT IT TO APPROPRIATE
*     HEWLETT-PACKARD REPRESENTATIVE.  IF A HLT 77 IS NOT ACHIEVED, 
*     NOTE REGISTER VALUES (A,B,E,O, AND P) AND SUPPLY THEM ALONG 
*     WITH THE TAPE.
* 
*  NOTE:  FOR A 2000C (HIGH-SPEED) TSB SYSTEM WITH AN HP3030 TAPE 
*         UNIT, BIT 15 OF THE SWITCH REGISTER MUST BE SET ALONG 
*         WITH THE UNIT'S SELECT CODE.  IN ALL OTHER CASES BIT 15 
*         MUST NOT BE SET.
* 
**********************************************
**********************************************
* 
*  HALTS: 
* 
*     HLT 11 -- ENTER THE HIGH-PRIORITY (LOWER-NUMBERED) SELECT 
*               CODE OF THE MAG TAPE UNIT INTO THE SWITCH REGISTER
*               AND PRESS 'RUN'.
*     HLT 22 -- DISC 0 NOT READY, CORRECT AND PRESS 'RUN'.
*     HLT 33 -- REMOUNT THE TAPE WITH A WRITE RING AND PRESS 'RUN'. 
*     HLT 44 -- PLACE THE MAG TAPE UNIT ON-LINE AND PRESS 'RUN'.
*     HLT 55 -- MAG TAPE IS INADEQUATE, REPLACE IT WITH A GOOD ONE
*               AND PRESS 'RUN'.
*     OTHER HALTS -- NOTE HALT NUMBER, NOTE REGISTER VALUES, AND
*                    DISMOUNT TAPE MANUALLY.
* 
**********************************************
**********************************************
      SPC 1 
      ORG 77000B
* 
      SUP 
DMAHS EQU 7 
DMALS EQU DMAHS-4 
CH1   EQU 10B 
CH2   EQU 11B 
DSBUF EQU 1000B     COLD DUMP BUFFER
      SKP 
DSBEG EQU * 
* 
      CLC 0,C       TURN OFF INTERRUPTS 
      ISZ DSFLG     RETRY WITH NEW MAG TAPE SC? 
      JMP DSC1      YES 
* 
      STA AREG      NO, SAVE
      STB BREG        REGISTERS 
      ERA,ALS 
      SOC 
      INA 
      STA EOREG 
      LDA DSPWR     TURN OFF
      STA 4           POWER FAIL
      SPC 2 
* 
*  CONFIGURE MAG TAPE DRIVER
* 
DSC1  LIA 1         GET MAG TAPE SELECT CODE
* 
      IFZ 
      STA DSMTU     SAVE BIT 15 IF
      AND DS777       2000C (HIGH-SPEED) LOADER 
      XIF 
* 
      STA DSTM0     SAVE SELECT CODE
      ADA DSM17 
      SSA           LESS THAN 17B?
      JMP DSC2      YES 
      ADA DSM46     NO
      SSA           GREATER THAN 64B? 
      JMP DSC3      NO
DSC2  HLT 11B       YES, HAVE MAGSC ENTERED 
      JMP DSC1      TRY AGAIN 
* 
DSC3  LDB DSI1A 
DSC4  CPB DSI3A     ALL INSTRUCTIONS CONFIGURED?
      JMP DSC5      YES 
      LDA 1,I       NO
      AND DSM64     CONFIGURE 
      IOR DSTM0       NEXT
      STA 1,I           INSTRUCTION 
      INB 
      CPB DSI2A     DATA CHANNEL INSTRUCTIONS DONE? 
      ISZ DSTM0     YES, BUMP TO COMMAND CHANNEL
      JMP DSC4
* 
DSC5  JSB DSCMS     CHECK MAG TAPE STATUS 
      SKP 
* 
*  DO PRELIMINARIES 
* 
      CLA           NOTE CORE 
      STA DSFLG       NOT WRITTEN 
      LDA DS.2      REWIND
      JSB DSMTD       TAPE
      LDA DSM5      WRITE 
      LDB DSCLA       'COLD DUMP' 
      JSB DSMTD          LABEL
      LDA DSM4      WRITE 
      LDB AREGA       REGISTER
      JSB DSMTD         VALUES
      SPC 2 
* 
*  DUMP CORE
* 
      LDA DSM32     DUMP 32 SEGMENTS
      STA DSTM0       OF 1024 WORDS EACH
      CLB               BEGINNING AT 0
DSC6  LDA DS1M
      JSB DSMTD 
      LDB DSMBA 
      ADB DS1K
      ISZ DSTM0 
      JMP DSC6
* 
      ISZ DSFLG     NOTE CORE DUMPED
      JSB DSEDF     WRITE EOF SEQUENCE
      SPC 2 
* 
*  DUMP I/O PROCESSOR CORE
* 
      JSB DSIOL     RETURN IF CH2 FLAG SET
      LDA DSRCD     REQUEST 
      OTA CH2         CORE
      STC CH2,C         DUMP
      CLC CH2       PREVENT INTERRUPTS
      JSB DSIOL     RETURN IF IOP RESPONDS
      STC CH1,C     (STF C2)
* 
DSC7  LDA DSBFI     SET 
      CLC DMALS       BUFFER
      OTA DMALS         ADDRESS 
      CCA           COMPUTE 
      STC DMALS 
      OTA DMALS       WORD COUNT
      LIA DMALS 
      CMA               MASK
      STA DSMSK 
      LDA DS8M      SET WORD COUNT
      OTA DMALS       TO -8192
      LDA DSIPC     REQUEST DMA TO
      OTA DMAHS       ANSWER WITH 'STC CH2,C' 
      STC DMAHS,C   ENABLE TRANSFER 
DSC8  SFC DMAHS     WAIT FOR
      JMP DSC9        DMA COMPLETION
      SFS CH1           OR I/O PROCESSOR
      JMP DSC8            COMPLETION
DSC9  STF DMAHS     TURN OFF
      CLC DMAHS       DMA 
      STC CH2,C     ACKNOWLEDGE LAST WORD 
      LIA DMALS     COMPUTE 
      SZA             -(WORDS)
      IOR DSMSK         UNREAD
      CMA,INA       COMPUTE 
      ADA DS8M        -(WORDS) READ 
      STA MWORD     OUTPUT BUFFER 
      JSB DSWRT       TO MAG TAPE 
      SFS CH1       ALL WORDS DUMPED? 
      JMP DSC7      NO, READ NEXT CHUNK 
* 
      CLC CH2       ACKNOWLEDGE 
      STC CH1,C       TRANSFER COMPLETE 
DSC10 JSB DSEDF     WRITE EOF SEQUENCE
      LDA DSCL6     PUT 'CLC 6' 
      STA DMAH        AND 'CLC 7' 
      INA               IN THE DMA
      STA DMAHS           INTERRUPT CELLS 
      SPC 3 
******************************************************* 
*                                                     * 
*  CODE TO DUMP SYSTEM TABLES IS DEPENDENT UPON THE   * 
*  LOCATION OF SPECIFIC SYSTEM TABLES AND THE FORMAT  * 
*  OF THE EQT, TELETYPE TABLES, ETC.  IT RETURNS TO   * 
*  DSCED TO TERMINATE THE DUMP.                       * 
*                                                     * 
******************************************************* 
      SPC 3 
      JMP DSC11     DUMP SYSTEM TABLES
      SPC 3 
* 
*  TERMINATE COLD DUMP
* 
DSCED JSB DSEDF     WRITE 8 EOF MARKS 
DSCTM LDA DS.3      REWIND/STANDBY
      JSB DSMTD     (NO RETURN) 
      HED COLD DUMP UTILITY ROUTINES
* 
**  END OF DUMP FILE SEQUENCE  ** 
* 
DSEDF NOP 
      LDA DSM8      WRITE 
      STA DSTM0 
      CLA,INA         EIGHT 
DSED1 JSB DSMTD 
      ISZ DSTM0         EOF MARKS 
      JMP DSED1 
* 
      LDA DSM7      BACKSPACE 
      STA DSTM0 
      LDA DS.4        OVER
DSED2 JSB DSMTD 
      ISZ DSTM0         SEVEN 
      JMP DSED2 
      JMP DSEDF,I         OF THEM 
      SPC 2 
* 
**  DUMP BUFFER TO MAG TAPE  ** 
* 
DSWRT NOP 
      LDB DSBFO     LOAD OUTPUT BUFFER ADDRESS
* 
DSWR1 LDA MWORD     DECREMENT REMAINING 
      ADA DS1K        WORD COUNT BY 1024
      SSA           LAST RECORD?
      JMP DSWR2     NO
      LDA MWORD     YES, WRITE
      JSB DSMTD       EXACT AMOUNT
      JMP DSWRT,I 
* 
DSWR2 STA MWORD     SAVE REMAINING WORD COUNT 
      LDA DS1M      OUTPUT 1024 WORDS 
      JSB DSMTD       TO MAG TAPE 
      LDB DSMBA     ADVANCE 
      ADB DS1K        BUFFER ADDRESS
      JMP DSWR1 
      SPC 2 
* 
**  LOOK FOR IOP LISTENING  **
* 
DSIOL NOP 
      LDA DSM8      OUTER COUNTER 
      CLB           INNER COUNTER 
DSIO1 SFC CH2       IOP LISTENING?
      JMP DSIOL,I   PROBABLY
      INB,SZB,RSS   NO, WAIT
      ISZ 0           SOME MORE?
      JMP DSIO1     YES 
      JMP DSC10     NO, SKIP IOP CORE DUMP
      HED COLD DUMP CONSTANTS, TEMPORARIES, ETC.
AREG  NOP 
BREG  NOP 
EOREG NOP 
DSFLG DEC -1        SET TO 0 WHEN REGISTERS STORED
*                                   SET TO 1 WHEN CORE WRITTEN OUT
* 
DS8M  DEC -8192 
DS1M  DEC -1024 
DSM64 DEC -64 
DSM46 OCT -46 
DSM40 OCT -40 
DSM32 EQU DSM40 
DSM17 OCT -17 
DSM8  DEC -8
DSM7  DEC -7
DSM5  DEC -5
DSM4  DEC -4
DS.2  DEC 2 
DS.3  DEC 3 
DS.4  DEC 4 
DS1K  DEC 1024
DS777 OCT 77777 
* 
DSIPC ABS 100000B+CH2    'STC CH2,C' ON EACH WORD 
DSRCD OCT 160031
DSPWR HLT 4,C       PLACED IN LOCATION 4
DSCL6 CLC 6,C       PLACED IN LOCATION 6
* 
DSTM0 NOP 
DSMTU NOP           NEGATIVE IF HP3030 MAG TAPE UNIT
DSMBA EQU DSIOL 
DSMSK EQU EOREG 
* 
DSBFO DEF DSBUF     OUTPUT BUFFER ADDRESS 
DSBFI DEF DSBUF,I   INPUT BUFFER ADDRESS
AREGA DEF AREG
DSCLA DEF DSCLB 
DSI1A DEF DSI1,I
DSI2A DEF DSI2,I
DSI3A DEF DSI3,I
      HED COLD DUMP MAGNETIC TAPE DRIVER
***                              ***
**                                **
*  COLD DUMP MAGNETIC TAPE DRIVER  *
**                                **
***                              ***
* 
* 
*  CALL WITH COMMAND IN (A) 
* 
*    4:  BACKSPACE RECORD 
*    3:  REWIND/STANDBY (COLD DUMP DONE)
*    2:  REWIND 
*    1:  WRITE EOF MARK 
*    0:  ZERO-LENGTH WRITE
* 
*    (A)<0 IS WRITE REQUEST IN -(WORDS).  IN THIS CASE
*    (B) CONTAINS THE CORE BUFFER ADDRESS.
*    UNLESS A HLT 55 OR HLT 77 TERMINATES THE DUMP, 
*    THE DRIVER RETURNS WITH (A) UNCHANGED IF (A)>=0
*    UPON ENTRY.
* 
* 
*  HLT 33 IF WRITE NOT ENABLED.  CORRECT AND PRESS 'RUN'. 
*  HLT 44 IF UNIT OFF-LINE.  PUT ON-LINE AND PRESS 'RUN'. 
*  HLT 55 IF TAPE BAD OR TOO SHORT.  MOUNT NEW TAPE AND PRESS 'RUN'.
*  HLT 77 WHEN COLD DUMP COMPLETE.  DISMOUNT TAPE AND SAVE IT.
* 
***************************************** 
***************************************** 
      SPC 3 
DSMTD NOP 
      STB DSMBA     SAVE (POSSIBLE) BUFFER ADDRESS
DSMT1 LDB DSMTU     '3030 FLAG' 
      ELB             TO (E)
DSM.. LIB CMND      GET CONTROLLER STATUS 
      SEZ,RSS       3030? 
      JMP DSMT7     NO
* 
      SLB,RSS       READY?
      JMP DSM.1     YES 
      BLF,BLF       NO
      SLB,RSS       BUSY? 
      JMP DSMT1     YES, WAIT 
      JMP DSMT6     NO, OFF-LINE
* 
DSMT7 BLF,BLF       CONTROLLER
      SLB,BLF         BUSY? 
      JMP DSMT1     YES, WAIT 
      BLF,SLB       NO, OFF-LINE? 
      JMP DSMT6     YES 
* 
DSM.1 CLC DATA      CLEAR 
DSM.4 CLC CMND        CONTROL BITS
      SKP 
      CLE,SZA,RSS   ZERO-LENGTH WRITE REQUEST?
      JMP DSMTD,I   YES 
      CPA DS.4      NO, BACKSPACE RECORD REQUEST? 
      JMP DSBSR     YES 
      CPA DS.3      NO, REWIND/STANDBY REQUEST? 
      JMP DSRES     YES 
      CPA DS.2      NO, REWIND REQUEST? 
      JMP DSREW     YES 
      SSA,RSS       NO, WRITE EOF MARK REQUEST? 
      JMP DSEOF     YES 
      SPC 3 
* 
**  PERFORM WRITE  ** 
* 
      RBR,RBR       PAST
      RBR,RBR         EOT 
      RBR,SLB           MARK? 
      JMP DSMT4     YES 
      LDB DSMTU     NO
      SSB,RSS       3030? 
      JMP DSMT2     NO
      LDB 0         YES 
      ADB DSM6      WRITE 
      SSB             AT LEAST
      LDA DSM6          6 WORDS 
* 
DSMT2 LDB DSMBA     SET DMA 
      CLC DMALS       BUFFER
      OTB DMALS         ADDRESS 
      STC DMALS     SET DMA 
      OTA DMALS       WORD COUNT
      LDB DSMTC     LINK DMA TO 
      OTB DMAHS       DATA CHANNEL
DSMT3 LDB DSWRC     LOAD WRITE COMMAND
      CCE,RSS 
      JMP DSMT3     (REJECT RETURN) 
      JSB DSCMD     (E)=1 
DSM.2 CLC DATA      CLEAR 
      CLC DMAHS       CONTROL BITS
      STF DMAHS     TURN OFF DMA
DSM.5 LIB CMND      PARITY
      RBR,SLB         ERROR?
      JMP DSMT8     YES 
      RBR,RBR 
      RBR           TIMING
      SLB,RSS         ERROR?
      JMP DSMTD,I   NO
* 
DSMT8 LDB DS41      PERFORM 
      JSB DSCMD       BACKSPACE 
      LDB DSETC     ERASE 
      JSB DSCMD       TAPE
DSM.6 LIB CMND      TAPE PROPERLY 
      RBR,SLB         ERASED? 
      JMP DSMT4     NO
      JMP DSMT2     YES, RETRY WRITE
      SPC 3 
* 
**  WRITE END-OF-FILE MARK  **
* 
DSEOR LDB DS41      PERFORM 
      JSB DSCMD       BACKSPACE 
DSEOF CLF DATA
      LDB DSWEC     LOAD WRITE EOF MARK COMMAND 
      JSB DSCMD     (E)=0 
DSM.7 LIB CMND      PARITY OR 
      RBR,SLB         TIMING ERROR? 
      JMP DSEOR     YES 
      JMP DSMTD,I   NO
      SPC 3 
* 
**  PERFORM REWIND  **
* 
DSREW BLF,BLF       AT
      RBL 
      SSB            SOT? 
      JMP DSMTD,I   YES 
      LDB DSRWC     NO, LOAD REWIND COMMAND 
      JSB DSCMD     (E)=0 
      JMP DSMTD,I 
      SPC 3 
* 
*  TAPE BAD OR TOO SHORT
* 
DSMT4 JSB DSEDF     WRITE 8 EOF MARKS 
*                                   DROP THROUGH TO REWIND/STANDBY
     SKP
* 
**  REWIND AND STANDBY  **
* 
DSRES LDB DSRSC     LOAD REWIND/STANDBY COMMAND 
      JSB DSCMD     (E)=0 
* 
      IFZ      2000C (HIGH-SPEED) ONLY
DSRS2 INA,SZA       TIME OUT ( (A) = 3 )
      JMP *-1         IN CASE 3030
      XIF 
* 
      LDA DSFLG     CORE
      SZA,RSS         OVERLAID? 
      JMP DSMT5     NO, RETRY DUMP
      HLT 77B       YES, COLD DUMP
      JMP *-1         COMPLETE
* 
DSMT5 HLT 55B       WAIT FOR
      JMP DSC1        FRESH TAPE
      SPC 3 
* 
**  BACKSPACE RECORD  **
* 
DSBSR LDB DS41      LOAD BACKSPACE RECORD COMMAND 
      JSB DSCMD     (E)=0 
      JMP DSMTD,I 
      SPC 3 
* 
*  UNIT OFF-LINE
* 
DSMT6 HLT 44B       WAIT FOR
      JMP DSMT1       ON-LINE 
      SKP 
* 
**  EXECUTE CONTROLLER COMMAND  **
* 
DSCMD NOP           COMMAND IN (B), (E)=1 IF WRITE
DSCMR OTB CMND      OUTPUT COMMAND
DSM.8 LIB CMND      COMMAND 
      RBR,RBR 
      RBR,SLB         ACCEPTED? 
      JMP DSCLR     NO
DSM.9 STC CMND,C    YES, REQUEST ACTION 
      SEZ,CLE,RSS   WRITE COMMAND?
      JMP DSCMA     NO
DSM.3 STC DATA,C    YES, ENABLE DATA TRANSFER 
      STC DMAHS,C   TURN ON DMA 
DSCMA EQU * 
* 
      IFZ      2000C (HIGH-SPEED) ONLY
      LDB DSCMD     REWIND/STANDBY
      CPB DSDRS       COMMAND?
      JMP DSM.0     YES, CAN'T WAIT IF 3030 
      XIF 
* 
DSCMW SFS CMND      NO, WAIT FOR
      JMP *-1         REQUEST COMPLETION
DSM.0 CLC CMND
      JMP DSCMD,I   (E)=0 
* 
DSCLR CLB,INB       PREPARE 
      CMB,CLE         REJECT
      ADB DSCMD         RETURN
      STB DSCMD           TO (P-1)
      LDB DSCLC     PERFORM 
      JMP DSCMR       CLEAR 
      SPC 2 
      IFZ      2000C (HIGH-SPEED) ONLY
DSDRS DEF DSRS2     FOR 3030 KLUDGE 
      XIF 
      SPC 3 
* 
**  CHECK MAG TAPE STATUS  ** 
* 
DSCMS NOP 
DSCM1 LIA CMND      GET STATUS
      LDB DSMTU 
      SSB           3030? 
      JMP DSCM5     YES 
* 
      ALF,ALF       CONTROLLER
      SLA             BUSY? 
      JMP DSCM1     YES 
      LDA DS14C     NO, SELECT
DSC.1 OTA CMND        UNIT 0
DSC.2 LIA CMND      UNIT
      SLA,RAR         ON-LINE?
      JMP DSCM6     NO
* 
DSCM2 RAR,SLA       WRITE ENABLED?
      JMP DSCM7     NO
      LDA DSMTC     DMA LINKAGE WORD
      CCE,SSB       3030? 
      RAL,SLA,ELA   YES, PACK CHARACTERS
      RAL,CLE,ELA   NO
      RAR,RAR 
      STA DSMTC 
      SSB           3030? 
      JMP DSCM3     YES 
* 
      LDA DS211     USE 
      STA DSWEC 
      DLD DS105       7970
      DST DSRSC 
      DLD DS15
      JMP DSCM4         COMMANDS
* 
DSCM3 LDA DS35      USE 
      STA DSWEC 
      DLD DS101       3030
      DST DSRSC 
      DLD DS11          COMMANDS
DSCM4 DST DSETC 
      JMP DSCMS,I 
* 
DSCM5 SLA,RAR       UNIT READY? 
      ALF,SLA,ALF   NO (WILL SKIP)
      JMP DSCM2     YES 
      CLE,SSA       ON-LINE?
      JMP DSCM6     NO
      LDB DS300     YES, PERFORM
      JSB DSCMD       CLEAR COMMAND 
      JMP DSCM1 
* 
DSCM6 HLT 44B       WAIT UNTIL
      JMP DSCM1       UNIT ON-LINE
* 
DSCM7 HLT 33B       WAIT FOR
      JMP DSCM1       WRITE RING
      HED COLD DUMP MAG TAPE DRIVER CONSTANTS, TEMPORARIES, ETC.
* 
*  MAG TAPE DRIVER COMMAND CODES
* 
DSETC BSS 1 
DSRWC BSS 1 
DSRSC BSS 1 
DSCLC BSS 1 
DSWEC BSS 1 
DSWRC OCT 31        WRITE COMMAND 
DS41  OCT 41        BACKSPACE COMMAND 
DS14C OCT 1400      SELECT UNIT 0 
* 
DSMTC ABS 20000B+DATA    'CLC DATA' ON DMA COMPLETE 
DSM6  DEC -6
      SPC 2 
* 
*  7970 CONTROLLER COMMANDS 
* 
DS15  OCT 15        ERASE TAPE COMMAND
      OCT 101       REWIND COMMAND
DS105 OCT 105       REWIND/STANDBY COMMAND
DS110 OCT 110       CLEAR COMMAND 
DS211 OCT 211       WRITE EOF MARK COMMAND
      SPC 2 
* 
*  3030 CONTROLLER COMMANDS 
* 
DS11  OCT 11        ERASE TAPE COMMAND
DS201 OCT 201       REWIND COMMAND
DS101 OCT 101       REWIND/STANDBY COMMAND
DS300 OCT 300       CLEAR COMMAND 
DS35  OCT 35        WRITE EOF MARK COMMAND
      SPC 2 
DSI1  DEF DSM.1 
      DEF DSM.2 
      DEF DSEOF 
      DEF DSM.3 
      DEF DSMTC 
DSI2  DEF DSM.. 
      DEF DSM.4 
      DEF DSM.5 
      DEF DSM.6 
      DEF DSM.7 
      DEF DSCMR 
      DEF DSM.8 
      DEF DSM.9 
      DEF DSCMW 
      DEF DSM.0 
      DEF DSCM1 
      DEF DSC.1 
      DEF DSC.2 
DSI3  EQU * 
