         PCC      0
         TITLE    'C O C D   -   C O C   H A N D L E R   D A T A'
************************************************************************
*
*
*M*      COCD     MODULE FOR SYSGEN-INDEPENDENT COC HANDLER DATA
*
*
************************************************************************
*P*  NAME:    COCD
*P*  PURPOSE: PROVIDE DATA FOR THE COC HANDLER WHICH IS NOT SYSGEN
*P*           DEPENDENT.
************************************************************************
         DEF      COCD:             PATCHING DEF
COCD:    RES
         SYSTEM   UTS
         DEF      COCEFLG           COC EXECUTION OPTION FLAGS
         DEF      COCGFLG           COCG GHOST REQUEST FLAGS
         DEF      COCQST            MESSAGE FOR ESC-Q
         DEF      DUMPLINE          LINE # FOR ESC-ETB MONITOR DUMP
         DEF      COC#BUFS          NUMBER OF COC BUFFERS IN USE
         DEF      COCIPC            INPUT PARITY ERROR COUNT
         DEF      COCIPL            LAST INPUT PARITY ERROR LINE # (BYTE 3)
*,*                                 COC # FOR ABOVE LINE # (BYTE 0)
         DEF      COCOEC            OUTPUT UNEXPECTED INTERRUPT COUNT
         DEF      COCOEL            LAST UNEXPECTED OUTPUT INTERRUPT LINE
*,*                                 NUMBER (BYTE 3); COC # FOR ABOVE
*,*                                 LINE NUMBER (BYTE 0)
         DEF      COCBLC            NUMBER OF INTERRUPTS FROM LINES
*,*                                 NOT SYSGEN'D FOR
         DEF      COCBLN            LINE NUMBER OF LAST INTERRUPT FOR A
*,*                                 LINE NOT SYSGEN'D FOR (BYTE 3); COC #
*,*                                 FOR ABOVE LINE NUMBER (BYTE 0)
         DEF      COCLNC            NOISY LINE CHAR COUNT
         DEF      COCLNL            NOISY LINE NUMBER
         DEF      COCLBC            NOISY LINE BREAK COUNT
         DEF      COCLBL            NOISY (WITH BREAKS) LINE NUMBER
         DEF      CO:IN0            HIGHEST PRIO COC INPUT INT PSDS
         DEF      COCUNMAP          PSD FOR UNMAPPING IN COC
         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 INTERRUPT
         DEF      ECBFRCHN          HEAD OF ECBS FREED WHILE COC
*,*                                 WAS PROCESSING
         DEF      COB:SIOS          SIO STATUS CC'S (INDEXED BY COC #)
         DEF      COCHDICB          COC HALF-DUPLEX TURNAROUND INTERRUPT
*                                   .. CONTROL BLOCK
         DEF      COCHDFLN          LINE # OF FIRST HALF-DUPLEX LINE
*,*                                 .. BEING TURNED FROM INPUT TO
*,*                                 .. OUTPUT MODE
         DEF      COCHDLLN          LINE # OF LAST HALF-DUPLEX LINE
*,*                                 .. BEING TURNED FROM INPUT TO
*,*                                 .. OUTPUT MODE
         DEF      COCE              INPUT INTERRUPT EVENT-REPORTED FLAG
         DEF      COCMESS           ADMINISTRATIVE MESSAGE; SET BY SEND
*,*                                 KEYIN, DISPLAYED IN PAGE HEADINGS
         REF      COA:IG            EXTERNAL INTERRUPT GROUP FOR COCS
         REF      COCIP             COC INPUT INTERRUPT PROCESSING ENTRY
         REF      COCUMER           UNMAP ROUTINE IN COCR
         SREF     T:COCTA           CLOCK 3 ENTRY POINT IN COC TO DO
*                                   .. LINE TURNAROUND HANDLING
         SREF     COC:AUTO          PASS2 EQU FOR AUTOMATIC CONFIGURATION
         PAGE
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
*                                   .. GHOST1D SAYS IT'S OK
COCGFLG  DATA     0                 COCG GHOST REQUEST FLAGS
COCEFLG  DATA     COC:AUTO          COC EXECUTION OPTION FLAGS
DUMPLINE DATA     -1                LINE # FOR ESC-ETB MONITOR DUMP
COC#BUFS DATA     0                 NUMBER OF COC BUFFERS IN USE
COCQST   TEXTC    ' !S    !'        MESSAGE FOR ESC-Q
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
COCLNC   DATA     0                 NOISY LINE CHARACTER COUNT
COCLNL   DATA     0                 NOISY LINE COC# (BYTE 0),
*                                   LINE NUMBER (BYTE 3)
COCLBC   DATA     0                 COUNT OF BREAKS RECIEVED IN LOGON
*                                   (INDICATOR OF POSSIBLE NOISY LINE)
COCLBL   DATA     0                 COC # & LINE # OF LINE SENDING
*                                   BREAKS TO LOGON
COCE     DATA     -1                -1/NO EVENT WAS REPORTED DURING INPUT
*                                   .. INTERRUPT PROCESSING
ECBFRCHN DATA     0                 HEAD OF ECBS FREED WHILE COC
*                                   .. WAS PROCESSING
*
COCHDICB DATA     X'00400000'       SYSTEM ICB
         DATA     125/2             125 MILLISECOND PERIOD
         DATA     125/2             125 MILLISECOND PERIOD
         DATA     T:COCTA           ENTRY POINT FOR LINE TURN-AROUND
         DATA                       BLINK
COCHDFLN DATA     0                 LINE # OF FIRST HALF-DUPLEX LINE
*                                   .. BEING TURNED FROM INPUT TO
*                                   .. OUTPUT MODE
COCHDLLN DATA     -1                LINE # OF LAST HALF-DUPLEX LINE
*                                   .. BEING TURNED FROM INPUT TO
*                                   .. OUTPUT MODE
*
COCMESS  DATA     0                 ADMINISTRATIVE MESSAGE; SET BY SEND
         RES      13                ..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
************************************************************************
*  PSD 4-WORD BLOCK FOR UNMAPPING IN COC
************************************************************************
COCUNMAP :PSD     (RES),(IA,COCUMER),(INH),(OMA),(WK,1)
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)
************************************************************************
*F*  NAME:    CO:IPN
*F*  PURPOSE: TO TRIGGER THE HIGHEST PRIORITY COC'S INPUT INTERRUPT.
*F*  DESCRIPTION: CO:IPN IS ENTERED ON AN INPUT INTERRUPT FOR OTHER THAN
*F*           THE HIGHEST PRIORITY COC, AND TRIGGERS THE HIGHEST PRIORITY
*F*           COC'S INPUT INTERRUPT LEVEL. COC INPUT INTERRUPT PROCESSING
*F*           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#
         END

