         DEF      REQDC:
REQDC:   EQU      %
*   CREATED 6/22/72  KDR
*   ##            18:40  04/18/72  RJR  *
*    CATALOG NO. 704938 - SIGMA 5/7 BPM M:REQDC
         SYSTEM   UTS
         DEF      REQDC
REQDC    EQU      %
         REF      ENBSR4,QFACTP11
         REF      T:STLPP,T:RSPPEA,S:STLC
         REF      MX:PPUT,M:FPPH,M:FPPC
         REF      REG
         PAGE
*
*                             PROGRAM NAME - BATCH MONITOR.
*
         PAGE
*                 SYMBOLIC REGISTER DEFINITIONS.
R0       EQU      0
R1       EQU      1
R2       EQU      2
R3       EQU      3
R4       EQU      4
SR1      EQU      8
SR2      EQU      9
SR3      EQU      10
SR4      EQU      11
D1       EQU      12
D2       EQU      13
D3       EQU      14
D4       EQU      15
         PAGE
*SYMBIONT DISC GRANULE REQUEST NOT AT END ACTION
*(R3)=SYMBIONT INDEX
*(SR3)=SYMBIONT CONTEXT BLOCK ADDRESS
*                 SR2               SYMBIONT RETURN ADD+1
*        BAL,SR2  REQDB
*(TSTACK)=SYMBIONT EXIT
         REF      GSG
SYMDQ    EQU      0                 DISC GRANULE QUEUE INDEX
REQDB    EQU      %                                                     126
         REF      QFGP11
         BAL,11   GSG               GET SYM GRAN
         AI,SR1   0
         BNEZ     REG               OK-RELOAD REGISTERS
*                                   EXIT ON 9
BACKUP   RES      0
         AI,9     -1                BACKUP TO RE ISSUE
         B        QFGP11            Q FOR GRANULE-PULL 11
         PAGE
*SYMBIONT CORE BUFFER REQUEST NOT AT END ACTION
*(R3)=SYMBIONT INDEX
*(SR3)=SYMBIONT CONTEXT BLOCK ADDRESS
*(SR4)=SYMBIONT RETURN ADDRESS+1
*(TSTACK)=SYMBIONT EXIT
*        BAL,SR4  REQCB
         DEF      REQCB
SYMCQ    EQU      1                 CORE BUFFER QUEUE INDEX
REQCB    RES      0
GET      DISABLE
         LW,14    S:STLC
         BLZ      QFC
         LW,14    SPOOL
         BEZ      NOPG
         LW,0     *14
         STW,0    SPOOL
         B        ENBSR4
NOPG     EQU      %
         PUSH     11
         BAL,11   T:STLPP
         PULL     11
         AI,3     0
         BLEZ     QFC
         LI,14    0
         STW,14   *3
         STW,3    SPOOL
         AI,3     X'100'
         LW,14    3
         B        ENX
QFC      EQU      %
         ENABLE
         LB,3     *10
         LW,9     11
         AI,9     -1
         B        QFCBP11
*
         PAGE
CHKFREE  LW,15    =((1**15)-1)**9   * BIG9 ADDR PAGE# MASK
CHKIT    CS,14    0
         BE       CHKGIT
         LW,1     0
         LW,0     *0                NEXT
         BNEZ     CHKIT
         B        0,3               NONE
CHKGIT   RES      0
         LW,2     *0
         STW,2    0,1
         B        1,3               MATCH
*SYMBIONT CORE BUFFER RELEASE AT END ACTION
*(R3)=SYMBIONT INDEX
*(SR2)=SYMBIONT RETURN ADDRESS
*(SR3)=SYMBIONT CONTEXT BLOCK ADDRESS
*(SR4)=SYMBIONT EXIT
*(D3)=CORE BUFFER ADDRESS
         PAGE
*                 PHYSICAL  BUFFER  RELEASE /GET
         REF      QFCBP11
         REF      SPOOL
RELCB    RES      0
         PUSH     11                SAVE QRA
         BAL,11   SRELBUF           RELEASE BUFF
         B        QFACTP11
SRELBUF  RES      0
         DEF      SRELBUF
REL      DISABLE
         LI,1     SPOOL
         LW,0     SPOOL
         BEZ      NOREL             NONE TO LINK
         BAL,3    CHKFREE
         B        NOREL
         PUSH     11
         BAL,11   T:RSPPEA
         PULL     11
         B        ENX
NOREL    XW,14    SPOOL
         STW,14   *SPOOL
ENX      ENABLE
         LW,4     *10
         LW,1     10
         LB,3     *10
         B        *11               RETURN TO SYM
         DEF      RELCB
REQDCSZ  EQU      %-REQDC
         END

