*
*
*M*      SUSPTERM  SYMBIONT SUSPEND AND TERMINATE ROUTINE(PARK OR DEL SYMB)
*
*P*      NAME:     SUSPTERM
*,*
*,*      PURPOSE:
*,*           SUSP           TO CAUSE A SYMBIONT TO SUSPEND OPERATION
*,*                ON THE SPECIFIED DEVICE AND TYPE THE SUSPEND
*,*                MESSAGE ON THE OC DEVICE, UNLESS REMOTE.
*,*           TERM           TO TERMINATE SYMBIONT OPERATION ON THE
*,*                SPECIFIED DEVICE, RELEASE RESOURCES(CONTEXT BLOCK
*,*                ETC.), AND MARK THE SYMBIONT INACTIVE.
*,*
*,*      DESCRIPTION:        ON BEING ENTERED BY THE SYMBIONT, SUSP
*,*           MARKS THE SYMBIONT AS SUSPENDED ON THE SPECIFIED DEVICE
*,*           BY SETTING THE APPROPRIATE ENTRY IN SSTAT, A SUB-TABLE OF
*,*           SYMTAB, INACTIVE.  SUSP SETS THE SYMBIONT ENTRY ADDRESS
*,*           INTO THE APPROPRIATE ENTRY IN SRET.  WHEN THE OPERATOR
*,*           ISSUES A 'CONTINUE' KEYIN ON THIS SYMBIONT, EXECUTION WILL
*,*           RESUME AT THE SPECIFIED SYMBIONT ENTRY POINT.
*,*                          ON ENTRY TO TERM, THE SYMBIONT CONTEXT
*,*           BLOCK ADDRESS IS CLEARED FROM THE APPROPRIATE ENTRY IN
*,*           SCNTXT, A SUB-TABLE OF SYMTAB.  THE SYMBIONT CONTEXT BLOCK
*,*           IS RELEASED VIA RSC.   SYMBIONT STATUS IS SET TO
*,*           INACTIVE, SSTAT(X)=0, AND THE SIGNAL CHARACTER TABLE ENTRY
*,*           IS CLEARED,SSIG(X)=0,ALLOWING OPERATOR INITIATION.
*,*
*   ##            18:40  04/18/72  RJR  *
         SYSTEM   UTS
         DEF      SUSPTERM:         PATCHING DEF
SUSPTERM: RES
        DEF      TERM
        DEF      SUSP
         REF      RSC,SCNTXT,SSIG
         REF      OCQUEUE,SSTAT
         REF      SNDDX
         REF      SRET
         REF      RBLIMS            REM BAT DCTX LIMITS
         REF      DCT3
SUSP    STW,9    SRET,3
         LI,1     12
        PUSH     11
        LI,0     0
SU00    PUSH     7
         STB,0    SSTAT,3
        LB,7     SNDDX,3
         BEZ      SU00A             IS SUSPEND OF DEL FILE OUTSYM
         CLM,7    RBLIMS
         BCR,9    SU00A             IS REMOTE(NO MSG)
        BAL,11   OCQUEUE
SU00A    EQU      %
        PULL     7
SU01     PULL     11
        B        *11
TERM     LI,0     0
         STH,0    SCNTXT,3
        LW,14    10
        BAL,11   RSC
        LI,0     0
         LB,1     SNDDX,3           DCT INDEX
         LB,12    DCT3,1
         CI,12    X'20'             DEVICE PARTITIONED FLAG
         BAZ      %+2         NO--- DEVICE PARTITIONED
         LI,0     3           YES-- SET SSTAT TO NOT AVAILABLE
         STB,0    SSTAT,3
         LI,0     0
         LB,12    SSIG,3
        CI,12    'L'
        BNE      %+2
         LI,0     'L'
         STB,0    SSIG,3
         B        SU01
        END

