         SYSTEM   SIG7P
         TITLE    'MPC DISK STATUS DUMP  (V013)    6-27-78'
*
*
         DEF      MPCDUMP:          PROGRAM TITLE
         DEF      MPCDUMP
*
*
         REF      DATE              CURRENT DATE (EBCDIC)
         REF      TIME              CURRENT TIME (EBCDIC)
         REF      C:TIC             ELAPSED TIME (TIC'S)
         REF      DCTSIZ            TABLE SIZE
         REF      DCT1A
         REF      DCT1P
         REF      DCT2
         REF      DCT24
         REF      RCBUF             PRINT BUFFER (1 PAGE)
         REF      RCVBIAS           X'800'  ABOVE 2 PAGE BUFFER
         REF      LLNDD             PRINTER ADDRESS
         REF      TB:FLGS
         REF      DCT4              TYPE CODE
*
*
PRTBUF   EQU      RCBUF             PRINT BUFFER
MPCBUFWA EQU      RCVBIAS-X'800'    WA(READ BUFFER)
MPCBUFBA EQU      MPCBUFWA+MPCBUFWA+MPCBUFWA+MPCBUFWA BA(READ BUFF)
*
         PAGE
*
*        MPC DUMP ROUTINE
*
*        THIS ROUTINE SCANS ALL ACTIVE MPC CONTROLLERS AND DUMPS
*          THE MPC READ/WRITE MEMORY CONTENTS.   KEY INFORMATION FROM
*          THE DUMP IS DISPLAYED IN A FORMATTED DISPLAY WITH ENGLISH .
*          HEADERS.
*
*        CALLING SEQUENCE:    BAL,11         MPCDUMP:
*
*        EXIT:                B             *11
*
*
MPCDUMP: EQU      %
MPCDUMP  EQU      %
         STW,11   MPCDXIT           SAVE RETURN
         LI,1     1                 HALFWORD ONE  INDEX
         LI,3     3                 BYTE 3 INDEX
         LW,8     DATE              STUFF DATE IN TITLE
         LW,9     DATE+1
         STW,9    TITLE+4
         LH,9     8
         STH,9    TITLE+3
         SLD,8    -8
         AND,8    XFF
         AI,8     X'6000'
         STH,8    TITLE+3,1             DAY (TENS DIGIT)
         LB,8     9
         SLS,8    8
         AI,8     '-'
         STH,8    TITLE+4               DAY (UNITS DIGIT)
         LW,9     TIME              STUFF TIME OF DAY IN TITLE
         STH,9    TITLE+6,1             MINUTES
         SLS,9    -16
         STB,9    TITLE+6               HOURS
         SLS,9    -8
         STB,9    TITLE+5,3             HOURS (TENS DIGIT)
         LI,9     ':'
         STB,9    TITLE+6,1             COLON
         LW,15    EBCZERO
         LI,12    0
         LW,13    C:TIC             GET COUNT OF RTC TICS
         CW,13    D1800000          IS ELAPSED TIME OVER 1 HOUR
         BL       MPCD03            B:NO
         DW,12    D1800000          COMPUTE HOURS
         XW,12    13
         BAL,15   DTE                  AND CONVERT TO DECIMAL
         STW,15   TITLE+12
         LW,15    EBCZERO
         LI,12    0
MPCD03   CW,13    D30000            ANY MINUTES
         BL       %+4               B:NO
         DW,12    D30000            COMPUTE MINUTES
         XW,12    13
         BAL,15   DTE                  AND CONVERT TO DECIMAL
         STW,15   TITLE+15
MPCD05   BAL,15   TOPOFORM          GO TO TOP OF FORM (IF LP)
         LI,14    TITLE
         MTW,1    RETURN
         LI,9     100
MPCD06   TIO,10   *REPDEV           TEST CONSOLE FOR BUSY
         BCR,12   MPCD07            CONTINUE IF NOT
         LI,15    100000
         BDR,15   %                 DELAY
         BDR,9    MPCD06            LOOP IF STILL BUSY
         B        *MPCDXIT          EXIT ON TIMEOUT
*
MPCD07   BAL,15   PRINT             OUTPUT TITLE
*
         LI,6     DCTSIZ            GET SIZE OF TABLE TO BE SEARCHED
         LI,0     0
         STW,0    MPCCHAN
MPCD10   LB,2     DCT24,6           GET ONE ENTRY
         CI,2     4                 IS IT AN MPC
         BAZ      SKIPIT            B:NO
         CI,2     2                 WAS IT REMOVED
         BANZ     SKIPIT            B:YES
         CI,2     8                 IS IT A SECONDARY
         BANZ     SECOND            B:YES
*
*        ENTER HERE IF VALID DEVICE
*
         LI,3     0                 ASSUME DISK
         LB,5     DCT4,6
         LC       TB:FLGS,5
         BCS,4    NOTAPE
         BCR,8    NOTAPE
*   IT MUST BE A TAPE
         LI,3     1
NOTAPE   STW,3    TAPEMPC
         LB,3     DCT2,6
         CW,3     MPCCHAN           HAS IT BEEN PROCESSED ALREADY
         BE       SKIPIT            B:YES
         STW,3    MPCCHAN           SAVE FOR NEXT PASS
         LH,7     DCT1P,6           GET DEVICE ADDRESS
         STW,7    MPCADDR
MPCD20   AND,7    XFFF0             CONVERT TO CONTROLLER ADDRESS
         LI,0     0
         LI,2     X'800'
         STW,0    MPCBUFWA,2        CLEAR READ BUFFER
         BDR,2    %-1
*
         LI,14    STATHDR           DISPLAY HEADER
         LW,12    7                 GET CONTROLLER ADDR.
         BAL,15   HTE
         STW,15   STATHDR+14
         BAL,15   TOPOFORM
         MTW,0    TAPEMPC           IS IT A TAPE MPC
         BEZ      %+3               B: NO
         LI,11    MPCBUFWA+X'1C0'
         B        %+2
         LI,11    MPCBUFWA+X'FF'
         BAL,15   PRINT
MPCD25   LI,5     1                 DEVICE POINTER
         LI,3     10000
         LI,0     DA(IOCD1)
         SIO,0    *7                READ MPC MAIN MEMORY
         BCS,12   MPCD32            B: NOT ACCEPTED
MPCD30   LI,2     1000
         BDR,2    %                 DELAY
         TIO,12   *7                TEST FOR BUSY
         BCR,12   MPCD35            B:NOT BUSY
         BDR,3    MPCD30            LOOP
MPCD32   MTW,1    RETURN
         LW,12    7                 GET CONTROLLER ADDR.
         BAL,15   HTE
         STW,15   MPCERR+5          PUT IN ERROR MESSAGE
         LI,14    MPCERR
         BAL,15   REPORT            REPORT MPC FAILURE
         LW,15    D60MEG
         BDR,15   %                 DELAY 1 MIN.
         B        SKIPIT            TRY NEXT MPC
         B        MPCD25            RETRY
*
*        ENTER HERE TO DISPLAY DEVICE STATISTICS FOR EACH DEVICE
*
MPCD35   AND,13   X8000000          LOOK FOR UNUSUAL END
         BNEZ     MPCD32            ERROR IF IT IS
         LI,4     4                 MESSAGE INDEX
MPCD40   LI,14    MSG1              RESTART MESSAGES AT MSG1
         MTW,0    TAPEMPC           IS IT A TAPE MPC
         BEZ      %+3               B: DISK MPC
         LI,3     3
         B        %+2
         LI,3     7
         LW,12    *11,3             GET STATUS
         BNEZ     MPCD45            B:NON-ZERO
         BDR,3    %-2
         LW,12    *11
         BNEZ     MPCD45            B:NON-ZERO
         B        MPCD60            EXIT IF ALL ARE ZERO
*
MPCD45   EQU      %
         LW,8     TOP
         CI,8     20                CHECK IF PAGE WILL BE EXCEEDED
         BL       %+2               B:NO
         BAL,15   TOPOFORM
         LW,12    5                 GET DEVICE NUMBER
         AW,12    7                    AND  ADD CONTROLLER #
         BAL,15   HTE
         LW,8     BLANKS
         STW,15   9                 DEVICE # TO REGS 8,9
         LI,3     0                 HALF WORD STAT INDEX
         MTW,0    TAPEMPC           IS IT A TAPE MPC
         BEZ      MPCD50            B: DISK MPC
         STD,8    *14,4
         BAL,15   PRINT             PRINT DEVICE ADDRESS MSG
         LI,14    MSG30-10          POINT AT TAPE MESSAGES
         B        MPCD51
MPCD50   STD,8    *14,4             SAVE VALUE IN MESSAGE
         BAL,15   PRINT                AND PRINT MSG.
MPCD51   MTW,1    TOP
         AI,14    10                POINT TO NEXT MSG
         MTW,0    TAPEMPC           IS IT A TAPE MPC
         BEZ      %+3               B: DISK MPC
         CI,14    MSG36
         B        %+2
         CI,14    MSG17
         BG       MPCD60            B:DONE WITH THIS DEVICE
*
         LH,12    *11,3             GET HALF WORD OF STATUS
         AND,12   XFFFF
         BAL,15   DTE               CONVERT TO DECIMAL
         LW,8     BLANKS            ASSUME LESS THAN 4 DIGITS
         LW,9     15                GET LEAST SIG. 4 CHAR.
         CI,12    0
         BEZ      %+3               B:NO MORE TO CONVERT
         BAL,15   DTE               CONVERT 2 MOST SIG. DIGITS
         LW,8     15
         AI,3     1                 POINT TO NEXT STAT. HALF WORD
         B        MPCD50            PRINT  IT
*
MPCD60   AI,11    8                 POINT AT NEXT DEVICE
         MTW,0    TAPEMPC           IS IT A TAPE MPC
         BEZ      %+2               B:NO
         AI,11    -4                LIMIT OUTPUT TO 8 STATISTICS
         AI,5     1
         CI,5     16                LAST DEVICE DONE
         BL       MPCD40            B:NO
*
*        ENTER HERE TO DISPLAY AUXILIARY STATUS
*
         BAL,15   TOPOFORM
         LI,1     1
         MTW,1    RETURN
         LI,14    AUXHDR
         BAL,15   PRINT
         LI,14    MSG21             START AT MSG21
         LI,3     9                 VARIABLE FIELD INDEX
         MTW,0    TAPEMPC           IS IT A TAPE MPC
         BNEZ     MPCD62            B: YES
         LB,12    MPCBUFWA+X'68'    GET X'D0' BYTE 0
         BAL,11   MPCD70
         LB,12    MPCBUFWA+X'68',1  GET X'D0' BYTE 1
         BAL,11   MPCD70
         LB,12    MPCBUFWA+X'6A',1  GET X'D4' BYTE 1
         BAL,11   MPCD70
         LH,12    MPCBUFWA+X'7E'    GET X'FC'
         BAL,11   MPCD70
         LH,12    MPCBUFWA+X'7E',1  GET X'FD'
         BAL,11   MPCD65
         LH,12    MPCBUFWA+X'7F'    GET X'FE'
         BAL,11   MPCD65
         LH,12    MPCBUFWA+X'7F',1  GET X'FF'
         BAL,11   MPCD65
         LH,12    MPCBUFWA+X'78'    GET LAST TRACE ADDR.
MPCD61   AND,12   XFFFF
         BAL,15   TOPOFORM
         BAL,15   HTE
         STW,15   MSG28+9
         MTW,1    RETURN
         BAL,15   PRINT
         MTW,2    TOP
         B        MPCD80
*
MPCD62   LB,12    MPCBUFWA+X'B8'    GET X'170' BYTE 0
         BAL,11   MPCD70
         LB,12    MPCBUFWA+X'B8',1  GET X'170' BYTE 1
         BAL,11   MPCD70
         LB,12    MPCBUFWA+X'BA',1  GET X'17D' BYTE 1
         BAL,11   MPCD70
         LH,12    MPCBUFWA+X'BE',1  GET X'17D'
         BAL,11   MPCD70
         LH,12    MPCBUFWA+X'BF'    GET X'17E'
         BAL,11   MPCD65
         AI,14    10
         LH,12    MPCBUFWA+X'BF',1  GET X'17F'
         BAL,11   MPCD65
         LH,12    MPCBUFWA+X'10A'
         LI,14    MSG28
         B        MPCD61
*
*
MPCD65   BAL,15   HTE               OUTPUT IN HEX FORMAT
         B        %+2
MPCD70   BAL,15   DTE               CONVERT TO DECIMAL
         STW,15   *14,3
         BAL,15   PRINT
         AI,14    10
         B        *11               RETURN
*
MPCD80   EQU      %
         LI,11    MPCBUFWA          POINT AT START OF MPC DATA
         LI,14    PRTBUF            BUILD MESSAGE IN PRINT BUFFER
MPCD90   LI,3     72                69 CHARACTERS
         STB,3    PRTBUF
         LI,15    X'40'             STUFF BUFFER WITH SPACES
         STB,15   PRTBUF,3
         BDR,3    %-1
*
         LI,4     1                 BUFFER POSITION POINTER
         STW,11   12                COMPUTE MPC ADDRESS
         AI,12    -MPCBUFWA
         AW,12    12
         LI,3     -1
         B        %+3
*
MPCD95   LH,12    *11,3             GET DATA FIELD
         AND,12   XFFFF
         BAL,15   HTE               CONVERT TO EBCDIC (HEX)
         STW,15   *14,4                AND SAVE IN BUFFER
         AI,4     2                 BUMP BUFFER PTR. TO NEXT COL.
         AI,3     1                 BUMP DATA PTR TO NEXT HALFWD.
         CI,4     18                IS BUFFER FULL
         BL       MPCD95            LOOP:NOT FULL
*
         LW,12    TOP
         CI,12    36                PAGE FILLED
         BL       %+2               B:NO
         BAL,15   TOPOFORM
         BAL,15   PRINT             PRINT A LINE
         MTW,1    TOP
         AI,11    4                 POINT AT NEXT 8 MPC WORDS
         CI,11    MPCBUFWA+X'7FF'
         BL       MPCD90            PRINT ANOTHER LINE IF NOT DONE
*
SECOND   EQU      %
         LW,2     7
         LI,3     X'FFF0'
         LH,7     DCT1A,6           GET SECONDARY ADDR.
         CS,2     7                 IS THERE AN ALTERNATE
         BE       SKIPIT            B:NO
         LC       DCT24,6
         BCR,1    MPCD20
*
SKIPIT   EQU      %
         BDR,6    MPCD10            GET NEXT DEVICE
         BAL,15   TOPOFORM
         B        *MPCDXIT          RETURN TO CALLING PROGRAM
*
*
*
*
*
         PAGE
*
*        HEX TO EBCDIC CONVERSION ROUTINE
*
*        CALLING SEQUENCE:    LW,R12    NUMBER
*                             BAL,R15   HTE
*
*        CONVERTS 16 LSB'S OF R12 TO EBCDIC (WHICH IS PLACED IN R15)
*        THE 16 MSB'S OF R12 ARE RIGHT JUSTIFIED.
*
*
*
HTE      EQU      %
         STW,15   SAVE              SAVE REGISTERS
         STW,13   SAVE+1
         STW,4    SAVE+2
         LI,4     3                 SET UP FOR 4 CHAR. CONVERSION
HTE10    LI,13    X'F0'
         SLD,12   -4                GET LO ORDER CHARACTER
         SCS,13   4                 RIGHT JUSTIFY
         CB,13    EBC9LEFT          IS IT 0 THRU 9
         BLE      %+2               B:YES
         AI,13    -X'39'            ADJUST FOR ALPHA
         STB,13   15,4
         AI,4     -1                LOOP TO NEXT CHARACTER
         BGEZ     HTE10               (IF THERE IS ONE)
         B        EBCXIT            EXIT IF NOT
*
         PAGE
*
*        BINARY TO DECIMAL (IN EBCDIC) CONVERSION ROUTINE
*
*        CALLING SEQUENCE:    LW,R12    NUMBER
*                             BAL,R15   DTE
*
*        CONVERTS ARGUEMENT IN R12 TO 4 DIGITS OF DECIMAL
*        EBCDIC.   EBCDIC RESULT IS RETURNED IN R15.
*        IF ON EXIT, R12 IS ZERO, LEADING ZEROS IN R15 ARE
*        CONVERTED TO BLANKS
*        IF R12 IS NOT ZERO, IT CONTAINS THE ORIGINAL ARGUEMENT
*        DIVIDED BY 10,000.
*
*
DTE      EQU      %
         STW,15   SAVE              SAVE REGISTERS
         STW,13   SAVE+1
         STW,4    SAVE+2
         LW,15    BLANKS
         LI,4     3                 SET UP 4 CHAR. CONVERSION
DTE10    LI,13    0
         CI,12    10                IS REMAINDER > 10
         BL       %+3               B :CANNOT BE DIVIDED BY 10
         XW,12    13
         DW,12    TEN               GET RMDR. IN 12,ARGUMENT IN 13
         AI,12    X'F0'             CONVERT TO EBCDIC
         STB,12   15,4
         LW,12    13
         BEZ      EBCXIT            B:NOTHING MORE TO CONVERT
         AI,4     -1
         BGEZ     DTE10             LOOP
EBCXIT   LW,13    SAVE+1            RESTORE REGS.
         LW,4     SAVE+2
         B        *SAVE             RETURN
         PAGE
TOPOFORM EQU      %
         STW,15   SAVE
         STW,14   SAVE+1
         MTW,0    LPFLAG
         BEZ      *15               EXIT IF NO LP
         LI,8     2
         STB,8    FORMCODE          GIVE FORMAT CONTROL ORDER
         LI,14    MSG0
         BAL,15   PRINT             DO TOP OF FORM
         LI,14    0
         STW,14   TOP               INDICATE AT TOP OF FORM
         LW,14    SAVE+1
         B        *SAVE
*
         PAGE
*
*
*        REPORT - SUBROUTINE
*
*
*
*
*        CALLING SEQUENCE: BAL,15   REPORT
*
*        EXIT SEQUENCE:    B   *15
*
*        REGISTERS:        ALL REGISTERS USED BY THIS ROUTINE ARE SAVED
*
*
*        VARIABLES:  IDIN    -   DEVICE ID OF REPORT DEVICE
*                    REPDEV  -   DEVICE ADDRESS OF REPORT DEVICE
*                    REG. 14 -   WORD ADDRESS OF MESSAGE (TEXTC FORMAT)
*
*
*
*        OFF-LINE REPORT ROUTINE
*
REPDEV   DATA     1
REPORDER DATA     X'05000000'       REPORT ORDER CODE - DEVICE DEPENDENT
*
REPCR    DATA     X'15151515'
*
         BOUND    8
REPIOCD  GEN,8,24,8,24 0,BA(REPCR),X'20',1
         GEN,8,24,8,24 0,0,0,0
*
REPORTS   RES     16                RETURN ADDR.
REPORT15 EQU      REPORTS+15
REPORTX  DATA     0
*
REPORT   EQU      %
*
         MTW,1    REPORTX
         WD,0     X'32'
         LCI      0
         STM,0    REPORTS
*
REPORT0  MTW,0    14                ANY MESSAGE?
         BEZ      REPORTJ           B: NO - EXIT
         MTW,0    LPFLAG
         BNEZ     REPORTA           B: LP OPERATIONAL
         MTW,0    PASS
         BNEZ     *MPCDXIT          EXIT IF 2ND PASS
REPORTA  LB,8     *14               GET MESSAGE BYTE COUNT
         LI,3     3
         STB,8    REPIOCD+3,3       STORE IN 2ND IOCD
         SLS,14   2                 MAKE IT A BYTE ADR
         AI,14    1                 SKIP IST BYTE
         AW,14    REPORDER          MERGE ORDER
         STW,14   REPIOCD+2         SAVE IT
         LB,8     REPORDER          GET ORDER CODE
         STB,8    REPIOCD           SAVE ORDER CODE IN IST IOCD
         TIO,10   *REPDEV           TEST DEVICE
         BCR,12   REPORTC           B: SIO POSSIBLE
         HIO,10   *REPDEV           HALT DEVICE
         LI,9     100000            DELAY
         BDR,9    %
         TIO,10   *REPDEV           TEST DEVICE AGAIN
         BCR,12   REPORTC           B: SIO POSSIBLE
         B        REPORTJ           EXIT ON ERROR
REPORTC  LB,9     11                GET IO STATUS
         CI,9     X'10'             IS DEVICE AUTOMATIC
         BCS,4    REPORTE           B: YES
         B        REPORTJ           EXIT ON ERROR
*
REPORTD  TIO,10   *REPDEV           TEST DEVICE
         LB,9     11                IO STATUS
         CI,9     X'10'             IS DEVICE AUTOMATIC
         BCR,4    REPORTD           B: NO
*
REPORTE  LI,0     DA(REPIOCD)       GET IOCD ADR
         SIO,10   *REPDEV           START IO
         BCR,12   REPORTF           B: SIO ACCEPTED
         B        REPORTJ           EXIT ON ERROR
*
REPORTF  LI,8     100000
         TIO,12   *REPDEV           TEST IO
         BCR,12   REPORTH           B: IO OPERATION COMPLETED
         LI,9     100
         BDR,9    %                 DELAY
         BDR,8    REPORTF+1         LOOP
*
REPORTG  LB,9     13                GET IO STATUS
         CI,9     X'06'             IS CONTROLLER BUSY
         BE       REPORTF           B: YES
         B        REPORTJ           EXIT ON ERROR
*
REPORTH  EQU      %
         LB,9     13
         CI,9     8                 TEST FOR BREAK
         BCS,4    %+3               B: YES
         LI,9     -5
         STW,9    BREAKS            RESET BREAK COUNTER
         MTW,1    BREAKS
         BEZ      REPORTK           EXIT ON FOURTH CONSEC. BREAK
REPORTJ  LCI      0
         LM,0     REPORTS
         B        *15               EXIT
REPORTK  MTW,1    PASS              INDICATE ON 2ND PASS
         LCI      0
         LM,0     REPORTS
         B        MPCD05            TRY TO OUTPUT ON LP AGAIN
*
*
*
         PAGE
*
*
*        PRINT  - SUBROUTINE
*
*
*
*
*        CALLING SEQUENCE:          LI,14     WA(MSG) IN TEXTC FORM
*                                   BAL,15   PRINT
*
*        EXIT SEQUENCE:    B   *15
*
*        REGISTERS:        ALL REGISTERS USED BY THIS ROUTINE ARE SAVED
*
*
*        VARIABLES:  IDPRT   -   DEVICE ID OF PRINT  DEVICE
*                    PRTDEV  -   DEVICE ADDRESS OF PRINT  DEVICE
*
*
*
*
*        OFF-LINE PRINT  ROUTINE
*
RETURN   DATA     0                 NON-ZERO IF EXTRA RETURNS TO BE ADDED
PRTDEV   EQU      LLNDD             PRINT DEVICE ADDRESS
PRTORDER DATA     X'01000000'       PRINT  ORDER CODE - DEVICE
*                                     DEPENDENT
*
PRTCR    DATA     X'40404040'
*
         BOUND    8
PRTIOCD  GEN,8,24,8,24 1,BA(PRTCR),X'20',1
         GEN,8,24,8,24 0,0,0,0
         GEN,8,24,8,24  1,BA(PRTCR),0,1
*
PRINTS    RES     16                RETURN ADDR.
PRINT15  EQU      PRINTS+15
*
PRINT    RD,0     0                 READ SENSE SWITCHES
         BCR,1    %+2               B: PRINT  ALLOWED
         B        *15               EXIT
*
         MTW,0    PASS              IS IT SECOND PASS?
         BNEZ     %+3               B:YES
         MTW,0    LPFLAG            TEST FOR LINE PRINTER
         BEZ      REPORT            B;NONE
         LCI      0
         STM,0    PRINTS
*
PRINT0   MTW,0    14                ANY MESSAGE?
         BEZ      PRINTJ            B: NO - EXIT
PRINT1   EQU      %
         LB,8     *14               GET MESSAGE BYTE COUNT
         LI,3     3
         STB,8    PRTIOCD+3,3       STORE IN 2ND IOCD
         SLS,14   2                 MAKE IT A BYTE ADR
         AI,14    1                 SKIP IST BYTE
         MTB,0    FORMCODE          IS IT A FORMAT MESSAGE
         BEZ      PRINT2            BR IF NOT
         AW,14    FORMCODE          PICKUP FORMAT MODE ORDER CODE
         LI,0     0
         STW,0    FORMCODE          RESET FORMAT FLAG
PRINT2   EQU      %
         LI,8     X'20'
         STB,8    PRTIOCD+3
         AW,14    PRTORDER          MERGE ORDER
         STW,14   PRTIOCD+2         SAVE IT
         TIO,10   *PRTDEV           TEST DEVICE
         BCR,12   PRINTC            B: SIO POSSIBLE
         HIO,10   *PRTDEV           HALT DEVICE
         LI,9     100000            DELAY
         BDR,9    %
         TIO,10   *PRTDEV           TEST DEVICE AGAIN
         BCR,12   PRINTC            B: SIO POSSIBLE
         B        PRINTB
*
PRINTA   LI,14    MPRINT1           'PRINT  DEVICE NOT OPERATIONAL'
         BAL,15   REPORT
         LI,8     0
         STW,8    LPFLAG            INDICATE THE LP NOT AVAIL.
         LCI      0
         LM,0     PRINTS
         B        REPORT
*
PRINTC   LB,9     11                GET IO STATUS
         CI,9     X'10'             IS DEVICE AUTOMATIC
         BCS,4    PRINTE            B: YES
PRINTB   LI,8     10                SET UP 10 REPORTS
PRINTD   LI,14    MPRINT3           'PRINT  DEVICE MANUAL'
         MTW,0    PASS
         BNEZ     *MPCDXIT          GET OUT IF 2ND PASS
*
         BAL,15   REPORT            PRINT  IT
         TIO,10   *PRTDEV           TEST DEVICE
         LB,9     11                IO STATUS
         CI,9     X'10'             IS DEVICE AUTOMATIC
         BCS,4    PRINTE            B: YES
         BDR,8    PRINTD            LOOP 9 TIMES
         B        PRINTA            REPORT ERROR
*
PRINTE   LI,0     DA(PRTIOCD)       GET IOCD ADR
         LI,10    0
         MTW,0    RETURN
         BNEZ     %+3               B: EXTRA RETURNS REQUESTED
         STB,10   PRTIOCD+3         DO NOT DO EXTRA RETURNS
         AI,0     1
         STW,10   RETURN
         SIO,10   *PRTDEV           START IO
         BCR,12   PRINTF            B: SIO ACCEPTED
         B        PRINTA            PRINT ERROR
*
PRINTF   LI,8     100000
         TIO,12   *PRTDEV           TEST IO
         BCR,12   PRINTH            B: IO OPERATION COMPLETED
         LI,9     100
         BDR,9    %                 DELAY
         BDR,8    PRINTF+1          LOOP
*
PRINTF2  HIO,10   *PRTDEV           HALT IO
         B        PRINTA            PRINT ERROR
*
*
PRINTH   LB,9     13                GET IO STATUS
         CI,9     X'08'             UNUSUAL END?
         BCR,4    PRINTJ            B: NO
         B        PRINTA            PRINT ERROR
*
PRINTJ   LCI      0
         LM,0     PRINTS
         B        *15               EXIT
*
*
*
         PAGE
*
*        CONSTANTS AND VARIABLES
*
         BOUND    8
IOCD1    GEN,8,24,8,24    3,BA(RMMIDCW),X'20',5 *READ CONTENTS OF
         GEN,8,24,8,24    1,BA(MMDCW),X'20',5   *   MPC MAIN MEMORY
         GEN,8,24,8,24    3,BA(IDXIDCW),X'20',5 *   INTO READ BUFFER
         GEN,8,24,8,24    2,MPCBUFBA,0,X'2000'  *
*
IDXIDCW  DATA     X'18003880',0   INITIATE DATA XFER IDCW
RMMIDCW  DATA     X'48003A80',0   READ MPC MAIN MEMORY IDCW
MMDCW    GEN,16,16    0,X'1000'   4096 MPC WORDS (16 BITS)
*                                     STARTING AT ADDR. 0
MPCADDR  DATA     0                 DEVICE ADDRESS
SAVE     RES      3                 REG. SAVE
TEN      DATA     10
EBC9LEFT DATA     X'F9000000'       LEFT JUSTIFIED EBCDIC 9
XFFF0    DATA     X'FFF0'
X8000000 DATA     X'8000000'        UE MASK
MPCCHAN  DATA     0
MPCDXIT  DATA     0                 RETURN ADDRESS
XFF      DATA     X'FF'
XFFFF    DATA     X'FFFF'
X7FF     DATA     X'7FF'
D30000   DATA     30000
D1800000 DATA     1800000
D60MEG   DATA     60000000          1 MIN DELAY
LPFLAG   DATA     1                 NON-ZERO IF THERE IS AN LP
TOP      DATA     0                 COUNT OF LINES SINCE TOP OF FORM
EBCZERO  DATA     '   0'            EBCDIC ZERO
FORMCODE DATA     0                 TOP OF FORM FORMAT CODE
PASS     DATA     0                 SET TO ONE ON SECOND PASS
BREAKS   DATA     -4                SET TO 0 ON 4TH CONSEC. BREAK
TAPEMPC  DATA     0                 ZERO IF DISK MPC
         PAGE
*
*        MESSAGES
*
         BOUND    8
MSG1     TEXTC    '       PHYSICAL DEVICE ADDRESS  =      '
MSG2     TEXTC    'MOVEMENT SEEKS                         '
MSG3     TEXTC    'DATA SECTORS WRITTEN                   '
MSG4     TEXTC    'DATA SECTORS READ                      '
MSG5     TEXTC    'DATA TRANSFER COMMANDS EXECUTED        '
MSG6     TEXTC    'SEEK INCOMPLETES                       '
MSG7     TEXTC    'HEADER VERIFICATION ERRORS             '
MSG8     TEXTC    'TRANSFER TIMING ERRORS                 '
MSG9     TEXTC    'DATA CHECK CHARACTER ALERTS            '
MSG10    TEXTC    'COUNT CHECK CHARACTER ALERTS           '
MSG11    TEXTC    'DLI PARITY ERRORS                      '
MSG12    TEXTC    'ALTERNATE TRACKS PROCESSED             '
MSG13    TEXTC    'EDAC CORRECTABLE ERRORS                '
MSG14    TEXTC    'EDAC UNCORRECTABLE ERRORS              '
MSG15    TEXTC    'POSITION OFFSET RETRIES                '
MSG16    TEXTC    'DATA CORRECTIONS INITIATED             '
MSG17    TEXTC    'SEARCH ALERTS                          '
BLANKS   EQU      MSG17+4             4 WORDS OF  EBCDIC BLANKS
MSG21    TEXTC    'LA-0  PARITY COUNTER -                 '
MSG22    TEXTC    'LA-0  OPI DROP COUNTER -               '
MSG23    TEXTC    'LA-0  ALERT COUNTER    -               '
MSG24    TEXTC    'ERROR INTERRUPTS SINCE LAST BOOT -     '
MSG25    TEXTC    'LAST OCCURRENCE - ERROR REGISTER -     '
MSG26    TEXTC    '                - AUXAR          -     '
MSG27    TEXTC    '                - INTAR          -     '
MSG28    TEXTC    'LAST TRACE ADDRESS                     '
MSG30    TEXTC    'READ RECORDS                           '
MSG31    TEXTC    'WRITE RECORDS                          '
MSG32    TEXTC    'RECORDS WITH WRITE ERROR               '
MSG33    TEXTC    'RECORDS WITH READ ERROR                '
MSG34    TEXTC    'TRANSFER TIMING ERRORS                 '
MSG35    TEXTC    'MARGINAL RECORDS                       '
MSG36    TEXTC    'PE RECORDS WITH 1 TRACK CORRECT        '
MSG37    TEXTC    'MTC READ COUNT                         '
MSG0     TEXTC    '1'
STATHDR  TEXTC    '                    ';
                  ,'DEVICE STATISTICS FOR CONTROLLER       '
AUXHDR   TEXTC    'MPC AUXILIARY STATISTICS '
MPCERR   TEXTC    'READ ERROR -  MPC      
';
          ,'   HALT CPU
';
          ,'   RESET I/O
';
          ,'   SET MPC THUMBWHEEL SW. TO 484
';
          ,'   DO RESET & BRANCH
';
          ,'   INCREMENT ADDR. TWICE TO RETRY (ONCE TO SKIP DUMP)
';
         ,'  CPU TO RUN'
TITLE    TEXTC   ' MPC DUMP  MM-DD-YY @ HH:MM    MONITORING TIME=';
                  ,'   0 HOURS,      MINUTES'
MPRINT1  TEXTC    'LP NOT OPERATIONAL - OC USED FOR OUTPUT'
MPRINT3  TEXTC    'LP - MANUAL                                      '
         END
