MONPROC  SET      1
         SYSTEM   UTS
R0       EQU      0
R1       EQU      1
R2       EQU      2
R3       EQU      3
R4       EQU      4
R5       EQU      5
R6       EQU      6
R7       EQU      7
R8,SR1   EQU      8
R9,SR2   EQU      9
R10,SR3  EQU      10
R11,SR4  EQU      11
R12,D1   EQU      12
R13,D2   EQU      13
R14,D3   EQU      14
R15,D4   EQU      15
*
MOCIOP:  EQU      %
******
*
*        THE FOLLOWING CODE IS CONCERNED WITH TP-ASSOCIATED MOC SLAVE
*        LINE FUNCTIONS. IT IS ENTERED FROM IORT.
*        INPUT:   (R2) = (D2) =  ADDRESS OF 4-WORD BLOCK GOT BY IORT
*                 (R6) = DCB ADDRESS
*                 (SR1)= READ VS. WRITE INDICATOR
*                 (D3) = ADDRESS OF ECB
******
         DEF      MOCIOP,MOCIOP:,CLRMULIO,LNERRTBL
*
         REF      ADDRMASK,REGMASK,ADR:LIST,VAL:INDX,ADR:ECB
         REF      CNMERRX1,CALLGBLK,ECBFBLK
         REF      J:RWECB,UH:FLG,T:IACU,S:CUN,CJOB,JX:CMAP
         REF      WAFCN,AUTORDL,HALTL,TQUNMAP,TQMAP
         REF      Y8,YFF,XFFFF,Y04,M16,Y00FF
         REF      NEWQNW,CHKWAT,MSRWRTX,APWP,RPWP
         REF      ECBPOST1,CALLCK1A,ECBCHCK1
*
*
*        THE FOLLOWING ARE OFFSETS INTO THE 4-WORD BLOCK GOT BY IORT
*        AND POINTED TO BY (J:RWECB) IN THE USER'S JIT.
*
*
BLK2PNTR EQU      0                 WORD OFFSET
LSTLOC   EQU      1                 WORD OFFSET
BUFLOC   EQU      2                 WORD OFFSET
XLSTPG#  EQU      6                 HALF-WORD OFFSET
XBUFPG#  EQU      7                 HALF-WORD OFFSET
XTRAPG#S EQU      3                 WORD OFFSET
*
*        THE FOLLOWING ARE OFFSETS INTO THE 4-WORD BLOCK GOT BY MOCIOP
*
ECBLOC   EQU      0                 WORD OFFSET
PAFCN    EQU      1                 WORD OFFSET
BUFSIZE  EQU      2                 WORD OFFSET
*
MULNRDCD EQU      0                 MULTI-PNT LINE READ FC
MULNWTCD EQU      X'80'             MULTI-PNT LINE WRITE FC
         PAGE
*
*
MOCIOP   EQU      %
         LW,R4    ADDRMASK
         AND,R4   ADR:LIST,R6       SEE IF POL/SEL LIST ADDRESS EXISTS
         BNEZ     %+3               B, IF IT DOES
*
LISTERR  EQU      %
         LW,SR3   LNERR04           IT'S AN ERROR IF IT DOESN'T
         B        CNMERRX1          *****TAKE ERROR EXIT*****
         LW,R3    R4                SAVE LIST ADR
         SLD,R4   -9                ISOLATE PG#
         LW,R7    R4                MOVE TO INPUT REG
         BAL,SR4  T:IACU            GET PG#'S ACCESS CODE
         BCS,2    LISTERR           *****ERR IF AC=2 OR 3
         BCR,1    LISTERR           *****ERR IF AC=0; IE., IT MUST=1************
         LW,R1    S:CUN             GET CURRENT USER#
         STB,R1   D3                SAVE ALONG WITH ECB ADR
         LW,D4    *D2               SEE IF AUTO READ WAS REQUESTED
         BEZ      GETEABLK          B, IF NOT; NORMAL I/O REQUEST
         OR,D2    Y8                SET BIT 0 TO INDICATE AUTO RD REQUEST
         LW,SR3   WAFCN,R6          GET DCB'S FCN
         AND,SR3  YFF               SEE IF ANY I/O OUTSTANDING
         BNEZ     IOCNFLCT          B, IF SO; DON'T Q AUTO BEHIND OTHERS
         LW,SR4   AUTORDL           GET AUTO READ MASK FOR LIST FLAGS
         DISABLE                    **INHIBIT INTERRUPTS
         STS,SR4  0,R3              SET FLAG TO INDICATE AUTO RD
         LH,R0    UH:FLG,R1         GET USER'S FLAGS
         OR,R0    X10               SET PPSWP BIT
         STH,R0   UH:FLG,R1         RESTORE FLAGS
         ENABLE                     **UNINHIBIT INTERRUPTS
         B        GETEABLK          GO GET A 2ND 4-WD BLK FOR EA
*
IOCNFLCT EQU      %
         LW,SR3   LNERR11           AUTO READ REQUEST ERROR
         B        CNMERRX1          *****TAKE ERROR EXIT*****
*
GETEABLK EQU      %
         BAL,D4   CALLGBLK          GET 2ND 4-WD BLK FOR EA DO-LIST ENTRY
         STW,D3   ECBLOC,R2         STUFF USER# & ECB ADR IN 2ND BLK
         XW,R2    D2                RESTORE 1ST BLK POINTER TO R2
         STW,D2   BLK2PNTR,R2       AND SAVE POINTER TO 2ND BLOCK
         LI,D4    0                 REINITIALIZE
         STW,D4   LSTLOC,R2                      1ST
         STW,D4   BUFLOC,R2                         4-WORD
         STW,D4   XTRAPG#S,R2                             BLOCK
         LW,D1    0,R3              GET LIST LENGTH & FLAGS
         AND,D1   XFFFF             ISOLATE LIST LENGTH
         CI,D1    254               CK AGAINST MAX ALLOWABLE
         BLE      %+3               B, IF OK
         LW,SR3   LNERR00
         B        CNMERRX2          *****TAKE ERROR EXIT*****
         LW,D2    VAL:INDX,R6       GET POSSIBLE INDEX VALUE
         BEZ      SAVELIST          B, IF NOT SPECIFIED
         BGZ      %+3
*
INDEXERR EQU      %
         LW,SR3   LNERR09           INDX ERR IF NEG OR PNTS PAST LIST
         B        CNMERRX2          *****TAKE ERROR EXIT*****
         CW,D2    D1                CK INDEX VALUE AGAINST LIST LENGTH
         BG       INDEXERR          *****TAKE ERROR EXIT*****
         AI,R3    1                 NOW (R3)= LISTADR+1
         AW,R3    D2                POINT TO ELEMENT ENTRY
         LW,R3    0,R3              GET IT
         CW,SR1   Y04               CK IF THIS IS A WRITE OPERATION
         BAZ      %+2               B, IF NOT
         SLS,R3   8                 ELSE, SHIFT SEL FLINK TO BYTE 0
         LB,R3    R3                GET POL/SEL FLINK
         BNEZ     %+3
*
EXCLDERR EQU      %
         LW,SR3   LNERR10           ERR IF EXCLUDED OR DUMMY ELEMENT
         B        CNMERRX2          *****TAKE ERROR EXIT*****
         CI,R3    X'FF'             SEE IF IT'S A DUMMY SLOT
         BE       EXCLDERR          *****B, IF SO, IT'S AN ERROR*****
*
SAVELIST EQU      %
         LOAD,R4  JX:CMAP,R7        GET PHYSICAL PG# OF LIST
         LW,SR3   R4                MOVE TO INPUT REG
         BAL,R1   CALLAPWP          LOCK IN CORRESPONDING PAGE
         BNEZ     CNMERRX2          *****TAKE ERROR EXIT*****
         LD,SR3   R4                MOVE PHYSICAL ADR ELEMENTS
         SLD,SR3  9                 REUNITE PG# & PG OFFSET
         STB,D2   SR3               SAVE INDEX VALUE OR 0
         STW,SR3  LSTLOC,R2         SAVE PA(LIST) & INDX VAL IN 4-WD BLK
         SLS,R5   -23               RIGHT ADJUST PAGE OFFSET
         AW,R5    D1                TACK ON LIST LENGTH VALUE
         CI,R5    511               HAVE WE SLOPPED O'ER A PG BND
         BL       CKBUFSIZ          B, IF NOT, & TAKE A LOOK AT THE BUFFER
         AI,R7    1                 ELSE BUMP VIRTUAL PG#
         LOAD,SR3 JX:CMAP,R7        GET PHYSICAL PG#
         LW,R4    SR3               SAVE ACROSS APWP CALL
         BAL,R1   CALLAPWP          LOCK THAT PG IN TOO
         BNEZ     CNMERRX3          *****TAKE ERROR EXIT*****
         LI,R7    XLSTPG#           GET XTRA LIST PG OFFSET
         STH,R4   *R2,R7            SAVE IN 1ST 4-WD BLK FOR EA
*
CKBUFSIZ EQU      %
         LI,D3    X'E0000'          LOAD BLK MASK
         AND,D3   BLK,R6            GET # BYTES TO BE TRANSFERRED
         SLS,D3   -17               RIGHT JUSTIFY
         CI,D3    2049              CK AGAINST MAX ALLOWED
         BLE      BUFSIZOK          CAN'T SPAN 3 PGS IF LESS OR =
         LW,SR3   LNERR05           IT'S AN ERROR IF GREATER
         B        CNMERRX3          *****TAKE ERROR EXIT*****
*
BUFSIZOK EQU      %
         LW,D2    ADDRMASK
         AND,D2   QBUF,R6           GET WA(BUFFER)
         LW,SR3   D2                MOVE TO INPUT REG
         OR,SR3   Y8                INDICATE ITS A VIRTUAL ADDRESS
         BAL,R1   CALLAPWP          LOCK IN CORRESPONDING PAGE
         BNEZ     CNMERRX3          *****TAKE ERROR EXIT*****
         LI,D4    X'30'             LOAD UBTD MASK
         AND,D4   BTD,R6            ISOLATE THE BUFFER OFFSET CNT
         SLS,D4   -4                RIGHT JUSTIFY
         SLS,D2   2                 VA(BUFF) TO BYTE ADR
         AW,D2    D4                TACK ON BTD VALUE
         LW,R4    D2                PICK UP BA(BUFF)+BTD
         SLD,R4   -11               ISOLATE PG#
         LW,SR4   R5                LOAD PG OFFSET
         LOAD,SR3 JX:CMAP,R4        GET PHYSICAL PG#
         SLD,SR3  11                REUNITE PG# & PG OFFSET
         STW,SR3  BUFLOC,R2         SAVE PHYSICAL BA(BUFF)+BTD
         SLS,R5   -21               RIGHT ADJUST PG OFFSET (NOW IN BYTES)
         AW,R5    D3                TACK ON BLK VALUE (#BYTES TO TRANSFER)
         CI,R5    2049              HAVE WE SLOPPED O'ER A PG BND
         BL       GETPAFCN          B, IF NOT & LOCK FCN PG
         AI,R4    1                 ELSE, BUMP VIRTUAL PG#
         LOAD,R4  JX:CMAP,R4        & GET PHYSICAL PG#
         LW,SR3   R4                MOVE TO INPUT REG
         BAL,R1   CALLAPWP          LOCK THAT PAGE IN TOO
         BNEZ     CNMERRX3          *****TAKE ERROR EXIT*****
         LI,R7    XBUFPG#           GET XTRA BUFF PG# OFFSET
         STH,R4   *R2,R7            SAVE IN 4-WD BLOCK FOR EA
*
GETPAFCN EQU      %
         LW,R3    BLK2PNTR,R2       GET POINTER TO 2ND BLK
         LW,R4    R6                GET POINTER TO DCB
         AI,R4    WAFCN             POINT TO FCN SLOT
         SLD,R4   -9                ISOLATE PG#
         LOAD,R4  JX:CMAP,R4        GET PHYSICAL PG#
         LW,SR3   R4                MOVE TO INPUT REG
         BAL,R1   CALLAPWP          LOCK IN DCB'S FCN
         BNEZ     CNMERRX3          *****TAKE ERROR EXIT*****
         SLD,R4   9                 REUNITE PG# & PG OFFSET
         STW,R4   PAFCN,R3          SAVE FCN ADR FOR EA
         STW,D3   BUFSIZE,R3        SAVE BUFFER SIZE FOR EA ARS COMPUTE
         CW,SR1   Y04               CK IF THIS IS A WRITE OPERATION
         BANZ     %+3               B, IF SO & SET FC=WRITE
         LI,SR1   MULNRDCD          FC=READ
         B        PREPNEWQNW        PREPARE FOR NEWQNW  CALL
         LI,SR1   MULNWTCD          FC=WRITE
*
PREPNEWQNW EQU    %
         LI,R1    BAFCN             GET DCB FUNCTION CNT OFFSET
         MTB,1    *R6,R1            INCREMENT #I/O OPS NOT COMPLETED
         LW,R1    R2                MOVE 1ST BLK PNTR TO NEWQNW  EAI REG
         LI,D1    X'FF'
         AND,D1   DSI,R6            DCTX TO NEWQNW INPUT REG
         LW,D2    BUFLOC,R2         GET PA(BUFF+BTD) FOR IOQ8
         LI,R3    BANRA             GET NRA OFFSET
         LB,R3    *R6,R3            GET NRA VALUE
         SLS,R3   8                 ADJUST
         OR,D1    R3                INCLUDE W/DCT INDEX
         STB,SR1  D1                INCLUDE FC W/DCT INDEX & NRA
         LB,R3    CJOB              GET CURRENT USER'S PRIORITY
         SLS,R3   16                ADJUST
         OR,D1    R3                INCLUDE W/FC, NRA, & DCT INDEX
         LI,D4    0                 SET SEEK=0
         LI,R0    EAMULN            END ACTION ADDRESS
*
CALLNEWQNW  EQU   %                 'UNMAPPED' TO AVOID BUFF PG CKS
         BAL,SR4  NEWQNW            CALL NO-WAIT TO AVOID MFC BUMP
         B        CNMERRX4          *****CONTROLLER DOWN*****
         LI,R3    X'1000'           GET MASK FOR DCB'S EGV BIT
         LI,R2    0
         STS,R2   EGV,R6            RESET EGV
         BAL,R1   CHKWAT            SEE IF THIS WAS A NO-WAIT I/O REQUEST
         BEZ      MSRWRTX           ****B, IF SO TO COMMON EXIT CODE*****
         LW,R5    ADR:ECB,R6        GET ECB ADDRESS
         LI,D3    0                 SO THAT BAL,R1 JHKBIT WORKS
         B        CALLCK1A          CALL ECBCHCK1 & WAIT 'TIL ECB POSTED
         PAGE
*
*
CNMERRX4 EQU      %
         LW,SR3   LNERR12           LINE CONTROLLER DOWN
         LI,R4    BAFCN             GET DCB FUNCTION CNT OFFSET
         MTB,-1   *R6,R4            DECREMENT #I/O OPS NOT COMPLETED
*
CNMERRX3 EQU      %
         LW,SR2   S:CUN             MOVE CURRENT USER# TO INPUT REG
         PUSH     1,SR3             SAVE ERR/ABN INDICATOR
         BAL,R1   CALLRPWP          UNLOCK ANY ASSIGNED PAGES
         PULL     1,SR3             RETRIEVE ERR/ABN INDICATOR
*
CNMERRX2 EQU      %
         LW,R4    R2                SAVE POINTER TO 1ST BLOCK
         LW,R2    BLK2PNTR,R2       GET POINTER TO 2ND BLK
         LW,D2    ADDRMASK
         AND,D2   ADR:ECB,R6        GET ECB ADR FROM DCB
         LI,R0    0
         LW,R1    SR3               GET ERR/ABN CODE
         OR,R1    Y00FF             TO INDICATE NOT TYC/RBC
         SCS,R1   8                 ADJUST FOR STORE IN IORT'S 4-WD BLK
         STW,R0   0,R4              REINITIALIZE
         STW,D2   1,R4                          1ST 4-WORD
         STW,R1   2,R4                                    (IORT'S)
         STW,R0   3,R4                                            BLOCK
         BAL,R1   ECBFBLK           RELEASE 2ND 4-WORD BLOCK
         LW,D2    R4                RETRIEVE POINTER TO 1ST BLK
         BGZ      CNMERRX1          B, IF NOT AN AUTO READ REQUEST
         LW,R5    ADDRMASK
         AND,R5   ADR:LIST,R6       ELSE, GET POL/SEL LIST ADDRESS
         LW,R1    AUTORDL           GET LIST'S AUTO READ BIT MASK
         STS,R0   0,R5              RESET AUTO READ BIT IN LIST
         B        CNMERRX1          FINISH CLEANUP; EXIT VIA MSR01EXIT
         PAGE
*
*
CALLAPWP EQU      %
         BAL,SR4  APWP              REQUEST PG BE LOCKED IN CORE
*
*
*        HERE (R10) IS CHECKED FOR STATUS OF ASSIGN REQUEST
*
*
*        (R10)= 0  MEANS PAGE WAS ASSIGNED
*        (R10) NOT ZERO MEANS REQUEST WAS NOT SATISFIED
*        BIT 0 = 0 MEANS PHYSICAL WORK PAGE LIMIT REACHED
*        BIT 0 = 1 MEANS PAGE ADDRESS NOT OWNED BY USER
*        BITS 1-31 SAME AS INPUT
*
         BEZ      CALLAPWPX         B, IF ASSIGNMENT SUCCESSFUL
         BGZ      %+3
         LW,SR3   LNERR07
         B        CALLAPWPX
         LW,SR3   LNERR06
*
CALLAPWPX EQU     %
         B        0,R1              *****EXIT CALLAPWP*****
         PAGE
*
*
CALLRPWP EQU      %
         LI,R4    RLSBUFPG          LOAD EXIT ADR FROM COMMON CODE
         LW,SR3   LSTLOC,R2         GET LIST ADR WORD
*
GETPG#   EQU      %
         AND,SR3  ADDRMASK          ISOLATE ADR
         BEZ      0,R4              TAIN'T NOTHING THERE; SKIP IT
         SLS,SR3  -9                SHIFT OUT PG OFFSET
*
FREEPWP  EQU      %
         BAL,SR4  RPWP              UNLOCK PAGE
         CI,SR3   0                 WAS IT RELEASED
         BE       0,R4              B, IF SO; EXIT COMMON CODE
         SCREECH  X'56'             *****IT'S A BADDY IF NOT*****
*
RLSBUFPG EQU      %
         LW,SR3   BUFLOC,R2         GET BUFFER ADR WORD
         SLS,SR3   -2               IT WAS A BYTE ADR
         BAL,R4   GETPG#            UNLOCK THE BUFFER PAGE
         LI,R7    XLSTPG#           GET XTRA LIST PG OFFSET
         LH,SR3   *R2,R7            GET PG# IF THERE IS ONE
         BEZ      %+2               B, IF NOT
         BAL,R4   FREEPWP           ELSE FREE IT UP
         LI,R7    XBUFPG#           GET XTRA BUFF PG OFFSET
         LH,SR3   *R2,R7            GET PG# IF THERE IS ONE
         BEZ      %+2               B, IF NOT
         BAL,R4   FREEPWP           ELSE FREE IT UP
         LW,R4    BLK2PNTR,R2       GET POINTER TO 2ND 4-WD BLK
         LW,SR3   PAFCN,R4          GET DCB'S FCN ADR
         BAL,R4   GETPG#            FREE UP CONTAINING PG
         B        0,R1              *****EXIT CALLRPWP*****
         PAGE
*
EAMULN   EQU      %
         PUSH     15,R1
         LW,R2    D3                GET 1ST 4-WD BLK PNTR FROM EAI REG
         LW,R3    LSTLOC,R2         GET PA(LIST)
         LI,R4    0
         LW,R5    AUTORDL           AUTO READ MASK FOR LIST FLAGS
         OR,R5    HALTL             SET HALT BIT IN MASK
         STS,R4   0,R3              RESET LIST'S AUTO & HALT BITS
         LW,R3    BLK2PNTR,R2       GET POINTER TO 2ND 4-WD BLOCK
         LW,R5    ECBLOC,R3         GET ADDRESS OF ECB BLOCK
         LW,R1    PAFCN,R3          GET DCB'S WD/W FCN FIELD
         MTB,-1   *R1               DECREMENT #I/O OPS NOT COMPLETED
         LB,SR2   R5                PICK UP USER#
         BAL,R1   CALLRPWP          UNLOCK PAGES IN 4-WD BLKS
*
POSTECB  EQU      %
         AND,R5   ADDRMASK          ISOLATE ECB ADR
         LW,SR1   SR2               MOVE USER# TO INPUT REG
         LW,SR3   R5                MOVE VA(ECB) TO INPUT REG
         LW,R7    LSTLOC,R2         BYTE0 HAS LIST INDEX VALUE
         LB,SR2   R7                MOVE INDEX VALUE TO INPUT REG
         LI,R7    1                 INDX VAL OFFSET
         STB,SR2  D1,R7             SAVE W/TYC & RBC
         LW,R4    BUFSIZE,R3        GET BUFFER SIZE
         LW,R5    M16               ARS WILL GO IN RIGHT HALF OF D1
         LW,R7    D1                GET EA REG W/RBC IN RIGHT HALF
         AND,R7   M16               ISOLATE RBC
         SW,R4    R7                COMPUTE ARS
         STS,R4   D1                SAVE ARS W/INDX & TYC
         LW,SR2   D1                MOVE TO POSTING INPUT REG
         LI,R5    0
         STW,R5   0,R2              ZAP PERM BIT SO BLK CAN BE RELEASED
         INT,R7   R2                4-WD BLK ADR TO INPUT REG
         BAL,SR4  ECBPOST1          POST THE ECB
         LW,R2    R7                CK BIT0 OF R7
         BLZ      %+2               IF SET, POSTING RTN WILL FREE BLK
*
RLSEABLKS EQU     %
         BAL,R1   ECBFBLK           OTHERWISE, DO IT HERE
         LW,R2    R3                MOVE 2ND 4-WD BLK PNTR TO INPUT REG
         BAL,R1   ECBFBLK           RELEASE IT
*
EAMULNX  EQU      %
         PULL     15,R1
         B        *SR4              *****EXIT EA ROUTINE******
         PAGE
******
*
*        THIS ROUTINE RUNS DOWN AND/OR DELETES OUTSTANDING
*        I/O REQUESTS ON A MULTI-POINT LINE. REQUESTS ARE
*        TAKEN FROM THE BOTTOM OF THE LINE'S QUEUE. IF THEY
*        ARE NOT BUSY, THEY ARE RELEASED. IF BUSY, ECBCHCK1
*        IS CALLED TO WAIT FOR ECB POSTING, AN EVENT WHICH
*        IMPLIES THAT EAMULN HAS BEEN CALLED AFTER THE RE-
*        QUEST HAS COMPLETED.
*
*               (R1) = DCT INDEX
*               (R2) = RETURN ADDRESS
*               (R6) = INPUT DCB ADDRESS
*
******
*
         REF      DCT2,DCT6,CIT1,CIT2,RC21,IOQ3,IOQ13
*
*
CLRMULIO EQU      %
         PUSH     16,R0
         LW,R5    ADDRMASK
         LS,R4    ADR:LIST,R6       CK FOR LIST ADDRESS
         BEZ      CLRMULX           B, IF NONE
         LI,D4    X'80'             BUSY BIT MASK
*
CKCIT1   EQU      %
         LB,R2    DCT2,R1           GET CIT INDEX
         DISABLE                    **INHIBIT INTERRUPTS
         LB,R3    CIT1,R2           GET HEAD OF CHANNEL QUEUE
         BEZ      CLRMULX           B, IF EMPTY; NO OUTSTANDING I/O
         LW,R5    HALTL             GET LIST'S HALT BIT MASK
         STS,R5   0,R4              SET HALT BIT IN LIST
         LW,R5    S:CUN             GET CURRENT USER#
         LH,SR3   UH:FLG,R5         GET HIS FLAGS
         OR,SR3   X10               SET PPSWP BIT
         STH,SR3  UH:FLG,R5         RESTORE FLAGS
         LB,R3    CIT2,R2           GET LAST REQUEST IN CHANNEL QUEUE
         LD,SR3   IOQ13,R3          GET END-ACTION INFO
         LW,D3    SR4               EAI TO EA INPUT REG
         LW,SR4   SR3               EA ROUTINE ADR TO BAL REG
         LW,R6    *D3               GET POINTER TO 2ND 4-WORD BLK
         CB,R3    DCT6,R1           SEE IF REQUEST IS LINKED TO DEVICE
         BE       %+3               B, IF SO & WAIT FOR REQUEST TO FINISH
         CB,D4    IOQ3,R3           SEE IF REQUEST IS BUSY
         BAZ      RLSQSLOT          B, IF NOT & RELEASE Q ENTRY
         LW,R5    ECBLOC,R6         ELSE, PICK UP ECB ADR FROM BLK
         ENABLE                     **UNINHIBIT INTERRUPTS
         BAL,SR4  ECBCHCK1          WAIT FOR ECB TO BE POSTED
         LW,R6    0,R5              GET ECB FLAGS
         BGZ      %-2               B, IF ECB STILL NOT POSTED
         B        CKCIT1            GO CHECK CHANNEL QUEUE AGAIN
*
RLSQSLOT EQU      %
         BAL,R1   TQUNMAP           GO TO RC21 UNMAPPED
         LI,R5    QRLSD             LOAD RETURN REG
         PUSH     9,D2              REQCOM WILL WANT TO PULL THESE
         B        RC21              RELEASE QUEUE ENTRY
*
QRLSD    EQU      %
         BAL,R1   TQMAP             GO MAPPED AGAIN
         LW,R1    -14,TSTACK        RETRIEVE DCT INDEX
         B        CKCIT1            GO CHECK CHANNEL QUEUE AGAIN
*
CLRMULX  EQU      %
         ENABLE                     **UNINHIBIT INTERRUPTS
         PULL     16,R0             RETRIEVE REGS
         B        0,R2              ***RETURN TO CALLER
         PAGE
*
LNERR00  DATA     X'0E000032'       COMPONENT LIST SIZE EXCEEDS 254
LNERR04  DATA     X'08000032'       BAD POL/SEL LIST ADDRESS
LNERR05  DATA     X'00000032'       MULTI-PNT LN BUFF EXCEEDS 2049 BYTES
LNERR06  DATA     X'02000032'       UNABLE TO APWP; LIMIT REACHED
LNERR07  DATA     X'04000032'       UNABLE TO APWP; PG NOT OWNED BY USER
LNERR09  DATA     X'02000059'       INVALID INDEX VALUE
LNERR10  DATA     X'04000059'       INDEX POINTS TO EXCLUDED ELEMENT
LNERR11  DATA     X'06000059'       AUTO READ REQUEST CONFLICTS W/
*                                   OUTSTANDING I/O REQUESTS
LNERR12  DATA     X'08000059'       MOC DOWN
*
LNERRTBL EQU      %                 FOLLOWING ARE CNM MOC ERR/ABN CODES
         DATA,2   0
         DATA,2   0                 DATA READ; NORMAL COMPLETE (READ)
         DATA,2   X'590A'           NO RESPONSE FROM TERMINAL (READ)
         DATA,2   X'590C'           TERMINAL NOT IN TRANSMIT STATE(READ)
*                                   OR HALT SPECIFIED;OR END OF OPN
*                                   LIST HIT.
         DATA,2   X'590E'           BAD TRAILER (READ)
         DATA,2   X'5910'           PARITY ERR IN RECORD RECEIVED (READ)
         DATA,2   X'5912'           BAD HEADER (READ)
         DATA,2   X'5914'           NO RESPONSE FROM TERMINAL (WRITE)
         DATA,2   X'5916'           BAD 1ST CHAR IN RESPONSE HDR (WRITE)
         DATA,2   X'5918'           TERMINAL NOT IN RECEIVE STATE (WRITE)
         DATA,2   X'591A'           INTERNAL TERMINAL ERROR (READ)
         DATA,2   0                 DATA SENT; NORMAL COMPLETE (WRITE)
         DATA,2   X'591C'           TERMINAL NAK RECORD (WRITE)
         DATA,2   X'591E'           LOST DATA (WRITE)
         DATA,2   X'5920'           ILLEGAL RESPONSE (READ)
         DATA,2   X'3210'           END OF OPEN LIST HIT ON AUTO READ
         DATA,2   X'3270'           STATUS INSTEAD OF DATA IN BUFF(READ)
         END

