         PCC      0
         TITLE    'C O C D   -   C O C   H A N D L E R   D A T A'
         DEF      COCD
COCD     EQU      %
RCVRCHK  EQU      0                 0/DON'T DO RECEIVER CHECKING IN COC
*                                   1/DO RECEIVER CHECKING IN COC INITIA
         SYSTEM   UTS
         DEF      COCIPC            INPUT PARITY ERROR COUNT
         DEF      COCIPL            INPUT PARITY ERROR LINE NO. (LAST)
         DEF      COCOEC            OUTPUT EXTRANEOUS INTERRUPT COUNT
         DEF      COCOEL            OUTPUT EXTRANEOUS INTERRUPT LINE NO.
         DEF      COCBLC            BAD INPUT INT LINE # COUNT
         DEF      COCBLN            BAD INPUT INT LINE #, COC #
         DEF      CO:IN0            HIGHEST PRIO COC INPUT INT PSDS
         DEF      CO:INTFL          COC INTERRUPT STATUS FLAG
         DEF      CO:HIIL           HIGHEST PRIORITY INPUT INTERRUPT
*                                   .. LEVEL SELECT BIT
         DEF      CO:AIL            ALL COC INTERRUPT LEVEL SELECT BITS
         DEF      CO:XPSDI          XPSD INSTRUCTION FOR OTHER THAN THE
*                                   .. HIGHEST PRIORITY INPUT INT
         DEF      ECBFRCHN          HEAD OF ECBS FREED WHILE COC
*                                   .. WAS PROCESSING
         DEF      COB:SIOS          TIO STATUS INDEXED BY COC#
         DEF      COCE              INPUT INTERRUPT EVENT FLAG
         DEF      COCMESS           SEND KEYIN MESSAGE BUFFER
         DEF      COCM1             NON-STARTABLE COC ERROR MESSAGE
         REF      COA:IG            EXTERNAL INTERRUPT GROUP FOR COCS
         REF      COCIP             COC INPUT INTERRUPT PROCESSING ENTRY
         PAGE
COCIPC   DATA     0                 INPUT PARITY ERROR COUNT
COCIPL   DATA     0                 INPUT PARITY ERROR COC # (BYTE 0),
*                                   .. LINE # (BYTE 3)
COCOEC   DATA     0                 UNEXPECTED OUTPUT INTERRUPT COUNT
COCOEL   DATA     0                 UNEXPECTED OUTPUT INTERRUPT COC #
*                                   .. (BYTE 0), LINE # (BYTE 3)
COCBLC   DATA     0                 # OF INPUT INTERRUPTS FROM LINES NOT
*                                   .. SYSGEN'D FOR
COCBLN   DATA     0                 LAST COC # (BYTE 0), LINE # (BYTE 3)
*                                   .. OF INTERRUPT ON LINE NOT SYSGEN'D
CO:INTFL GEN,16,16    -1,0          T:COCHC LOCK-OUT FLAG, BY-PASS COUNT
*                                   .. INITIALIZE NEGATIVE SO CLOCK 3
*                                   .. WON'T CALL T:COCHC/COCINIT BEFORE
*                                   .. GHOST1 CALLS COCINIT
COCE     DATA     -1                -1/NO EVENT WAS REPORTED DURING INPUT
*                                   .. INTERRUPT PROCESSING
ECBFRCHN DATA     0                 HEAD OF ECBS FREED WHILE COC
*                                   .. WAS PROCESSING
*
COCMESS  DATA     0                 ADMINISTRATIVE MESSAGE - SET BY SEND
         RES      15                .. KEYIN, DISPLAYED IN PAGE HEADINGS
         PAGE
************************************************************************
*  INPUT INTERRUPT DOUBLEWORDS AND XPSD INSTRUCTIONS
************************************************************************
*
CO:XPSDI XPSD,8   CO:INN            XPSD INSTRUCTION FOR OTHER THAN THE
*                                   .. HIGHEST PRIORITY INPUT INT
COCRP    EQU      1                 RGSTR PNTR FOR INTERRUPT PROCESSING
*
*  INPUT INTERRUPT PSD - HIGHEST PRIORITY COC
*
CO:IN0   :PSD     (RES),(IA,COCIP),(WK,1),(RP,COCRP)
*
*  INPUT INTERRUPT PSD - OTHER THAN HIGHEST PRIORITY COC
*  WARNING - CO:INN MUST IMMEDIATELY FOLLOW CO:IN0
*
CO:INN   :PSD     (RES),(IA,CO:IPN),(WK,1),(RP,COCRP),;
                  (CI),(II),(EI)
************************************************************************
*  INPUT INTERRUPT TRIGGER ROUTINE - THIS ROUTINE IS ENTERED ON AN
*  INPUT INTERRUPT FOR OTHER THAN THE HIGHEST PRIORITY COC, AND
*  TRIGGERS THE HIGHEST PRIORITY COC INPUT INTERRUPT LEVEL.  COC
*  INPUT INTERRUPT PROCESSING WILL THEN BE ENTERED AT COCIP, AND
*  ALL COCS WILL BE PROCESSED.
************************************************************************
CO:IPN   LW,5     CO:HIIL           L/HIGHEST INPUT INTERRUPT LEVEL
*                                   .. SELECT BIT
         WD,5     X'1700'+COA:IG    TRIGGER HIGHEST PRIORITY INPUT INT
         LPSD,11  CO:INN            RETURN TO INTERRUPTED POINT, CHANGE
*                                   .. REG BLK POINTERS, CLEAR AND ARM
*                                   .. CURRENTLY ACTIVE INT LEVEL
*
CO:AIL   DATA     0                 ALL COC INTERRUPT LEVEL SELECT
*                                   .. BITS - SET UP IN COCINIT
CO:HIIL  DATA     0                 HIGHEST INPUT INTERRUPT LEVEL
*                                   .. SELECT BIT - SET UP IN COCINIT
*
*  SIO CONDITION CODES FROM EACH COC DEVICE (OBTAINED BY COCINIT)
*
COB:SIOS DATA     0,0               SIO CC'S, BYTE INDEXED BY COC#
         PAGE
COCM1    TEXTC    ' !!BAD COC - MENDD
'
         DO       RCVRCHK
         DEF      COCM2
COCM2    TEXTC    '
SKIPPING COC1 RECEIVER  0
'
         FIN
         END

