*
*
*
 TITLE 'CP-V/CP-R SUMMARY MODULE ELLA. 708010-51A00 6.18.74'
         SYSTEM   SIG7FDP
         CSECT
         DEF      SUM:0
         PAGE
         REF      L:SPACE
         REF      L:PRINT,E:PRINT
         REF      TYPEF,:TYPE:,DEVF,:DEV:,MODF,:MOD:
         REF      HEXDEC:,HEXDECE,HEXFIVE,BINEBC
         REF      HEXEBC,EBCHEX8,EBCHEX1,MS:HMSN,HMSN:MS,JD:MD,MD:JD
         REF      R:COM,READ:ERF
         REF      REW:FLAG
         REF      HEXTWO,BUFFER
         REF      S:SYS
         REF      HEXFOUR
         REF      YEAR:1,YEAR:2,DATE:1,DATE:2
         REF      TIME:1,TIME:2
         REF      DSP:
         REF      MOD:EBC
         REF      IONDD
         PAGE
*
*
SUM:0    EQU      %
         LI,14    24
         BAL,15   L:PRINT           PRINT SUMMARY TITLE
         DATA     SUMTITLE
         BAL,15   L:PRINT
         DATA     SUMDOT
         BAL,15   L:SPACE
         BAL,15   L:SPACE
         BAL,15   L:SPACE
         BAL,15   DSP:
         BAL,15   L:SPACE
         BAL,15   L:SPACE
         BAL,15   L:SPACE
*
         LI,4     -1604
         LW,15    0
         STW,15   DATATBL+1604,4    CLEAR TABLES
         BIR,4    %-1               LOOP TILL THE END
*
         LW,13    YEAR:1
         LW,14    YEAR:2
         CW,13    14                CK YEAR BOUNDARY
         BE       CKDATE
SETFLG   STW,1    TIMEFLG           SET TIMEFLG
         B        DATECKD
CKDATE   LW,13    DATE:1
         LW,14    DATE:2
         CW,13    14                CK DATE BOUNDARY
         BNE      SETFLG
         STW,0    TIMEFLG           RESET TIMEFLG
DATECKD  STW,0    SYRSTFLG          RESET SYSTEM RESET FLG
*
SUM:1    EQU      %
*
*
*
         LI,4     -38
         LI,12    0
         STW,12   CNTBL+38,4        CLEAR TBL
         BIR,4    %-1
         STW,1    REW:FLAG          SET REW:FLAG FOR REWIND
         STW,0    IOTBL             INITIALIZE IOTBL
         STW,0    TCNT              CLEAR TCNT
         STW,0    FST28
         STW,0    T28FST
         STW,0    TCNT28
         STW,0    SUMXY
         STW,0    F28
         STW,0    XCNT
         STW,0    SEQFLG
         STW,0    SUMX
*
RETURN   EQU      %
         BAL,15   READ:ERF          READ A RECORD
         CI,15    1                 IS THIS GOOD RECORD?
         BNE      FIXSUM            END OF RECORD
         LB,13    BUFFER
         CI,13    X'18'             SYS.STARTUP CK
         BNE      PAS18
         LB,11    BUFFER,3          FETCH RECOVERY COUNT
         BNEZ     PAS18             NOT INITIAL STARTUP
         STW,1    SYRSTFLG          SET SYS.RESET FLG
PAS18    EQU      %
*
         LB,10    BUFFER            LOAD TYPE CODE TO R10
         CB,10    CODETBL           CK TYPE 11
         BE       PREDEV
         CB,10    CODETBL,1         CK TYPE 12
         BE       PREDEV
         CB,10    CODETBL,2         CK TYPE 13
         BE       PREDEV
         CB,10    CODETBL,3         CK TYPE 15
         BE       PREDEV
*
*
*
         LB,13    BUFFER            FETCH TYPE CODE
         CI,13    X'28'             CK TYPE 28
         BNE      PASS28
         LB,13    S:SYS        FETCH THE SYSTEM INDICATOR...
         BEZ      RETURN       B: IF CP-R...(CODE 28 NOT PERMITTED)
         B        FIX28             MERGE #28 IOADRS TO IOTBL RTN
PASS28   EQU      %
         LI,4     0                 START FROM CODE 17
LSYSERR  EQU      %
         CI,4     16                IS THIS THE LAST TYPE?
         BE       CKCPV
         CB,10    CODETBL+1,4       CK SYSTEM ERROR CODE
         BE       SYSCDE            CPR/CPV SYSTEM ERRCDE
         AI,4     1                 ADD 1 TO X4
         B        LSYSERR           LOOP FOR ALL SYS. ERRORS
*
LX       EQU      %
         MTW,1    CNTX              ADD 1 TO CNTX
         B        RETURN
*
CKCPV    EQU      %
         LB,14    S:SYS             CK SYSTEM FLG
         CI,14    0                 CK FOR CP-R
         BE       LX                CP-R
         LI,5     0
LCPV     EQU      %
         CI,5     20                IS THIS CPV CODE
         BE       LXX               UNKNOWN TYPE CODE
         CB,10    CDETBL,5          CK CP-V SYSTEM ERROR CODES
         BE       SYSCDX
         AI,5     1                 UPDATE X5
         B        LCPV
LXX      MTW,1    CNTXX
         B        RETURN
*
SYSCDX   EQU      %
         CB,10    CDETBL+1          SKIP TYPE 1F
         BE       RETURN
         MTW,1    CNTX+1,5
         B        RETURN
*
*
*
SYSCDE   EQU      %
         CB,10    CODETBL+4,3  SKIP TYPE 16
         BE       RETURN
         CB,10    CODETBL+3,1       SKIP TYPE 32
         BE       RETURN
         CB,10    CODETBL+3,3       SKIP TYPE 42
         BE       RETURN
         CB,10    CODETBL+4         SKIP TYPE 43
         BE       RETURN
         CB,10    CODETBL+4,1       SKIP TYPE 44
         BE       RETURN
         MTW,1    CNTBL,4           INCREMENT CNTBL BY 1
         B        RETURN
*
*
* THIS SECTION MERGE TYPE 28 IOADRS AND IOCNT INTO IOTBL:
*
FIX28    EQU      %
         STW,1    F28               SET F28 FLAG
         STW,2    INDXIO
         STW,3    INDXCNT
         STW,0    WDCNTX
RTN28    EQU      %
         LI,5     5
         CW,5     WDCNTX            LAST ENTRY CK
         BE       PASS28            GO ENTER SYS. ERR. CNT
         LW,6     INDXIO
         LW,13    BUFFER,6
         SLS,13   -16               IOADRS
         STW,13   DEVNEW            FX DEVNEW
         LW,6     INDXCNT
         LW,13    BUFFER,6          IOCNT
         STW,13   IOCNTX            WORKING IOCNT
         MTW,1    WDCNTX
         MTW,2    INDXIO            UPDATE FOR NEXT PAIR
         MTW,2    INDXCNT
         LW,13    IOCNTX
         CW,13    0
         BL       RTN28             CK MINUS I/OCOUNT
         B        MERGE28           MERGE IOADR TO IOTBL
*
*
* THIS SECTION BUILDS IOTBL, MODTBL AND ADDRTBL.
*
PREDEV   EQU      %
         LW,13    BUFFER
         STW,13   ETYPE             SAVE ERCODE
         AND,13   XFFFFX
         STW,13   MODNEW            NEW MOD NUMBER
         LI,4     2
         LW,13    BUFFER,4
         AND,13   XFFFFX
         STW,13   DEVNEW            NEW I/O ADRS
*
MERGE28  EQU      %                 MERGE #28 IOADR.
         LW,13    DATATBLA          ADDR. OF DATATBL
         STW,13   ADDRTBL           INITIALIZE ADDRTBL
         LI,4     1                 INITIALIZE X4=1
         CW,0     IOTBL             CK I/O ADRS COUNT
         BE       L2                THE FIRST ENTRY
L1       EQU      %
         LW,13    IOTBL,4
         CI,13    0
         BE       L2
         CW,13    DEVNEW            DOES THIS MATCH OLD I/O ADRS?
         BE       L10X
         AI,4     1                 INCREMENT X4 BY 1
         CI,4     100               CK FOR GT 100 ENTRIES
         BGE      ERMESS1
         B        L1
L2       EQU      %
         LW,14    DEVNEW
         STW,14   IOTBL,4           ADDING A NEW IOADDR
         LB,13    BUFFER            CK #28
         CI,13    X'28'
         BNE      X1
         LW,14    X40X
         STW,14   MODTBL,4
         B        X2
X1       EQU      %
         LW,14    MODNEW
         STW,14   MODTBL,4          ADDING A NEW MOD. NO.
X2       EQU      %
         MTW,1    IOTBL             INCREMENT IOTBL CNT BY 1
*
         LW,13    DATATBLA
         STW,13   ADDRTBL,4
         AI,13    12                12 COL.
         STW,13   DATATBLA          SAVE FOR NEXT NEW I/O ADRS
L10      LW,13    ADDRTBL,4
         STW,13   WORK              SAVE TO WORK AREA
         LB,13    BUFFER            FETCH TYPECODE
         CI,13    X'28'             CK TYPE 28
         BE       FXIOCNT
         LI,6     9
         LW,10    BUFFER,6
         STW,10   IOCNTX            WORKING IOCNT
         CB,13    CODETBL           CK 11
         BE       L11
         CB,13    CODETBL,2         CK TYPE 13
         BE       L13
         CB,13    CODETBL,3         CK TYPE 15
         BE       L15
         LW,14    WORK
         AI,14    3
         MTW,1    *14               ADD 1 TO TYPE 12 CNT
         B        FXSUB
*
L10X     LW,14    MODTBL,4
         CW,14    X40X              IS TYPE 28 ENTERED
         BNE      L10
         LB,13    BUFFER            CK TYPE 28
         CI,13    X'28'
         BE       L10               TYPE 28
         LW,14    MODNEW
         STW,14   MODTBL,4
         B        L10
*
*
L11      MTW,1    *WORK             ADD 1 TO TYPE 11 CNT
         B        FXSUB
L13      LW,14    WORK
         AI,14    1
         MTW,1    *14               ADD 1 TO TYPE 13 CNT
         B        FXSUB
L15      LW,14    WORK
         AI,14    2
         MTW,1    *14               ADD 1 TO TYPE 15 CNT
FXSUB    LW,14    WORK
         AI,14    4
         MTW,1    *14
*
         LB,13    BUFFER
         CI,13    X'12'
         BE       FXIOCNT
         CI,13    X'15'
         BE       FXIOCNT
         B        RETURN            11/13, RETURN
FXIOCNT  EQU      %
         LB,13    BUFFER
         CI,13    X'28'
         BE       SX28
         LI,6     9
         LW,14    BUFFER,6
         CW,14    0
         BL       RETURN            MINUS I/O COUNT
SX28     EQU      %
         LW,14    WORK
         AI,14    5                 ACCESS TIME1
         LW,13    *14
         CW,13    0                 FIRST TIME CK
         BNE      PASFST
         LW,12    BUFFER,1          FETCH FIRST TIME
         STW,12   *14               STORE FIRST TIME,TB
*
         LW,14    WORK
         AI,14    7
         STW,12   *14               STORE CURR. TIME TC
*
         LW,14    WORK
         AI,14    6
         LW,13    IOCNTX
         STW,13   *14               STORE FIRST IOCNT, CB
*
         LW,14    WORK
         AI,14    8
         STW,13   *14               STORE CURR. IOCNT,CC
*
CK28X    EQU      %
         LB,13    BUFFER
         CI,13    X'28'
         BE       RTN28             RETURN TO FIX28 ROUTINE
         B        RETURN
*
PASFST   EQU      %
         LW,13    SYRSTFLG
         CW,13    0
         BE       PAS1              SYSTEM RESET FLG ON
         STW,0    SYRSTFLG          RESET FLG
         LW,14    WORK
         AI,14    6                 CB
         STW,0    *14               CB=0
*
         LW,14    WORK
         AI,14    9
         LW,13    *14               CT
*
         LW,14    WORK
         AI,14    10
         LW,12    *14               DELT
         AW,12    13                CT+DELTA
*
         LW,14    WORK
         AI,14    9
         STW,12   *14               STORE CT
PAS1     LW,14    WORK
         AI,14    6
         LW,13    *14               FETCH CB
         LW,14    WORK
         AI,14    8
         LW,12    IOCNTX            FETCH CURR. IOCNT
         STW,12   *14               STORE CC
         LW,12    *14               FETCH CC
         SW,12    13
         LW,14    WORK
         AI,14    10
         STW,12   *14               STORE DELTA
*
         LW,14    WORK
         AI,14    7
         LW,13    BUFFER,1
         STW,13   *14               UPDATE TC
*
         B        CK28X
ERMESS1  LI,14    40
         BAL,15   E:PRINT           ERROR MESSAGE
         DATA     ERRMESS1
         B        R:COM             READ ANOTHER CARD
*
*
         PAGE
*
*
* THIS SECTION PRINTS OUT SYSTEM ERRORS.
*
*
FIXSUM   EQU      %
*
*  CLEAR IO ACTIVITY COUNT BECAUSE IT IS NOT TO BE
*  PRINTED.. IF IN THE FUTURE,IO ACTIVITY IS DESIRED,
*  SIMPLY DELETE THE INSTRUCTION BELOW.....
*
*
         STW,0    CNTX+8       CLEAR IO ACTIVITY COUNT.
*
*
         LW,11    CNTBL+1           SAVE CNTBL+1(CNT18)
         LW,12    DEVF              CHECK DEVICE FLAG
         BEZ      PAS18Y
         STW,0    CNTBL+1           CLEAR CNT18
PAS18Y   LW,12    MODF              CHECK MODEL FLAG
         BEZ      PAS18Z
         STW,0    CNTBL+1           CLEAR CNT18
PAS18Z   EQU      %
         LW,12    TYPEF
         BEZ      PAS18X
         LW,4     CNTBL+1           FETCH SYSTEM RESET COUNT
         BEZ      PAS18X            B: NOT EQYUAL TO ZERO
         LI,4     0
LP1      CI,4     5
         BE       MASK18            NO TYPE18 ENTERED
         LW,13    :TYPE:,4
         CI,13    X'18'
         BE       PAS18X
         AI,4     1
         B        LP1
MASK18   EQU      %
         STW,0    CNTBL+1           CLEAR CNT18
PAS18X   EQU      %
         LI,14    13
*
         STW,0    SUMX
         LI,13    0
         LI,4     0                 CLEAR X4
         LI,5     0                 CLEAR X5
         LI,6     0                 CLEAR X6
LFIXSUM  AI,6     6                 ADD 6  TO X6
         CI,4     17                CK FOR LAST CODE
         BGE      CHKCPV
LPX      EQU      %
         LW,10    SUMX
         AW,10    CNTBL,4           ACCUMULATE SUM IN R10
         STW,10   SUMX              SAVE R10
         LW,14    CNTBL,4           LOAD CNTBL TO R14
         BEZ      RETRY        NO ENTRY FOR THIS COCE.....
         LW,11    XCNT         ANY ENTRYES.
         BNEZ     NOPR
         LI,14    13           SET INDEX
         BAL,15   L:PRINT
         DATA     SYSERR
         BAL,15   L:SPACE
         LI,14    28
         BAL,15   L:PRINT
         DATA     TYPEERR
         MTW,1    XCNT
NOPR     EQU      %
         LW,14    CNTBL,4      FETCH THE COUNT OF THE TYPE....
         LW,11    SYSTLA
         AW,11    6
         STW,11   DATAHEX2
         LI,13    0
         BAL,15   HEXFOUR      CONVERT TO DEC. EBC...4 DIGITS
DATAHEX2 DATA     0                 TO BE UPDATED EACH TIME
         LI,12    4            SET THE COUNT FOR ZERO SUPRESSION
         LW,14    DATAHEX2     FETCH THE ADDRESS.
         BAL,15   SUPZR        SUPRESS LEADING ZEROES.
         AI,6     1                 INCREMENT X6 BY 1
         LW,11    SYSTLA
         AW,11    5
         STW,11   OUTPUT            PREFIX PRINT BUFFER ADDR.
         AI,5     7                 ADD X5 BY 7, ADJUST NEW LINE
         CI,4     16            CHECK FOR CP-R UNKNOWN.
         BE       CKX
OKX      EQU      %
         LI,14    28
         BAL,15   L:PRINT
OUTPUT   DATA     0                 TO BE FIXED FOR EACH PRINT
         AI,4     1
         B        LFIXSUM
*
CKX      LB,14    S:SYS
         BEZ      OKX          B: IF ZERO (SYSTEM = CP-R)
         B        OUTPUT+1          SKIP CP-R UNKNOWN TYPE PRINT
RETRY    EQU      %
         AI,4     1
         AI,6     1
         AI,5     7
*
         B        LFIXSUM
CHKCPV   EQU      %
         LB,14    S:SYS
         BEZ      FIXTOTAL
         CI,4     38
         BGE      FIXTOTAL     BRANCH ALL SYSTEM ERRORS DONE
         B        LPX
*
*
FIXTOTAL BAL,15   IOCNTFX           END OF SYS. ERR., GO FIX IOCNT
         PAGE
*
*
* THIS SECTION OUTPUTS DEVICE ERRORS AND TOTAL ERRORS.
*
*
FXDEVSUM EQU      %
*                                   START PRINT OUT DATA LINES BELOW:
*
         LW,14    IOTBL             GET IOTBL NO. OF ENTRY
         CI,14    0
         BE       TOTAL             NO ENTRY
         AI,14    1                 READJUST ENTRYCNT
         STW,14   ENTRYCNT          SAVE ENTRY COUNT
*
         LI,7     1                 X7=1
         BAL,15   FXINDX4           SORT IOTBL RTN
*
LOOPOUT  LW,15    X40X
         LI,5     -44
         STW,15   OUTBUFF+44,5      MOVE IN SPACE
         BIR,5    %-1
*
         CW,7     ENTRYCNT
         BE       TOTAL
*
         LW,4     IOTBLX,7
         SLS,4    -24
         LW,11    IOTBL,4           LOAD FST I/O ADDR.
         STW,11   DEVNUM            SAVE DEV.NO.
DEV10    EQU      %
         LW,14    DEVNUM
         BAL,15   IONDD             RESULT IN R14 AND R15
         STH,15   OUTBUFF+2         STORE THE LOWER HALF WORD
         SLS,15   -16               SHIFT 16 BITS TO RIGHT
         STB,15   OUTBUFF+1,3
*                                   CK MDL BELOW:
*
         LW,11    MODTBL,4
         STW,11   MODNUM
*
MOD10    EQU      %
         LW,14    MODNUM
         CW,14    X40X              IS MODEL NO.=0(40)
         BE       LOOPLP            DON'T PRINT OUT
         BAL,15   MOD:EBC
         STW,15   OUTBUFF
*
         LW,10    ADDRTBL,4
         STW,10   WORK
         LI,13    0
         LW,14    *WORK             ACCESS 11
         STW,14   SUM11
         BAL,15   HEXFIVE
         DATA     OUTBUFF+3
*
         LW,14    %-1          FETCH THE CURRENT ADDRESS.
         LI,12    5            SET THE COUNT
         BAL,15   SUPZR        SUPRES LEADING ZEROES.
A13      EQU      %
         LW,13    WORK
         AI,13    1
         LW,14    *13
         STW,14   SUM13
         LI,13    3
         BAL,15   HEXFIVE
         DATA     OUTBUFF+4
         LW,14    %-1          FETCH CURRENT ADDRESS.
         LI,12    5            SET COUNT
         BAL,15   SUPZR        SUPRESS LEADING ZEROES.
A15      EQU      %
         LW,13    WORK
         AI,13    2
         LW,14    *13               ACCESS 15
         STW,14   SUM15
         LI,13    3
         BAL,15   HEXFIVE
         DATA     OUTBUFF+6
         LW,14    %-1
         LI,12    5
         BAL,15   SUPZR
A12      EQU      %
         LW,13    WORK
         AI,13    3
         LW,14    *13
         STW,14   SUM12
         LI,13    2
         BAL,15   HEXFIVE
         DATA     OUTBUFF+8
         LW,14    %-1
         LI,12    5
         BAL,15   SUPZR        SUPRESS LEADING ZEROES.
*
*
TYPEF0   LW,13    WORK
         AI,13    4
         LW,14    *13
         CI,14    0
         BE       LOOPLP
         AWM,14   SUMXY             TOTAL
*
LPASS    EQU      %
         LI,13    3
         STW,0    PATCH        RESET PATCH
         LW,12    WORK
         AI,12    11                ACCESS IOCNT ENTRY
         LW,14    *12
         CW,14    STARS
         BNE      NOSTAR
         LW,14    STARS
         LW,13    STARS+1
         LW,12    STARS+2
         STW,14   OUTBUFF+10
         STW,13   OUTBUFF+11
         STW,12   OUTBUFF+12
         LW,13    STARS+3
         STW,13   OUTBUFF+13
         B        TITLCK
NOSTAR   EQU      %
         STW,0    STARF             RESET STARF
         CI,14    0            LESS THAN ZERO
         BGE      %+3
         LCW,14   14           GET 2'S COMPLEMENT
         STW,1    PATCH
         BAL,15   HEXDECE
         DATA     OUTBUFF+10
*
TITLCK   EQU      %
         LW,13    PATCH
         BEZ      %+3
         LI,13    X'D5'
         STB,13   OUTBUFF+10,2
         LW,13    SEQFLG
         BNEZ     NOTITL
         BAL,15   L:SPACE
         BAL,15   L:SPACE
         BAL,15   L:SPACE
         LI,14    13
         BAL,15   L:PRINT           PRINT TITLES
         DATA     DEVERR
         BAL,15   L:SPACE
         LI,14    46
         BAL,15   L:PRINT
         DATA     DEVT:1
         LI,14    51
         BAL,15   L:PRINT
         DATA     DEVT:2
         STW,1    SEQFLG
NOTITL   EQU      %
*
*
         LI,14    53
         BAL,15   L:PRINT           PRINT A LINE
         DATA     OUTBUFF
LOOPLP   EQU      %
         AI,4     1
         AI,7     1
         B        LOOPOUT           LOOP TILL ALL DEV. ERR. PRINTED OUT
TOTAL    EQU      %
         BAL,15   L:SPACE
         BAL,15   L:SPACE
         BAL,15   L:SPACE
*
         LW,14    SUMXY             LOAD TOTAL VALUE
         AW,14    SUMX              SUMX+SUMXY
         BEZ      NONE         NO ERRORS.............
         LI,13    3
         BAL,15   HEXFIVE
         DATA     TOTLER+3
         LI,14    32
         BAL,15   L:PRINT
         DATA     TOTLER            PRINT TOTAL ERRORS
         B        %+4          SKIP ..........
NONE     LI,14    9
         BAL,15   L:PRINT
         DATA     NONETX
         BAL,15   L:SPACE
         BAL,15   L:SPACE
         BAL,15   L:SPACE
         B        R:COM             READ ANOTHER COMMAND
NONETX   TEXT     'NO ERRORS'
         PAGE
*
*
* THIS SUBROUTINE WILL SUPRESS LEADING ZEROES BEFORE OUPUT
* OF THE BUFFER....  ALL X'F0' BEFORE A VALID EBCIDC NUMBER
* IS SUPRESSED BEFORE OUPUT.
* REGISTER 13 IS ASSUMED TO HAVE THE STARTING BYTE
* REGISTER 12 IS TO HAVE THE AMOUNT OF DECIMALS.
* REGISTER 14 IS TO HAVE THE ADDRESS OF THE BUFFER....
*
*        BAL,15   SUPZR    ...........CALL........
*
*  ALL REGISTERS ARE SAVED................
*
*
SUPZR    LCI      4                 SAVE REGISTERS 13-15 6,7
         STM,12   SUPSAV            2-0 3-1,4-2 5-3
         LCI      2
         STM,6    SUPSAV+4
         LW,6     SUPSAV            FETCH COMPLEMENT (2)
         AI,6     -1                ADD 1........(-#) + 1
         LW,7     13           SET REGISTER 7 WITH STARTING BYTE CNT
DT0      LB,15    *14,7        FETCH THE FISTR LEADING NUMBER.
         CI,15    X'F0'        AN EBCIDC ZERO
         BNE      DT1          B: IF NOT EQUAL.....
         LI,15    X'40'        SUBSTITUTE WITH BLANKS.
         STB,15   *14,7             STORE TO OUPUT BUFF.
         AI,7     1            BUMP 7
         BDR,6    DT0               LOOP TILL DONE.......
DT1      LCI      4
         LM,12    SUPSAV            RESTORE REGISTERS.
         LW,6     SUPSAV+4
         LW,7     SUPSAV+5
         B        *15
SUPSAV   RES      6
*
*
*
*
         PAGE
*
*
* THIS SUBROUTINE CALCULATE EACH I/O COUNT.
*
*
IOCNTFX  EQU      %
         STW,4    SAVCNT
         LCI      5
         STM,11   SAVCNT+1
         STW,0    BADFLG
         LW,14    IOTBL
         CI,14    0                 NO ENTRY OF IOADR CK
         BE       TOTAL             SKIP DEV. ERR. PRINT
         AI,14    1
         STW,14   ENTRYCNT
         LI,4     1                 X4=1
LFXCNT   EQU      %
         CW,4     ENTRYCNT
         BE       ENDX              FINISH FXIOCNT
         LW,11    ADDRTBL,4
         STW,11   WORK
*
         LW,13    WORK
         AI,13    4                 ACCESS SUBTOTL
         LW,14    *13
         CW,14    0                 DEV. ERR. ENTRY=0 CK
         BE       SKIPCAL           SKIP IOCNT CALCULATIONS
         LB,14    S:SYS
         CI,14    0                 CK CP-R
         BE       BADF
*
GOODX    EQU      %
         BAL,15   CKIOCNT
         LW,13    BADFLG
         CW,13    0
         BE       CALCNT            CALCULATE IOCNT
         LW,11    STARS
         LW,13    WORK
         AI,13    11                ACCESS IOCNT ENTRY
         STW,11   *13               STORE STARS TO IOCNT ENTRY
*
*
         STW,0    BADFLG            RESET BADFLG
SKIPCAL  EQU      %
         AI,4     1
         B        LFXCNT            FX NEXT ARRAY
*
CALCNT   EQU      %
         LW,13    WORK
         AI,13    10                DELTA ENTRY
         LW,12    *13               R12=DELTA
*
         LW,13    WORK
         AI,13    9                 CT
         LW,11    *13               R11=CT
         AW,11    12                DELTA+CT=IOCNT=R11
         LW,13    WORK
         AI,13    11                IOCNT ENTRY
         STW,11   *13               STORE IOCNT
         B        SKIPCAL
BADF     STW,1    BADFLG
         B        GOODX+1           SKIP CKIOCNT ROUTINE
*
ENDX     EQU      %
         LW,4     SAVCNT
         LCI      4
         LM,11    SAVCNT+1
         B        *SAVCNT+5
*
*
*
*
* THIS SUBROUTINE CHECK I/O COUNT CRITERIA.  IF IT IS NOT
* MET THE BADFLG IS SET.
*
*
CKIOCNT  EQU      %
         STW,4    SAVCAL+7
         LCI      7
         STM,9    SAVCAL
*
         LW,13    TIME:1
         LW,14    TIME:2
         LW,9     TIMEFLG
         BEZ      CALCK
         LW,14    YEAR:1
         LW,13    YEAR:2
         CW,14    13
         BNE      CKYEAR            CK YEAR BOUNDARY
         LW,13    DATE:1
         LW,14    DATE:2
         CW,13    14
         BE       CALCK
         AI,13    1                 D1+1
         CW,13    14
         BNE      EXT
TIMETST  EQU      %
         LW,13    TIME:1            T1
         LW,14    TIME:2            T2
         CW,14    13
         BL       CALCK
         B        EXT
CKYEAR   EQU      %
         AI,14    1                 YEAR+1
         CW,14    13
         BNE      EXT
         LW,13    DATE:1
         LW,14    DATE:2
         AI,14    365               D2+365
         AI,13    1                 D1+1
         CW,14    13
         BE       TIMETST
         B        EXT
CALCK    EQU      %
         LW,11    WORK
         AI,11    5
         LW,10    *11               R10=TB
         LW,11    WORK
         AI,11    7
         LW,9     *11               R9=TC
         SW,10    13                TB-T1=TX
         STW,14   12                R12=T2
         SW,14    9                 T2-TC=TY
         SW,12    13                T2-T1=R12=TZ
         AW,10    14                TX+TY=TW
         LI,4     4
         STW,10   11                CHANGE TO ODD REG.
         MW,11    4                 TWX4
         CW,12    11                TZ G.E. 4TW CK
         BGE      EXT
         STW,1    BADFLG            CRITERIA NOT MET
         B        EXT
*
EXT      EQU      %
         LCI      6
         LM,9     SAVCAL
         LW,4     SAVCAL+7
         B        *SAVCAL+6
*
*
SAVCAL   RES      8
*
*
*
*
* THIS SUBROUTINE SORTS IOTBL IN ASCENDING ORDER.
*
*
FXINDX4  EQU      %
         LCI      6
         STM,4    SAVX4+1
         STW,15   SAVX4
         LW,6     IOTBL
         STW,6    COUNT
         LI,4     1
LPXX     CW,4     ENTRYCNT
         BE       SORTIO
         LW,5     IOTBL,4
         STB,4    5
         STW,5    IOTBLX,4
         AI,4     1
         B        LPXX
SORTIO   EQU      %
*
         LI,4     0
         LI,5     0
LOOP1    LW,6     IOTBLX+1,4
         STW,6    TEMPO             SAVE 6
         AND,6    XXXXFFFF          MASK FIRST HALF WORD
LOOP2    LW,8     IOTBLX+1,5        FETCH NEXT WORD
         AND,8    XXXXFFFF
         CW,6     8
         BL       GOX
         LW,6     TEMPO
         XW,6     IOTBLX+1,5
         STW,6    TEMPO
         AND,6    XXXXFFFF
GOX      AI,5     1
         CW,5     COUNT
         BL       LOOP2
         LW,6     TEMPO
         STW,6    IOTBLX+1,4
         AI,4     1
         LW,5     4
         CW,4     COUNT
         BL       LOOP1
         LCI      6
         LM,4     SAVX4+1
         B        *SAVX4
*
*
SAVX4    RES      8
TEMPO    DATA     0
COUNT    DATA     0
         PAGE
*
*
*
*
SUMTITLE TEXT     'E R R O R  S U M M A R Y'
SUMDOT   TEXT     '- - - - -  - - - - - - -'
SYSERR   TEXT     'SYSTEM ERRORS'
TYPEERR  TEXT     'TYPE                  ERRORS'
CODETBL  DATA     X'11121315',X'17181921',X'22232730',X'31324142'
         DATA     X'43441D16'
CDETBL   DATA     X'101A1B1E',X'1F202428',X'34353637'
         DATA     X'38395051',X'52532649'
         DATA     0
*
CNTBL    EQU      %
         RES      16
CNTX     DATA     0
         RES      20
CNTXX    DATA     0,0,0
*
*
*
SYSTLE   EQU      %
         TEXT     'PARITY ERROR             '
         TEXT     'SYSTEM STARTUP           '
         TEXT     'WATCHDOG TIMER           '
         TEXT     'CONFIGURATION            '
         TEXT     'SYSTEM I.D.              '
         TEXT     'TIME STAMP               '
         TEXT     'OPERATOR MESSAGE         '
         TEXT     'PROCESSOR FAULT INT.     '
         TEXT     'MEMORY FAULT INTERRUPT   '
         TEXT     'SEC. POLL RECORD         '
         TEXT     'PROCESSOR CONFIGURATION  '
         TEXT     'MEMORY PARITY SEC.       '
         TEXT     'MEMORY PARITY SEC.       '
         TEXT     'MEMORY PARITY SEC.       '
         TEXT     'INSTRUCTION EXCEPTION    '
         TEXT     'DEVICE ERROR SEC.        '
         TEXT     'UNKNOWN TYPE             '
         TEXT     'COPY ERROR               '
         TEXT     'FILE INCONSISTENCY       '
         TEXT     'SYMBIONT INCONSISTENCY   '
         TEXT     'LOST ENTRIES             '
         TEXT     'DUPLICATE ENTRIES        '
         TEXT     'POWER FAILSAFE           '
         TEXT     'BAD GRANULES RELEASE     '
         TEXT     'I/O ACTIVITY COUNT       '
         TEXT     'INSTRUCTION FAIL(AIO)    '
         TEXT     'INSTRUCTION FAIL(RIO)    '
         TEXT     'INSTRUCTION FAIL(SIO)    '
         TEXT     'INSTRUCTION FAIL(TIO)    '
         TEXT     'INSTRUCTION FAIL(TDV)    '
         TEXT     'INSTRUCTION FAIL(HIO)    '
         TEXT     'ENQUEUE TABLE OVERFLOW   '
         TEXT     'PARTITIONED RESOURCE     '
         TEXT     'RETURNED RESOURCE        '
         TEXT     'PRIVATE PACK INCONS.     '
         TEXT     'REMOTE PROCESSING        '
         TEXT     'MEMORY PARITY TERTIARY   '
         TEXT     'UNKNOWN TYPE             '
*
*
         RES      25
SYSTLA   DATA     SYSTLE
HEX2ADDR DATA     DATAHEX2
SUMX     DATA     0
*
DEVERR   TEXT     'DEVICE ERRORS'
DEVT:1   TEXT     '      IO     SIO   UNEXP   DEV    DEV      IO'
DEVT:2   TEXT     'MDL   ADRS   FAIL  INTRPT  ERROR  TIMEOUT  ACTIVITY'
TOTLER   TEXT     'TOTAL ERRORS:                    '
X40X     DATA     X'40404040'
WORK     DATA     0
OUTBUFF  RES      44
X6DX     DATA     X'40406D6D'
ENTRYCNT DATA     0
ETYPE    DATA     0
XXXXFFFF DATA     X'0000FFFF'
CNT1     DATA     0
CNT2     DATA     0
IDX12    DATA     0
IDX13    DATA     0
XFFFFX   DATA     X'0000FFFF'
DATATBLA DATA     DATATBL           ADDR. OF DATATBL
DATATBL  RES      1200
IOTBL    RES      101
MODTBL   RES      101
ADDRTBL  RES      101
IOTBLX   RES      101
PATCH    DATA     0
DEVNEW   DATA     0
MODNEW   DATA     0
MODNUM   DATA     0
DEVNUM   DATA     0
ERRMESS1 TEXT     'IOTBL ENTRIES(I/O ADDRESSES) EXCEED 100.'
XCNT     DATA     0
SUMXY    DATA     0
F11      DATA     0
F12      DATA     0
F13      DATA     0
F15      DATA     0
SUM11    DATA     0
SUM12    DATA     0
SUM13    DATA     0
SUM15    DATA     0
TCNT     DATA     0
FST28    DATA     0
SAVE28   RES      20
T28FST   DATA     0
SAVE28X  RES      20
TCNT28   DATA     0
TIMEFLG  DATA     0
SYRSTFLG DATA     0
IOCNTX   DATA     0
WDCNTX   DATA     0
INDXIO   DATA     0
INDXCNT  DATA     0
SAVCNT   RES      6
BADFLG   DATA     0
STARS    TEXT     '   **********   '
F28      DATA     0
STARF    DATA     0
SEQFLG   DATA     0
         PAGE
         END      SUM:0

