***********************************************************************
*M*      SSSL     SENSE SWITCH SIMULATION LIBRARY ROUTINE
************************************************************************
*P*
*P*      PURPOSE: TO PERFORM SENSE SWITCH SIMULATION FOR PROCESSORS
*P*               AND USER PROGRAMS THROUGH THE USE OF THE TASK
*P*               CONTROL BLOCK (TCB).
*P*
*P*      DESCRIPTION: THIS MODULE CONTAINS THREE LIBRARY ROUTINES (L:SSS
*P*               ,L:TSS,L:RSS) WHICH ARE PROVIDED TO ALLOW PROCESSORS
*P*               AND USER PROGRAMS TO SET, TEST, AND RESET SPECIFIED
*P*               PSEUDO SENSE SWITCHES. SEE FUNCTION PREAMBLES FOR
*P*               L:SSS, L:TSS, AND L:RSS.
*P*
*P*      REFERENCE: BATCH PROCESSING REFERENCE MANUAL
*P*
*                  CATALOG NO704032    SENSE SWITCH SIMULATION
       SYSTEM   SIG7FDP
         DEF      L:SSS             SET SENSE SWITCH
         DEF      L:TSS             TEST SENSE SWITCH
         DEF      L:RSS             RESET SENSE SWITCH
SR4      EQU     11
L:SSS    RES      0                 SET-SENSE-SWITCH
*F*
*F*      NAME:    L:SSS
*F*
*F*      PURPOSE: TO SET THE SPECIFIED SENSE SWITCH
*F*
*F*      DESCRIPTION: THE SENSE SWITCH SPECIFIED IN REGISTER 6 IS SET
*F*               IN THE TCB.
*F*
*F*      REFERENCE: BATCH PROCESSING REFERENCE MANUAL
*F*
         LI,9     X'40'
L:SSSC   BAL,10   TSSCOM
         STS,8    12,7
         B        *SR4
L:RSS    RES      0                 RESET-SENSE-SWITCH
*F*
*F*      NAME:    L:RSS
*F*
*F*      PURPOSE: TO RESET THE SPECIFIED SENSE SWITCH
*F*
*F*      DESCRIPTION: THE SENSE SWITCH SPECIFIED IN REGISTER 6 IS
*F*               RESET IN THE TCB.
*F*
*F*      REFERENCE: BATCH PROCESSING REFERENCE MANUAL
*F*
         LI,9     0                 RESET BIT
         B        L:SSSC            CLEAR
L:TSS    RES      0                 TEST SENSE SWITCH
*F*
*F*      NAME:    L:TSS
*F*
*F*      PURPOSE: TO TEST SENSE SWITCH SETTINGS
*F*
*F*      DESCRIPTION: THE SENSE SWITCH SPECIFIED IN REGISTER 6 IS
*F*               COMPARED WITH THE PSEUDO SENSE SWITCH REGISTER
*F*               IN THE TCB AND CONDITION CODES SET/RESET TO REFLECT
*F*               THE RESULTS OF THE COMPARISON.
*F*
*F*      REFERENCE: BATCH PROCESSING REFERENCE MANUAL
*F*
         BAL,10   TSSCOM            SETUP
         CW,9     12,7              SENSE-SWITCH
         BCS,4    TSS1              SET
         LCI      0                 RESET
         B        *SR4
TSS1     LCI     15
         B        *SR4
TSSCOM   LW,7     0
         LI,8    X'40'
         LCW,6    6                 RIGHT SHIFT COUNT
         SLD,8    0,6
         XW,8     9                 MASK TO 9
         B        *10
         END

