      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      EXTERNAL CLEAN0
      CALL MKON$F('CLEANUP$',8,CLEAN0)
      CALL INITJ0
10000   CALL TIMDAT(TIMEI0,15)
        CALL CONNE0
        CALL ACCEPT
        CALL GENER0
        CALL UPDATE
        CALL SEARCH
        CALL EXAMI0
        CALL REMOVE
        CALL PAUSE
      GOTO 10000
      END
      SUBROUTINE ACCEPT
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      INTEGER PTOC
      INTEGER LINE(102)
      INTEGER NAME(3),STATUS(2)
      INTEGER VCID,PORT,SIZE,ADDR,NODE,I,J
      INTEGER AAAAA0(32)
      INTEGER AAAAB0
      INTEGER AAAAC0
      DATA AAAAA0/195,239,238,238,229,227,244,233,239,238,160,242,229,22
     *7,229,233,246,229,228,160,230,242,239,237,160,170,172,163,232,170,
     *238,0/
10001   CALL XLGCON(:00000,VCID,PORT,NAME,2*3,I,0,0,0,0,0,0,0,0,0,STATUS
     *)
        IF((STATUS(1).NE.0))GOTO 10002
          SIZE=PTOC(NAME,160,LINE,I+1)
          I=SIZE+1
          GOTO 10005
10003     I=I+(1)
10005     IF((I.GT.2*3))GOTO 10004
            LINE(I)=160
          GOTO 10003
10004     LINE(I)=0
          CALL MAPSTR(LINE,2)
          I=1
          CALL CTOP(LINE,I,NAME,3)
          ADDR=0
          DO 10006 I=1,RINGS0
            DO 10008 J=1,3
              IF((NODEN0(J,INDEX0(I)).EQ.NAME(J)))GOTO 10010
                GOTO 10006
10010         CONTINUE
10008       CONTINUE
10009       ADDR=I
            CALL PRINT(-11,AAAAA0,NAMES0(INDEX0(I)),NODEN0(1,INDEX0(I)))
            GOTO 10007
10006     CONTINUE
10007     IF((ADDR.LE.0))GOTO 10011
            CALL ALLOC0(NODE)
            HEAP(NODE)=2
            HEAP(NODE+9)=ADDR
            HEAP(NODE+3+12)=VCID
            AAAAB0=PORT
            GOTO 10012
10013         CALL VERIFY(NODE)
            GOTO 10018
10015         CALL RESPP0(NODE)
            GOTO 10018
10016         CALL PROCE0(NODE)
            GOTO 10018
10012       AAAAC0=AAAAB0-96
            GOTO(10013,10015,10016),AAAAC0
10014       GOTO 10018
10011       CALL X$CLR(VCID,0,STATUS)
10017     GOTO 10018
10002     RETURN
10018 CONTINUE
      GOTO 10001
      END
      SUBROUTINE ALLOC0(NODE)
      INTEGER NODE
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      INTEGER DSGET
      INTEGER I
      SEQUE0=SEQUE0+(1)
      NODE=DSGET(21+3+9+128)
      HEAP(NODE)=0
      HEAP(NODE+1)=0
      HEAP(NODE+2)=0
      HEAP(NODE+3)=(TIMEI0(4)*20+TIMEI0(5)/3)
      HEAP(NODE+4)=0
      HEAP(NODE+5)=0
      HEAP(NODE+6)=0
      HEAP(NODE+7)=0
      HEAP(NODE+8)=0
      HEAP(NODE+9)=0
      DO 10019 I=1,3
        HEAP(NODE+I+9)=0
10019 CONTINUE
10020 HEAP(NODE+3+10)=0
      HEAP(NODE+3+11)=SEQUE0
      HEAP(NODE+3+12)=0
      HEAP(NODE+3+13)=4
      HEAP(NODE+3+14)=0
      HEAP(NODE+3+15)=4
      HEAP(NODE+3+16)=4
      HEAP(NODE+3+17)=0
      HEAP(NODE+3+18)=0
      HEAP(NODE+3+19)=0
      HEAP(NODE+3+20)=0
      RETURN
      END
      SUBROUTINE BUILD
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      INTEGER PTOC
      INTEGER LINE(102)
      INTEGER STATUS,INDEX,I,J,K,L
      CALL X$STAT(1,RINGS0,RINGA0,I,ADDRF0,J,STATUS,K)
      I=1
      DO 10021 J=1,RINGS0
        INDEX0(J)=J
        ADDRE0(J)=I
        I=I+((ADDRF0(J)+1)/2)
10021 CONTINUE
10022 DO 10023 I=1,RINGS0
        CALL X$STAT(4,J,RINGA0(ADDRE0(I)),ADDRF0(I),NODEN0(1,I),K,STATUS
     *,L)
        NAMES0(I)=PTOC(NODEN0(1,I),160,LINE,K+1)
        J=NAMES0(I)+1
        GOTO 10027
10025   J=J+(1)
10027   IF((J.GT.2*3))GOTO 10026
          LINE(J)=160
        GOTO 10025
10026   LINE(J)=0
        CALL MAPSTR(LINE,2)
        J=1
        CALL CTOP(LINE,J,NODEN0(1,I),3)
10023 CONTINUE
10024 I=RINGS0/2
      GOTO 10030
10028 I=I/(2)
10030 IF((I.LE.0))GOTO 10029
        J=I+1
        GOTO 10033
10031   J=J+(1)
10033   IF((J.GT.RINGS0))GOTO 10028
          K=J-I
          GOTO 10036
10034     K=K-(I)
10036     IF((K.LE.0))GOTO 10031
            L=1
            GOTO 10039
10037       L=L+(1)
10039       IF((L.GE.3))GOTO 10038
              IF((NODEN0(L,INDEX0(K)).EQ.NODEN0(L,INDEX0(K+I))))GOTO    
     *  10037
                GOTO 10038
10038       IF((NODEN0(L,INDEX0(K)).LE.NODEN0(L,INDEX0(K+I))))GOTO 10031
              INDEX=INDEX0(K)
              INDEX0(K)=INDEX0(K+I)
              INDEX0(K+I)=INDEX
              GOTO 10034
10029 DO 10043 I=1,RINGS0
        IF((INDEX0(I).NE.1))GOTO 10045
          HOMEI0=I
          GOTO 10044
10045   CONTINUE
10043 CONTINUE
10044 ACTIV0=RINGS0
      RETURN
      END
      SUBROUTINE CHANGE(RCV)
      INTEGER RCV
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      LOGICAL VALID
      INTEGER XMT,REQ
      INTEGER AAAAD0(30)
      INTEGER AAAAE0
      INTEGER AAAAF0
      DATA AAAAD0/195,242,229,225,244,229,228,160,201,206,201,212,201,19
     *3,204,201,218,197,160,242,229,243,240,239,238,243,229,170,238,0/
      IF((HEAP(RCV+6+3+21).NE.-2))GOTO 10046
        IF((HEAP(RCV+3+21).NE.0))GOTO 10047
          HEAP(RCV+1+8+3+21)=HEAP(RCV+1+8+3+21)+(1)
          IF((HEAP(RCV+1+3+21).NE.HOMEI0))GOTO 10048
            HEAP(RCV+3+21)=1
            HEAP(RCV+3+3+21)=1
            CALL PRINT(-11,AAAAD0)
10048   CONTINUE
10047   IF((HEAP(RCV+3+21).NE.1))GOTO 10049
          ACTIV0=HEAP(RCV+1+8+3+21)
          REQ=HEAP(REQUE0+2)
          GOTO 10052
10050     REQ=HEAP(REQ+2)
10052     IF((REQ.EQ.REQUE0))GOTO 10051
            IF((HEAP(REQ+3+19).LE.ACTIV0))GOTO 10050
              HEAP(REQ+3+19)=ACTIV0
10053     GOTO 10050
10051     AAAAE0=HEAP(RCV+2+8+3+21)
          GOTO 10054
10055       IF((HEAP(RCV+9).LE.HOMEI0))GOTO 10062
              HEAP(TRANS0)=3
              XMT=TRANS0
10057           XMT=HEAP(XMT+2)
              IF((HEAP(XMT).NE.3))GOTO 10057
              HEAP(TRANS0)=1
              IF((XMT.EQ.TRANS0))GOTO 10058
              IF((.NOT.VALID(HEAP(XMT+3+13))))GOTO 10058
              IF((HEAP(XMT+9).LE.HOMEI0))GOTO 10058
                IF((.NOT.INITI0))GOTO 10059
                  HEAP(RCV+2+8+3+21)=2
                  IF((.NOT.PRIVI0))GOTO 10061
                    SYNCH0=.TRUE.
10060             GOTO 10061
10059             HEAP(RCV+1+3+21)=HOMEI0
                  HEAP(RCV+3+3+21)=1
                  HEAP(RCV+2+8+3+21)=1
10061         CONTINUE
10058       CONTINUE
10056     GOTO 10062
10063       IF((.NOT.INITI0))GOTO 10062
              HEAP(RCV+2+8+3+21)=2
              IF((.NOT.PRIVI0))GOTO 10065
                SYNCH0=.TRUE.
10065       CONTINUE
10064     GOTO 10062
10054     AAAAF0=AAAAE0+1
          GOTO(10055,10063,10062),AAAAF0
10062   CONTINUE
10049 CONTINUE
10046 RETURN
      END
      SUBROUTINE CLEAN0(CP)
      INTEGER * 4 CP
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      IF(TERMI0)GOTO 10067
        CALL X$CLRA
10067 RETURN
      END
      SUBROUTINE CONNE0
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      LOGICAL VALID
      INTEGER XMT,RSP
      INTEGER AAAAG0(28)
      INTEGER AAAAH0(32)
      DATA AAAAG0/204,239,243,244,160,244,242,225,238,243,237,233,243,24
     *3,233,239,238,160,244,239,160,170,172,163,232,170,238,0/
      DATA AAAAH0/193,244,244,229,237,240,244,233,238,231,160,227,239,23
     *8,238,229,227,244,233,239,238,160,244,239,160,170,172,163,232,170,
     *238,0/
      HEAP(TRANS0)=3
      XMT=TRANS0
10068   XMT=HEAP(XMT+2)
      IF((HEAP(XMT).NE.3))GOTO 10068
      HEAP(TRANS0)=1
      IF((XMT.EQ.TRANS0))GOTO 10069
        IF(VALID(HEAP(XMT+3+13)))GOTO 10070
          CALL PRINT(-11,AAAAG0,NAMES0(INDEX0(HEAP(XMT+9))),NODEN0(1,IND
     *EX0(HEAP(XMT+9))))
          CALL DELETE(XMT)
          CALL DISPO0(XMT)
          GOTO 10071
10070     RETURN
10071 CONTINUE
10069 HEAP(TRANS0)=2
      XMT=TRANS0
10072   XMT=HEAP(XMT+2)
      IF((HEAP(XMT).NE.2))GOTO 10072
      HEAP(TRANS0)=1
      IF((XMT.NE.TRANS0))GOTO 10073
        CALL BUILD
        CALL ALLOC0(XMT)
        HEAP(XMT)=2
        HEAP(XMT+9)=HOMEI0
        CALL INSERT(TRANS0,XMT)
10073 IF(VALID(HEAP(XMT+3+13)))GOTO 10074
        HEAP(XMT+3)=(TIMEI0(4)*20+TIMEI0(5)/3)
10075     HEAP(XMT+9)=MOD(HEAP(XMT+9),RINGS0)+1
          HEAP(RESPO0+9)=HEAP(XMT+9)
          RSP=RESPO0
10076       RSP=HEAP(RSP+2)
          IF((HEAP(RSP+9).NE.HEAP(XMT+9)))GOTO 10076
          HEAP(RESPO0+9)=0
          IF((RSP.EQ.RESPO0))GOTO 10077
          IF((.NOT.VALID(HEAP(RSP+3+13))))GOTO 10077
            CALL TERMJ0(RSP)
10077     CALL X$CONN(HEAP(XMT+3+12),97,NODEN0(1,INDEX0(HEAP(XMT+9))),NA
     *MES0(INDEX0(HEAP(XMT+9))),HEAP(XMT+3+13))
          CALL PRINT(-11,AAAAH0,NAMES0(INDEX0(HEAP(XMT+9))),NODEN0(1,IND
     *EX0(HEAP(XMT+9))))
        IF((.NOT.VALID(HEAP(XMT+3+13))))GOTO 10075
10074 RETURN
      END
      SUBROUTINE DELETE(NODE)
      INTEGER NODE
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      IF((HEAP(NODE).NE.1))GOTO 10078
        CALL ERROR('Can''t delete dummy header node.')
10078 IF((HEAP(NODE+1).EQ.0))GOTO 10080
      IF((HEAP(NODE+2).EQ.0))GOTO 10080
      GOTO 10079
10080   CALL ERROR('Node already deleted.')
10079 HEAP(HEAP(NODE+1)+2)=HEAP(NODE+2)
      HEAP(HEAP(NODE+2)+1)=HEAP(NODE+1)
      HEAP(NODE+1)=0
      HEAP(NODE+2)=0
      RETURN
      END
      SUBROUTINE DISPO0(NODE)
      INTEGER NODE
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      IF((HEAP(NODE).NE.1))GOTO 10081
        CALL ERROR('Can''t dispose dummy header node.')
        GOTO 10082
10081   IF((HEAP(NODE).NE.0))GOTO 10083
          CALL DSFREE(NODE)
          GOTO 10084
10083     CALL INSERT(COMPL0,NODE)
10084 CONTINUE
10082 RETURN
      END
      SUBROUTINE EXAMI0
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      LOGICAL VALID
      INTEGER TIME
      INTEGER XMT,RSP,RCV,VAL,BACK,LIST,PTR
      INTEGER AAAAI0
      XMT=HEAP(TRANS0+2)
      GOTO 10087
10085 XMT=HEAP(XMT+2)
10087 IF((XMT.EQ.TRANS0))GOTO 10086
        IF((HEAP(XMT).NE.2))GOTO 10085
        IF((.NOT.VALID(HEAP(XMT+3+13))))GOTO 10085
          TIME=(TIMEI0(4)*20+TIMEI0(5)/3)
          IF((TIME.GE.HEAP(XMT+3)))GOTO 10089
            TIME=TIME+(28800)
10089     IF((TIME-HEAP(XMT+3).LE.15))GOTO 10090
            BACK=HEAP(XMT+1)
            CALL TERMJ0(XMT)
            HEAP(RESPO0+9)=HEAP(XMT+9)
            RSP=RESPO0
10091         RSP=HEAP(RSP+2)
            IF((HEAP(RSP+9).NE.HEAP(XMT+9)))GOTO 10091
            HEAP(RESPO0+9)=0
            IF((RSP.EQ.RESPO0))GOTO 10092
            IF((.NOT.VALID(HEAP(RSP+3+13))))GOTO 10092
              CALL TERMJ0(RSP)
              CALL DELETE(RSP)
              CALL DISPO0(RSP)
10092       CALL DELETE(XMT)
            CALL DISPO0(XMT)
            XMT=BACK
10090   CONTINUE
10088 GOTO 10085
10086 RCV=HEAP(RECEI0+2)
      GOTO 10095
10093 RCV=HEAP(RCV+2)
10095 IF((RCV.EQ.RECEI0))GOTO 10094
        IF((.NOT.VALID(HEAP(RCV+3+13))))GOTO 10096
          IF((HEAP(RCV).NE.2))GOTO 10093
            TIME=(TIMEI0(4)*20+TIMEI0(5)/3)
            IF((TIME.GE.HEAP(RCV+3)))GOTO 10098
              TIME=TIME+(28800)
10098       IF((TIME-HEAP(RCV+3).LE.15))GOTO 10099
              BACK=HEAP(RCV+1)
              CALL TERMJ0(RCV)
              HEAP(VALID0+9)=HEAP(RCV+9)
              VAL=VALID0
10100           VAL=HEAP(VAL+2)
              IF((HEAP(VAL+9).NE.HEAP(RCV+9)))GOTO 10100
              HEAP(VALID0+9)=0
              IF((VAL.EQ.VALID0))GOTO 10101
              IF((.NOT.VALID(HEAP(VAL+3+13))))GOTO 10101
                CALL TERMJ0(VAL)
                CALL DELETE(VAL)
                CALL DISPO0(VAL)
10101         CALL DELETE(RCV)
              CALL DISPO0(RCV)
              RCV=BACK
10099     CONTINUE
10097     GOTO 10093
10096     BACK=HEAP(RCV+1)
          CALL DELETE(RCV)
          CALL DISPO0(RCV)
          RCV=BACK
10102 GOTO 10093
10094 LIST=VALID0
10103   PTR=HEAP(LIST+2)
        GOTO 10106
10104   PTR=HEAP(PTR+2)
10106   IF((PTR.EQ.LIST))GOTO 10105
          IF((.NOT.VALID(HEAP(PTR+3+13))))GOTO 10107
            TIME=(TIMEI0(4)*20+TIMEI0(5)/3)
            IF((TIME.GE.HEAP(PTR+3)))GOTO 10108
              TIME=TIME+(28800)
10108       IF((TIME-HEAP(PTR+3).LE.15))GOTO 10104
              BACK=HEAP(PTR+1)
              CALL TERMJ0(PTR)
              CALL DELETE(PTR)
              CALL DISPO0(PTR)
              PTR=BACK
10109       GOTO 10104
10107       BACK=HEAP(PTR+1)
            CALL DELETE(PTR)
            CALL DISPO0(PTR)
            PTR=BACK
10110   GOTO 10104
10105   AAAAI0=LIST
        GOTO 10111
10112     LIST=RESPO0
        GOTO 10113
10114     LIST=REQUE0
        GOTO 10113
10115     RETURN
10111   IF((VALID0.EQ.AAAAI0))GOTO 10112
        IF((RESPO0.EQ.AAAAI0))GOTO 10114
        IF((REQUE0.EQ.AAAAI0))GOTO 10115
10113 CONTINUE
      GOTO 10103
      END
      SUBROUTINE EXECU0(RCV)
      INTEGER RCV
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      LOGICAL VALID
      INTEGER I
      INTEGER XMT
      IF((.NOT.VALID(HEAP(RCV+3+16))))GOTO 10116
        IF((HEAP(RCV+3+16).NE.0))GOTO 10141
          HEAP(RCV+3)=(TIMEI0(4)*20+TIMEI0(5)/3)
          IF((HEAP(RCV+3+3+21).GE.ACTIV0))GOTO 10118
            HEAP(RCV+3+3+21)=HEAP(RCV+3+3+21)+(1)
            IF((HEAP(RCV+4).NE.0))GOTO 10119
              CALL CHANGE(RCV)
10119       IF((HEAP(RCV+5).NE.0))GOTO 10120
            IF((HEAP(RCV+2+3+21).EQ.HOMEI0))GOTO 10120
              HEAP(TRANS0)=3
              XMT=TRANS0
10121           XMT=HEAP(XMT+2)
              IF((HEAP(XMT).NE.3))GOTO 10121
              HEAP(TRANS0)=1
              IF((XMT.EQ.TRANS0))GOTO 10122
              IF((.NOT.VALID(HEAP(XMT+3+13))))GOTO 10122
              IF((HEAP(XMT+3+15).EQ.1))GOTO 10122
                HEAP(XMT+3)=(TIMEI0(4)*20+TIMEI0(5)/3)
                I=0
                GOTO 10125
10123           I=I+(1)
10125           IF((I.GE.9+128))GOTO 10124
                  HEAP(XMT+I+3+21)=HEAP(RCV+I+3+21)
                GOTO 10123
10124           CALL X$TRAN(HEAP(XMT+3+12),0,HEAP(XMT+3+21),272,HEAP(XMT
     *+3+15))
                HEAP(RCV+4)=0
                HEAP(RCV+5)=1
                GOTO 10127
10122           HEAP(RCV+4)=1
10126         GOTO 10127
10120         HEAP(RCV+5)=1
10127       IF((HEAP(RCV+5).NE.1))GOTO 10128
              IF((HEAP(RCV+2+3+21).NE.HOMEI0))GOTO 10129
                IF((HEAP(RCV+3+21).NE.0))GOTO 10130
                  IF((HEAP(RCV+7).NE.0))GOTO 10131
                    CALL PERFO0(RCV)
10131             IF((HEAP(RCV+7).NE.1))GOTO 10134
                    HEAP(RCV+7+3+21)=6
                    HEAP(RCV+8+3+21)=0
                    CALL REPORT(RCV)
10132             GOTO 10134
10130             CALL REPORT(RCV)
10133           GOTO 10134
10129           IF((HEAP(RCV+3+21).NE.0))GOTO 10135
                IF((HEAP(RCV+2+3+21).NE.-1))GOTO 10135
                  IF((HEAP(RCV+7).NE.0))GOTO 10136
                    CALL PERFO0(RCV)
10136           CONTINUE
10135         CONTINUE
10134       CONTINUE
10128       IF((HEAP(RCV+4).NE.0))GOTO 10137
              CALL X$RCV(HEAP(RCV+3+12),HEAP(RCV+3+21),272,HEAP(RCV+3+16
     *))
              HEAP(RCV+5)=0
              HEAP(RCV+6)=0
              HEAP(RCV+7)=0
              HEAP(RCV+8)=0
              GOTO 10139
10137         HEAP(RCV+3+3+21)=HEAP(RCV+3+3+21)-(1)
10138       GOTO 10139
10118       CALL FINISH(RCV)
            IF((HEAP(RCV+4).NE.0))GOTO 10140
              CALL X$RCV(HEAP(RCV+3+12),HEAP(RCV+3+21),272,HEAP(RCV+3+16
     *))
              HEAP(RCV+5)=0
              HEAP(RCV+6)=0
              HEAP(RCV+7)=0
              HEAP(RCV+8)=0
10140     CONTINUE
10139   CONTINUE
10117   GOTO 10141
10116   CALL X$RCV(HEAP(RCV+3+12),HEAP(RCV+3+21),272,HEAP(RCV+3+16))
10141 RETURN
      END
      SUBROUTINE FINISH(RCV)
      INTEGER RCV
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      LOGICAL VALID
      INTEGER XMT
      INTEGER AAAAJ0(35)
      INTEGER AAAAK0(30)
      DATA AAAAJ0/210,229,244,242,225,238,243,237,233,244,244,229,228,16
     *0,201,206,201,212,201,193,204,201,218,197,160,242,229,241,245,229,
     *243,244,170,238,0/
      DATA AAAAK0/210,233,238,231,160,233,238,233,244,233,225,236,233,25
     *0,229,228,160,226,249,160,228,229,230,225,245,236,244,170,238,0/
      IF((HEAP(RCV+6+3+21).NE.-2))GOTO 10142
        IF((HEAP(RCV+3+21).NE.0))GOTO 10143
          SYNCH0=.FALSE.
          TERMI0=.FALSE.
          IF((HEAP(RCV+5).NE.0))GOTO 10150
            HEAP(TRANS0)=3
            XMT=TRANS0
10145         XMT=HEAP(XMT+2)
            IF((HEAP(XMT).NE.3))GOTO 10145
            HEAP(TRANS0)=1
            IF((XMT.EQ.TRANS0))GOTO 10146
            IF((.NOT.VALID(HEAP(XMT+3+13))))GOTO 10146
            IF((HEAP(XMT+3+15).EQ.1))GOTO 10146
              HEAP(XMT+3+21)=0
              HEAP(XMT+1+3+21)=HOMEI0
              HEAP(XMT+2+3+21)=-1
              HEAP(XMT+3+3+21)=0
              HEAP(XMT+4+3+21)=HOMEP0
              HEAP(XMT+5+3+21)=0
              HEAP(XMT+6+3+21)=-2
              HEAP(XMT+7+3+21)=1
              HEAP(XMT+8+3+21)=0
              HEAP(XMT+1+8+3+21)=0
              HEAP(XMT+2+8+3+21)=0
              CALL X$TRAN(HEAP(XMT+3+12),0,HEAP(XMT+3+21),272,HEAP(XMT+3
     *+15))
              CALL PRINT(-11,AAAAJ0)
              HEAP(RCV+4)=0
              HEAP(RCV+5)=1
              GOTO 10147
10146         HEAP(RCV+4)=1
10147     CONTINUE
10144     GOTO 10150
10143     IF((HEAP(RCV+2+8+3+21).EQ.2))GOTO 10149
            INITI0=.TRUE.
            SYNCH0=PRIVI0
            TERMI0=.FALSE.
            CALL PRINT(-11,AAAAK0)
10149   CONTINUE
10148   GOTO 10150
10142   IF((HEAP(RCV+3+21).NE.0))GOTO 10151
          IF((HEAP(RCV+7).NE.0))GOTO 10152
            IF((HEAP(RCV+2+3+21).NE.-1))GOTO 10153
              HEAP(RCV+7+3+21)=6
              GOTO 10154
10153         HEAP(RCV+7+3+21)=3
10154       HEAP(RCV+8+3+21)=0
            HEAP(RCV+7)=1
10152     CALL REPORT(RCV)
10151 CONTINUE
10150 RETURN
      END
      SUBROUTINE GENER0
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      LOGICAL VALID
      INTEGER LINE(102)
      INTEGER I
      INTEGER * 4 TIME
      INTEGER RCV,XMT
      INTEGER AAAAL0(7)
      INTEGER AAAAM0(7)
      INTEGER AAAAN0(65)
      DATA AAAAL0/170,178,172,172,176,233,0/
      DATA AAAAM0/170,178,172,172,176,233,0/
      DATA AAAAN0/212,242,225,238,243,237,233,244,244,229,228,160,211,21
     *7,206,195,200,210,207,206,201,218,197,160,242,229,241,245,229,243,
     *244,160,225,244,160,170,172,178,232,186,170,172,178,232,160,239,23
     *8,160,170,172,178,232,175,170,172,178,232,175,170,172,178,232,170,
     *238,0/
      IF((.NOT.PRIVI0))GOTO 10155
        HEAP(RECEI0)=3
        RCV=RECEI0
10156     RCV=HEAP(RCV+2)
        IF((HEAP(RCV).NE.3))GOTO 10156
        HEAP(RECEI0)=1
        HEAP(TRANS0)=3
        XMT=TRANS0
10157     XMT=HEAP(XMT+2)
        IF((HEAP(XMT).NE.3))GOTO 10157
        HEAP(TRANS0)=1
        TIME=INTL(TIMEI0(4))*INTL(60)+INTL(TIMEI0(5))
        TIME=MOD(TIME,INTL(3600))
        IF((TIME.GE.INTL(3600-1)))GOTO 10159
        IF((TIME.LE.INTL(1)))GOTO 10159
        GOTO 10158
10159     IF((RCV.EQ.RECEI0))GOTO 10160
          IF((.NOT.VALID(HEAP(RCV+3+13))))GOTO 10160
          IF((HEAP(RCV+9).LE.HOMEI0))GOTO 10160
            IF((XMT.EQ.TRANS0))GOTO 10161
            IF((.NOT.VALID(HEAP(XMT+3+13))))GOTO 10161
            IF((HEAP(XMT+9).LE.HOMEI0))GOTO 10161
              SYNCH0=.TRUE.
10161     CONTINUE
10160   CONTINUE
10158   IF((.NOT.INITI0))GOTO 10162
        IF((.NOT.SYNCH0))GOTO 10162
          IF((.NOT.VALID(HEAP(XMT+3+13))))GOTO 10163
          IF((HEAP(XMT+3+15).EQ.1))GOTO 10163
          IF((TIMEI0(5).NE.0))GOTO 10163
            HEAP(XMT+3)=(TIMEI0(4)*20+TIMEI0(5)/3)
            HEAP(XMT+3+21)=0
            HEAP(XMT+1+3+21)=HOMEI0
            HEAP(XMT+2+3+21)=-1
            HEAP(XMT+3+3+21)=1
            HEAP(XMT+4+3+21)=HOMEP0
            HEAP(XMT+5+3+21)=0
            HEAP(XMT+6+3+21)=-3
            HEAP(XMT+7+3+21)=1
            HEAP(XMT+8+3+21)=0
            HEAP(XMT+1+8+3+21)=TIMEI0(1)
            HEAP(XMT+2+8+3+21)=TIMEI0(2)
            HEAP(XMT+3+8+3+21)=TIMEI0(3)
            CALL ENCODE(LINE,102,AAAAL0,TIMEI0(4)/60)
            I=1
            CALL CTOP(LINE,I,HEAP(XMT+4+8+3+21),1)
            CALL ENCODE(LINE,102,AAAAM0,MOD(TIMEI0(4),60))
            I=1
            CALL CTOP(LINE,I,HEAP(XMT+5+8+3+21),1)
            CALL X$TRAN(HEAP(XMT+3+12),0,HEAP(XMT+3+21),272,HEAP(XMT+3+1
     *5))
            CALL PRINT(-11,AAAAN0,HEAP(XMT+4+8+3+21),HEAP(XMT+5+8+3+21),
     *HEAP(XMT+1+8+3+21),HEAP(XMT+2+8+3+21),HEAP(XMT+3+8+3+21))
            SYNCH0=.FALSE.
            CALL SLEEP$(INTL(1+1)*INTL(1000))
10163   CONTINUE
10162 CONTINUE
10155 RETURN
      END
      SUBROUTINE IDENT0(NODE)
      INTEGER NODE
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      INTEGER PTOC
      LOGICAL VALID
      INTEGER LINE(102)
      INTEGER CIRCU0(64),VCINFO(13),PROCID(64),METER(43)
      LOGICAL KNOWN(64)
      INTEGER NUMBER,COUNT,STATUS,I,J
      INTEGER REQ
      CALL X$STAT(2,NUMBER,RINGA0(ADDRE0(1)),ADDRF0(1),CIRCU0,COUNT,STAT
     *US,I)
      COUNT=0
      I=1
      GOTO 10166
10164 I=I+(1)
10166 IF((I.GT.NUMBER))GOTO 10165
        CALL X$STAT(3,CIRCU0(I),0,0,VCINFO,13,STATUS,J)
        IF((STATUS.NE.0))GOTO 10164
          IF((VCINFO(5).NE.99))GOTO 10168
          IF((VCINFO(1).NE.5))GOTO 10168
          IF((VCINFO(2).EQ.HOMEP0))GOTO 10168
            COUNT=COUNT+(1)
            KNOWN(COUNT)=.FALSE.
            PROCID(COUNT)=VCINFO(2)
10168   CONTINUE
10167 GOTO 10164
10165 REQ=HEAP(REQUE0+2)
      GOTO 10171
10169 REQ=HEAP(REQ+2)
10171 IF((REQ.EQ.REQUE0))GOTO 10170
        IF((.NOT.VALID(HEAP(REQ+3+13))))GOTO 10169
          I=1
          GOTO 10175
10173     I=I+(1)
10175     IF((I.GT.COUNT))GOTO 10174
            IF(KNOWN(I))GOTO 10173
            IF((PROCID(I).NE.HEAP(REQ+3+10)))GOTO 10173
              KNOWN(I)=.TRUE.
              GOTO 10174
10174   CONTINUE
10172 GOTO 10169
10170 I=1
      GOTO 10179
10177 I=I+(1)
10179 IF((I.GT.COUNT))GOTO 10178
        IF(KNOWN(I))GOTO 10177
          HEAP(NODE)=3
          HEAP(NODE+3+10)=PROCID(I)
          CALL GMETR$(4,LOC(METER),43,STATUS,PROCID(I))
          J=PTOC(METER(5),160,LINE,2*3+1)+1
10181     IF((J.GT.2*3))GOTO 10182
            LINE(J)=160
            J=J+(1)
          GOTO 10181
10182     LINE(J)=0
          CALL MAPSTR(LINE,2)
          J=1
          CALL CTOP(LINE,J,HEAP(NODE+1+9),3)
          GOTO 10178
10178 RETURN
      END
      SUBROUTINE INITJ0
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      INTEGER EQUAL
      INTEGER STATUS
      INTEGER LINE(102)
      INTEGER AAAAO0(9)
      INTEGER AAAAP0(4)
      DATA AAAAO0/189,199,225,212,229,227,232,189,0/
      DATA AAAAP0/249,229,243,0/
      TERMI0=.FALSE.
      CALL X$ASGN(97,0,STATUS)
      IF((STATUS.EQ.0))GOTO 10183
        CALL ERROR('Can''t assign Ring port.')
10183 CALL X$ASGN(98,0,STATUS)
      IF((STATUS.EQ.0))GOTO 10184
        CALL ERROR('Can''t assign Check port.')
10184 CALL X$ASGN(99,0,STATUS)
      IF((STATUS.EQ.0))GOTO 10185
        CALL ERROR('Can''t assign User port.')
10185 CALL DSINIT(10000)
      CALL TIMDAT(TIMEI0,15)
      HOMEP0=TIMEI0(12)
      SEQUE0=0
      CALL EXPAND(AAAAO0,LINE,102)
      PRIVI0=(EQUAL(LINE,AAAAP0).EQ.1)
      INITI0=.FALSE.
      SYNCH0=.FALSE.
      CALL ALLOC0(TRANS0)
      HEAP(TRANS0)=1
      HEAP(TRANS0+2)=TRANS0
      HEAP(TRANS0+1)=TRANS0
      CALL ALLOC0(RECEI0)
      HEAP(RECEI0)=1
      HEAP(RECEI0+2)=RECEI0
      HEAP(RECEI0+1)=RECEI0
      CALL ALLOC0(VALID0)
      HEAP(VALID0)=1
      HEAP(VALID0+2)=VALID0
      HEAP(VALID0+1)=VALID0
      CALL ALLOC0(RESPO0)
      HEAP(RESPO0)=1
      HEAP(RESPO0+2)=RESPO0
      HEAP(RESPO0+1)=RESPO0
      CALL ALLOC0(REQUE0)
      HEAP(REQUE0)=1
      HEAP(REQUE0+2)=REQUE0
      HEAP(REQUE0+1)=REQUE0
      CALL ALLOC0(COMPL0)
      HEAP(COMPL0)=1
      HEAP(COMPL0+2)=COMPL0
      HEAP(COMPL0+1)=COMPL0
      RETURN
      END
      SUBROUTINE INSERT(LIST,NODE)
      INTEGER LIST,NODE
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      IF((HEAP(NODE).NE.1))GOTO 10186
        CALL ERROR('Can''t insert dummy header node into list.')
10186 IF((HEAP(NODE+1).NE.0))GOTO 10188
      IF((HEAP(NODE+2).NE.0))GOTO 10188
      GOTO 10187
10188   CALL ERROR('Node already inserted.')
10187 HEAP(NODE+1)=LIST
      HEAP(NODE+2)=HEAP(LIST+2)
      HEAP(HEAP(NODE+1)+2)=NODE
      HEAP(HEAP(NODE+2)+1)=NODE
      RETURN
      END
      SUBROUTINE PAUSE
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      LOGICAL VALID
      INTEGER NAME(3),STATUS(2)
      INTEGER VCID,PORT,SIZE
      INTEGER * 4 TIME
      INTEGER XMT,RCV,VAL,RSP,REQ
      HEAP(TRANS0)=3
      XMT=TRANS0
10189   XMT=HEAP(XMT+2)
      IF((HEAP(XMT).NE.3))GOTO 10189
      HEAP(TRANS0)=1
      IF((XMT.NE.TRANS0))GOTO 10190
        HEAP(TRANS0)=2
        XMT=TRANS0
10191     XMT=HEAP(XMT+2)
        IF((HEAP(XMT).NE.2))GOTO 10191
        HEAP(TRANS0)=1
10190 IF((XMT.EQ.TRANS0))GOTO 10193
      IF((.NOT.VALID(HEAP(XMT+3+13))))GOTO 10193
      GOTO 10192
10193   RETURN
10192 CALL XLGCON(:00000,VCID,PORT,NAME,2*3,SIZE,0,0,0,0,0,0,0,0,0,STATU
     *S)
      IF((STATUS(1).NE.0))GOTO 10194
        RETURN
10194 RCV=HEAP(RECEI0+2)
      GOTO 10197
10195 RCV=HEAP(RCV+2)
10197 IF((RCV.EQ.RECEI0))GOTO 10196
        IF((.NOT.VALID(HEAP(RCV+3+13))))GOTO 10195
        IF((.NOT.VALID(HEAP(RCV+3+16))))GOTO 10199
        IF((HEAP(RCV+3+16).EQ.0))GOTO 10199
        GOTO 10195
10199     IF((HEAP(RCV+4).NE.1))GOTO 10200
            CALL X$WAIT(1)
10200     RETURN
10196 VAL=HEAP(VALID0+2)
      GOTO 10203
10201 VAL=HEAP(VAL+2)
10203 IF((VAL.EQ.VALID0))GOTO 10202
        IF((.NOT.VALID(HEAP(VAL+3+13))))GOTO 10201
        IF((HEAP(VAL+3+13).EQ.1))GOTO 10201
        IF((HEAP(VAL+4).NE.0))GOTO 10201
          IF((HEAP(VAL+8).NE.1))GOTO 10205
            CALL X$WAIT(1)
10205     RETURN
10202 RSP=HEAP(RESPO0+2)
      GOTO 10208
10206 RSP=HEAP(RSP+2)
10208 IF((RSP.EQ.RESPO0))GOTO 10207
        IF((.NOT.VALID(HEAP(RSP+3+13))))GOTO 10206
        IF((.NOT.VALID(HEAP(RSP+3+16))))GOTO 10210
        IF((HEAP(RSP+3+16).NE.0))GOTO 10206
        IF((HEAP(RSP+4).NE.0))GOTO 10206
        GOTO 10210
10210     IF((HEAP(RSP+8).NE.1))GOTO 10212
            CALL X$WAIT(1)
10212     RETURN
10207 REQ=HEAP(REQUE0+2)
      GOTO 10215
10213 REQ=HEAP(REQ+2)
10215 IF((REQ.EQ.REQUE0))GOTO 10214
        IF((HEAP(REQ+4).NE.0))GOTO 10213
        IF((.NOT.VALID(HEAP(REQ+3+13))))GOTO 10213
        IF((HEAP(REQ+3+16).NE.0))GOTO 10213
          IF((HEAP(REQ+8).NE.1))GOTO 10217
            CALL X$WAIT(1)
10217     RETURN
10214 CALL TIMDAT(TIMEI0,15)
      TIME=MOD(INTL(TIMEI0(4))*INTL(60)+INTL(TIMEI0(5)),INTL(15))
      CALL X$WAIT(INTS(INTL(15)-TIME)*10)
      RETURN
      END
      SUBROUTINE PERFO0(VRCV)
      INTEGER VRCV
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      INTEGER MKTEMP,CREATE
      INTEGER SYS$$,PHANT0
      LOGICAL VALID
      INTEGER LINE(102),NAME(102)
      INTEGER TEMP
      INTEGER STATUS,TIME,I,J
      INTEGER BRCV,VAL,LIST,PTR
      INTEGER AAAAQ0
      INTEGER AAAAR0(30)
      INTEGER AAAAS0(31)
      INTEGER AAAAT0(46)
      INTEGER AAAAU0
      INTEGER AAAAV0(26)
      INTEGER AAAAW0
      INTEGER AAAAX0(20)
      INTEGER AAAAY0(25)
      INTEGER AAAAZ0(25)
      INTEGER AAABA0(5)
      INTEGER AAABB0(33)
      INTEGER AAABC0(33)
      INTEGER AAABD0(18)
      INTEGER AAABE0(15)
      INTEGER AAABF0(9)
      INTEGER AAABG0(5)
      INTEGER AAABH0(10)
      INTEGER AAABI0(37)
      INTEGER AAABJ0(40)
      INTEGER AAABK0(29)
      INTEGER AAABL0
      DATA AAAAR0/201,206,201,212,201,193,204,201,218,197,160,242,229,24
     *1,245,229,243,244,160,242,229,227,229,233,246,229,228,170,238,0/
      DATA AAAAS0/211,197,212,201,205,197,160,173,170,172,178,232,170,17
     *2,178,232,170,172,178,232,160,173,170,172,178,232,170,172,178,232,
     *0/
      DATA AAAAT0/211,249,238,227,232,242,239,238,233,250,229,228,160,22
     *5,244,160,170,172,178,232,186,170,172,178,232,160,239,238,160,170,
     *172,178,232,175,170,172,178,232,175,170,172,178,232,170,238,0/
      DATA AAAAV0/210,233,238,231,160,211,200,213,212,196,207,215,206,16
     *0,233,238,233,244,233,225,244,229,228,170,238,0/
      DATA AAAAX0/211,232,245,244,228,239,247,238,160,227,239,237,240,23
     *6,229,244,229,170,238,0/
      DATA AAAAY0/205,197,211,211,193,199,197,160,170,172,163,232,160,17
     *3,206,207,215,160,173,198,207,210,195,197,0/
      DATA AAAAZ0/205,197,211,211,193,199,197,160,173,193,204,204,160,17
     *3,206,207,215,160,173,198,207,210,195,197,0/
      DATA AAABA0/170,243,170,238,0/
      DATA AAABB0/205,229,243,243,225,231,229,160,226,242,239,225,228,22
     *7,225,243,244,160,244,239,160,245,243,229,242,160,170,172,163,232,
     *170,238,0/
      DATA AAABC0/205,229,243,243,225,231,229,160,226,242,239,225,228,22
     *7,225,243,244,160,244,239,160,193,204,204,160,245,243,229,242,243,
     *170,238,0/
      DATA AAABD0/189,244,229,237,240,189,175,242,237,240,232,170,179,17
     *2,172,176,233,0/
      DATA AAABE0/195,200,193,208,160,204,207,215,197,210,160,178,170,23
     *8,0/
      DATA AAABF0/211,215,212,160,173,182,170,238,0/
      DATA AAABG0/170,243,170,238,0/
      DATA AAABH0/243,244,239,240,160,170,243,170,238,0/
      DATA AAABI0/208,232,225,238,244,239,237,160,168,170,233,169,160,22
     *7,242,229,225,244,229,228,160,230,239,242,160,245,243,229,242,160,
     *170,172,163,232,170,238,0/
      DATA AAABJ0/208,232,225,238,244,239,237,160,227,242,229,225,244,23
     *3,239,238,160,230,239,242,160,245,243,229,242,160,170,172,163,232,
     *160,230,225,233,236,229,228,170,238,0/
      DATA AAABK0/212,197,210,205,201,206,193,212,197,160,242,229,241,24
     *5,229,243,244,160,242,229,227,229,233,246,229,228,170,238,0/
      IF((HEAP(VRCV+6).NE.0))GOTO 10218
        AAAAQ0=HEAP(VRCV+6+3+21)
        GOTO 10219
10220     HEAP(RECEI0)=2
          BRCV=RECEI0
10221       BRCV=HEAP(BRCV+2)
          IF((HEAP(BRCV).NE.2))GOTO 10221
          HEAP(RECEI0)=1
          IF((BRCV.EQ.RECEI0))GOTO 10222
          IF((.NOT.VALID(HEAP(BRCV+3+13))))GOTO 10222
          IF((HEAP(BRCV+9).NE.HEAP(VRCV+1+3+21)))GOTO 10222
            CALL TERMJ0(BRCV)
10222     HEAP(VALID0+9)=HEAP(VRCV+1+3+21)
          VAL=VALID0
10223       VAL=HEAP(VAL+2)
          IF((HEAP(VAL+9).NE.HEAP(VRCV+1+3+21)))GOTO 10223
          HEAP(VALID0+9)=0
          IF((VAL.EQ.VALID0))GOTO 10224
          IF((.NOT.VALID(HEAP(VAL+3+13))))GOTO 10224
            CALL TERMJ0(VAL)
10224     HEAP(VRCV+7+3+21)=0
          HEAP(VRCV+8+3+21)=0
        GOTO 10225
10226     CALL PRINT(-11,AAAAR0)
          SYNCH0=.FALSE.
          TERMI0=.FALSE.
          CALL BUILD
          HEAP(VRCV+7+3+21)=0
          HEAP(VRCV+8+3+21)=0
        GOTO 10225
10227     CALL ENCODE(LINE,102,AAAAS0,HEAP(VRCV+1+8+3+21),HEAP(VRCV+2+8+
     *3+21),HEAP(VRCV+3+8+3+21),HEAP(VRCV+4+8+3+21),HEAP(VRCV+5+8+3+21))
          STATUS=SYS$$(LINE,-3)
          CALL PRINT(-11,AAAAT0,HEAP(VRCV+4+8+3+21),HEAP(VRCV+5+8+3+21),
     *HEAP(VRCV+1+8+3+21),HEAP(VRCV+2+8+3+21),HEAP(VRCV+3+8+3+21))
          INITI0=.TRUE.
          CALL TIMDAT(TIMEI0,15)
          TIME=(TIMEI0(4)*20+TIMEI0(5)/3)
          LIST=TRANS0
10228       PTR=HEAP(LIST+2)
            GOTO 10231
10229       PTR=HEAP(PTR+2)
10231       IF((PTR.EQ.LIST))GOTO 10230
              IF((.NOT.VALID(HEAP(PTR+3+13))))GOTO 10229
                HEAP(PTR+3)=TIME
10232       GOTO 10229
10230       AAAAU0=LIST
            GOTO 10233
10234         LIST=RECEI0
            GOTO 10235
10236         LIST=VALID0
            GOTO 10235
10237         LIST=RESPO0
            GOTO 10235
10238         LIST=REQUE0
            GOTO 10235
10233       IF((TRANS0.EQ.AAAAU0))GOTO 10234
            IF((RECEI0.EQ.AAAAU0))GOTO 10236
            IF((VALID0.EQ.AAAAU0))GOTO 10237
            IF((RESPO0.EQ.AAAAU0))GOTO 10238
            IF((REQUE0.EQ.AAAAU0))GOTO 10240
10235     CONTINUE
          GOTO 10228
10240     IF((HEAP(VRCV+5+3+21).EQ.0))GOTO 10241
            IF((STATUS.NE.-2))GOTO 10242
              HEAP(VRCV+7+3+21)=7
              GOTO 10244
10242         HEAP(VRCV+7+3+21)=8
10243       GOTO 10244
10241       HEAP(VRCV+7+3+21)=0
10244     HEAP(VRCV+8+3+21)=0
        GOTO 10225
10245     IF((.NOT.TERMI0))GOTO 10246
            CALL PRINT(-11,AAAAV0)
            CALL SLEEP$(INTL(5000))
            LIST=TRANS0
10247         PTR=HEAP(LIST+2)
              GOTO 10250
10248         PTR=HEAP(PTR+2)
10250         IF((PTR.EQ.LIST))GOTO 10249
                IF((.NOT.VALID(HEAP(PTR+3+13))))GOTO 10248
                  CALL TERMJ0(PTR)
10251         GOTO 10248
10249         AAAAW0=LIST
              GOTO 10252
10253           LIST=RECEI0
              GOTO 10254
10255           LIST=VALID0
              GOTO 10254
10256           LIST=RESPO0
              GOTO 10254
10257           LIST=REQUE0
              GOTO 10254
10258           CALL PRINT(-11,AAAAX0)
                CALL SWT
10252         IF((TRANS0.EQ.AAAAW0))GOTO 10253
              IF((RECEI0.EQ.AAAAW0))GOTO 10255
              IF((VALID0.EQ.AAAAW0))GOTO 10256
              IF((RESPO0.EQ.AAAAW0))GOTO 10257
              IF((REQUE0.EQ.AAAAW0))GOTO 10258
10254       CONTINUE
            GOTO 10247
10246     HEAP(VRCV+7+3+21)=0
          HEAP(VRCV+8+3+21)=0
        GOTO 10225
10259     IF((HEAP(VRCV+1+8+3+21).EQ.0))GOTO 10260
            CALL ENCODE(LINE,102,AAAAY0,2*3,HEAP(VRCV+1+8+3+21))
            GOTO 10261
10260       CALL ENCODE(LINE,102,AAAAZ0)
10261     TEMP=MKTEMP(3)
          IF((TEMP.EQ.-3))GOTO 10262
            CALL PRINT(TEMP,AAABA0,HEAP(VRCV+1+3+8+3+21))
            CALL REWIND(TEMP)
            STATUS=SYS$$(LINE,TEMP)
            IF((HEAP(VRCV+1+8+3+21).EQ.0))GOTO 10263
              CALL PRINT(-11,AAABB0,2*3,HEAP(VRCV+1+8+3+21))
              GOTO 10264
10263         CALL PRINT(-11,AAABC0)
10264       CALL RMTEMP(TEMP)
            IF((STATUS.NE.-2))GOTO 10265
              HEAP(VRCV+7+3+21)=7
              GOTO 10266
10265         HEAP(VRCV+7+3+21)=8
10266       HEAP(VRCV+8+3+21)=0
            GOTO 10225
10262       HEAP(VRCV+7+3+21)=8
            HEAP(VRCV+8+3+21)=0
10267   GOTO 10225
10268     I=0
10269       I=I+(1)
            CALL ENCODE(NAME,102,AAABD0,I)
            TEMP=CREATE(NAME,2)
          IF((TEMP.NE.-3))GOTO 10270
          IF((I.GE.999))GOTO 10270
          GOTO 10269
10270     CONTINUE
          IF((TEMP.EQ.-3))GOTO 10271
            CALL PRINT(TEMP,AAABE0)
            CALL PRINT(TEMP,AAABF0)
            CALL PRINT(TEMP,AAABG0,HEAP(VRCV+1+3+8+3+21))
            CALL PRINT(TEMP,AAABH0,NAME)
            CALL CLOSE(TEMP)
            STATUS=PHANT0(NAME,VRCV)
            IF((STATUS.EQ.-3))GOTO 10272
              HEAP(VRCV+7+3+21)=7
              HEAP(VRCV+8+3+21)=STATUS
              CALL PRINT(-11,AAABI0,STATUS,2*3,HEAP(VRCV+1+8+3+21))
              GOTO 10225
10272         HEAP(VRCV+7+3+21)=8
              HEAP(VRCV+8+3+21)=0
              CALL PRINT(-11,AAABJ0,2*3,HEAP(VRCV+1+8+3+21))
10273       GOTO 10225
10271       HEAP(VRCV+7+3+21)=8
            HEAP(VRCV+8+3+21)=0
10274   GOTO 10225
10275     TERMI0=.TRUE.
          CALL PRINT(-11,AAABK0)
          HEAP(VRCV+7+3+21)=7
          HEAP(VRCV+8+3+21)=0
        GOTO 10225
10219   AAABL0=AAAAQ0+5
        GOTO(10245,10227,10226,10220,10276,10259,10268,10275),AAABL0
10276   CONTINUE
10225   HEAP(VRCV+6)=1
10218 IF((HEAP(VRCV+7+3+21).EQ.0))GOTO 10277
        CALL REPORT(VRCV)
        IF((HEAP(VRCV+4).NE.0))GOTO 10278
          HEAP(VRCV+7)=1
10278   HEAP(VRCV+8)=0
        GOTO 10279
10277   HEAP(VRCV+7)=1
10279 RETURN
      END
      INTEGER FUNCTION PHANT0(FILE,NODE)
      INTEGER FILE(102)
      INTEGER NODE
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      LOGICAL WIZARD
      INTEGER CNAME(33)
      INTEGER BUFF(57),PNAME(16),VNAME(17),PWORD(3)
      INTEGER ATTACH,PROCE0,STATUS,I
      INTEGER AAABM0(4)
      INTEGER AAABN0(6)
      INTEGER AAABO0(8)
      INTEGER AAABP0(1)
      INTEGER AAABQ0(1)
      DATA AAABM0/204,193,194,0/
      DATA AAABN0/174,199,213,210,213,0/
      DATA AAABO0/196,197,198,193,213,204,212,0/
      DATA AAABP0/0/
      DATA AAABQ0/0/
      BUFF(1)=1
      CALL PTOC(HEAP(NODE+1+8+3+21),160,CNAME,2*3+1)
      I=1
      CALL CTOV(CNAME,I,BUFF(2),17)
      IF((.NOT.WIZARD(HEAP(NODE+1+8+3+21))))GOTO 10280
        I=1
        CALL CTOV(AAABM0,I,BUFF(19),17)
        BUFF(40)=1
        I=1
        CALL CTOV(AAABN0,I,BUFF(41),17)
        GOTO 10281
10280   I=1
        CALL CTOV(AAABO0,I,BUFF(19),17)
        BUFF(40)=0
        I=1
        CALL CTOV(AAABP0,I,BUFF(41),17)
10281 BUFF(36)=0
      BUFF(37)=0
      BUFF(38)=0
      BUFF(39)=0
      CALL GETTO(FILE,PNAME,PWORD,ATTACH)
      CALL PTOC(PNAME,160,CNAME,33)
      I=1
      CALL CTOV(CNAME,I,VNAME,17)
      CALL SPAWN$(0,LOC(BUFF),VNAME,6,0,PROCE0,STATUS)
      IF((ATTACH.NE.1))GOTO 10282
        CALL FOLLOW(AAABQ0,0)
10282 IF((STATUS.NE.0))GOTO 10283
        PHANT0=PROCE0
        RETURN
10283   PHANT0=-3
        RETURN
      END
      SUBROUTINE PROCE0(NODE)
      INTEGER NODE
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      INTEGER AAABR0(36)
      DATA AAABR0/213,243,229,242,160,227,239,238,238,229,227,244,233,23
     *9,238,160,233,243,160,230,242,239,237,160,170,172,163,232,160,168,
     *170,233,169,170,238,0/
      IF((HEAP(NODE+9).NE.HOMEI0))GOTO 10284
        CALL X$ACPT(HEAP(NODE+3+12),HEAP(NODE+3+13))
        CALL IDENT0(NODE)
        IF((HEAP(NODE).NE.3))GOTO 10285
          CALL INSERT(REQUE0,NODE)
          CALL PRINT(-11,AAABR0,2*3,HEAP(NODE+1+9),HEAP(NODE+3+10))
          CALL X$RCV(HEAP(NODE+3+12),HEAP(NODE+3+21),272,HEAP(NODE+3+16)
     *)
          GOTO 10287
10285     CALL TERMJ0(NODE)
          CALL DISPO0(NODE)
10286   GOTO 10287
10284   CALL TERMJ0(NODE)
        CALL DISPO0(NODE)
10287 RETURN
      END
      SUBROUTINE REFORM(BRCV)
      INTEGER BRCV
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      LOGICAL VALID
      LOGICAL FLAG
      INTEGER VRCV,XMT,VAL,REQ
      INTEGER AAABS0(32)
      INTEGER AAABT0(30)
      INTEGER AAABU0(33)
      INTEGER AAABV0(25)
      INTEGER AAABW0(32)
      INTEGER AAABX0(33)
      INTEGER AAABY0(38)
      INTEGER AAABZ0(39)
      INTEGER AAACA0(39)
      DATA AAABS0/214,225,236,233,228,225,244,229,228,160,242,229,227,22
     *9,240,244,233,239,238,160,230,242,239,237,160,170,172,163,232,170,
     *238,0/
      DATA AAABT0/196,229,231,229,238,229,242,225,244,229,160,242,233,23
     *8,231,160,233,238,233,244,233,225,236,233,250,229,228,170,238,0/
      DATA AAABU0/212,242,225,238,243,237,233,244,244,229,228,160,201,20
     *6,201,212,201,193,204,201,218,197,160,242,229,241,245,229,243,244,
     *170,238,0/
      DATA AAABV0/210,229,227,229,233,246,229,160,236,229,246,229,236,16
     *0,233,243,160,238,239,244,160,176,170,238,0/
      DATA AAABW0/210,229,243,240,239,238,243,229,160,243,233,250,229,16
     *0,233,243,160,238,239,244,160,194,213,198,198,211,201,218,197,170,
     *238,0/
      DATA AAABX0/210,229,243,240,239,238,243,229,160,243,239,245,242,22
     *7,229,160,233,243,160,238,239,244,160,227,239,242,242,229,227,244,
     *170,238,0/
      DATA AAABY0/210,229,243,240,239,238,243,229,160,233,243,160,238,23
     *9,244,160,227,239,242,242,229,227,244,236,249,160,225,228,228,242,
     *229,243,243,229,228,170,238,0/
      DATA AAABZ0/210,229,243,240,239,238,243,229,160,244,242,225,238,24
     *3,237,233,243,243,233,239,238,160,227,239,245,238,244,160,233,243,
     *160,238,239,244,160,177,170,238,0/
      DATA AAACA0/210,229,243,240,239,238,243,229,160,233,243,160,238,23
     *9,244,160,225,160,246,225,236,233,228,225,244,233,239,238,160,242,
     *229,241,245,229,243,244,170,238,0/
      IF((.NOT.VALID(HEAP(BRCV+3+16))))GOTO 10288
        IF((HEAP(BRCV+3+16).NE.0))GOTO 10289
          HEAP(BRCV+3)=(TIMEI0(4)*20+TIMEI0(5)/3)
          FLAG=HEAP(BRCV+3+17).EQ.0.AND.HEAP(BRCV+3+18).EQ.272
          IF((.NOT.FLAG))GOTO 10290
            FLAG=HEAP(BRCV+1+3+21).EQ.HEAP(BRCV+9).AND.HEAP(BRCV+2+3+21)
     *.EQ.HOMEI0.AND.HEAP(BRCV+3+3+21).EQ.1.AND.HEAP(BRCV+6+3+21).EQ.-1
10290     IF((.NOT.FLAG))GOTO 10310
            HEAP(VALID0+9)=HEAP(BRCV+9)
            VAL=VALID0
10292         VAL=HEAP(VAL+2)
            IF((HEAP(VAL+9).NE.HEAP(BRCV+9)))GOTO 10292
            HEAP(VALID0+9)=0
            IF((VAL.EQ.VALID0))GOTO 10293
            IF((.NOT.VALID(HEAP(VAL+3+13))))GOTO 10293
              FLAG=HEAP(BRCV+8+3+21).EQ.HEAP(VAL+8+3+21)
              GOTO 10294
10293         FLAG=.FALSE.
10294       IF((.NOT.FLAG))GOTO 10319
              CALL TERMJ0(VAL)
              HEAP(RECEI0)=3
              VRCV=RECEI0
10296           VRCV=HEAP(VRCV+2)
              IF((HEAP(VRCV).NE.3))GOTO 10296
              HEAP(RECEI0)=1
              IF((VRCV.EQ.RECEI0))GOTO 10297
              IF((.NOT.VALID(HEAP(VRCV+3+13))))GOTO 10297
                FLAG=.FALSE.
                CALL TERMJ0(VRCV)
                GOTO 10298
10297           FLAG=.TRUE.
10298         HEAP(BRCV)=3
              CALL PRINT(-11,AAABS0,NAMES0(INDEX0(HEAP(BRCV+9))),NODEN0(
     *1,INDEX0(HEAP(BRCV+9))))
              CALL X$RCV(HEAP(BRCV+3+12),HEAP(BRCV+3+21),272,HEAP(BRCV+3
     *+16))
              IF((HEAP(BRCV+9).NE.HOMEI0))GOTO 10299
                INITI0=.TRUE.
                SYNCH0=.FALSE.
                TERMI0=.FALSE.
                ACTIV0=1
                REQ=HEAP(REQUE0+2)
                GOTO 10302
10300           REQ=HEAP(REQ+2)
10302           IF((REQ.EQ.REQUE0))GOTO 10301
                  IF((HEAP(REQ+3+19).LE.ACTIV0))GOTO 10300
                    HEAP(REQ+3+19)=ACTIV0
10303           GOTO 10300
10301           CALL PRINT(-11,AAABT0)
                GOTO 10304
10299           SYNCH0=.FALSE.
                TERMI0=.FALSE.
                HEAP(TRANS0)=3
                XMT=TRANS0
10305             XMT=HEAP(XMT+2)
                IF((HEAP(XMT).NE.3))GOTO 10305
                HEAP(TRANS0)=1
                IF((XMT.EQ.TRANS0))GOTO 10306
                IF((.NOT.VALID(HEAP(XMT+3+13))))GOTO 10306
10307             IF((HEAP(XMT+3+15).NE.1))GOTO 10308
                    CALL X$WAIT(1)
                  GOTO 10307
10308             HEAP(XMT+3+21)=0
                  HEAP(XMT+1+3+21)=HOMEI0
                  HEAP(XMT+2+3+21)=-1
                  HEAP(XMT+3+3+21)=0
                  HEAP(XMT+4+3+21)=HOMEP0
                  HEAP(XMT+5+3+21)=0
                  HEAP(XMT+6+3+21)=-2
                  HEAP(XMT+7+3+21)=1
                  HEAP(XMT+8+3+21)=0
                  HEAP(XMT+1+8+3+21)=0
                  HEAP(XMT+2+8+3+21)=0
                  CALL X$TRAN(HEAP(XMT+3+12),0,HEAP(XMT+3+21),272,HEAP(X
     *MT+3+15))
                  CALL PRINT(-11,AAABU0)
10306         CONTINUE
10304         FLAG=.TRUE.
10295       GOTO 10319
10311         CALL PRINT(-11,AAABV0)
            GOTO 10312
10313         CALL PRINT(-11,AAABW0)
            GOTO 10312
10314         CALL PRINT(-11,AAABX0)
            GOTO 10312
10315         CALL PRINT(-11,AAABY0)
            GOTO 10312
10316         CALL PRINT(-11,AAABZ0)
            GOTO 10312
10317         CALL PRINT(-11,AAACA0)
            GOTO 10312
10310       IF((HEAP(BRCV+3+17).NE.0))GOTO 10311
            IF((HEAP(BRCV+3+18).NE.272))GOTO 10313
            IF((HEAP(BRCV+1+3+21).NE.HEAP(BRCV+9)))GOTO 10314
            IF((HEAP(BRCV+2+3+21).NE.HOMEI0))GOTO 10315
            IF((HEAP(BRCV+3+3+21).NE.1))GOTO 10316
            IF((HEAP(BRCV+6+3+21).NE.-1))GOTO 10317
10312     CONTINUE
10309     GOTO 10319
10289     FLAG=.TRUE.
10318   GOTO 10319
10288   FLAG=.FALSE.
10319 IF(FLAG)GOTO 10320
        CALL TERMJ0(BRCV)
        HEAP(VALID0+9)=HEAP(BRCV+9)
        VAL=VALID0
10321     VAL=HEAP(VAL+2)
        IF((HEAP(VAL+9).NE.HEAP(BRCV+9)))GOTO 10321
        HEAP(VALID0+9)=0
        IF((VAL.EQ.VALID0))GOTO 10322
        IF((.NOT.VALID(HEAP(VAL+3+13))))GOTO 10322
          CALL TERMJ0(VAL)
10322 CONTINUE
10320 RETURN
      END
      SUBROUTINE REMOVE
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      LOGICAL VALID
      INTEGER NODE,BACK
      NODE=HEAP(COMPL0+2)
      GOTO 10325
10323 NODE=HEAP(NODE+2)
10325 IF((NODE.EQ.COMPL0))GOTO 10324
        IF(VALID(HEAP(NODE+3+13)))GOTO 10323
          BACK=HEAP(NODE+1)
          CALL DELETE(NODE)
          HEAP(NODE)=0
          CALL DISPO0(NODE)
          NODE=BACK
10326 GOTO 10323
10324 RETURN
      END
      SUBROUTINE REPORT(RCV)
      INTEGER RCV
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      LOGICAL VALID
      INTEGER I
      INTEGER XMT,REQ
      IF((HEAP(RCV+3+21).NE.0))GOTO 10327
      IF((HEAP(RCV+1+3+21).EQ.HOMEI0))GOTO 10327
        IF((HEAP(RCV+8).NE.0))GOTO 10332
          HEAP(TRANS0)=3
          XMT=TRANS0
10329       XMT=HEAP(XMT+2)
          IF((HEAP(XMT).NE.3))GOTO 10329
          HEAP(TRANS0)=1
          IF((XMT.EQ.TRANS0))GOTO 10330
          IF((.NOT.VALID(HEAP(XMT+3+13))))GOTO 10330
          IF((HEAP(XMT+3+15).EQ.1))GOTO 10330
            HEAP(XMT+3)=(TIMEI0(4)*20+TIMEI0(5)/3)
            HEAP(XMT+3+21)=1
            HEAP(XMT+1+3+21)=HOMEI0
            HEAP(XMT+2+3+21)=HEAP(RCV+1+3+21)
            HEAP(XMT+3+3+21)=0
            HEAP(XMT+4+3+21)=HEAP(RCV+4+3+21)
            HEAP(XMT+5+3+21)=HEAP(RCV+5+3+21)
            HEAP(XMT+6+3+21)=HEAP(RCV+6+3+21)
            HEAP(XMT+7+3+21)=HEAP(RCV+7+3+21)
            HEAP(XMT+8+3+21)=HEAP(RCV+8+3+21)
            CALL X$TRAN(HEAP(XMT+3+12),0,HEAP(XMT+3+21),272,HEAP(XMT+3+1
     *5))
            HEAP(RCV+4)=0
            HEAP(RCV+8)=1
            GOTO 10331
10330       HEAP(RCV+4)=1
10331   CONTINUE
10328   GOTO 10332
10327   IF((HEAP(RCV+3+21).NE.0))GOTO 10335
        IF((HEAP(RCV+1+3+21).NE.HOMEI0))GOTO 10335
        GOTO 10334
10335   IF((HEAP(RCV+3+21).NE.1))GOTO 10333
        IF((HEAP(RCV+2+3+21).NE.HOMEI0))GOTO 10333
        GOTO 10334
10334     REQ=HEAP(REQUE0+2)
          GOTO 10339
10337     REQ=HEAP(REQ+2)
10339     IF((REQ.EQ.REQUE0))GOTO 10338
            IF((HEAP(REQ+3+10).NE.HEAP(RCV+4+3+21)))GOTO 10337
            IF((HEAP(REQ+3+11).NE.HEAP(RCV+5+3+21)))GOTO 10337
              IF((HEAP(RCV+8).NE.0))GOTO 10341
              IF((.NOT.VALID(HEAP(REQ+3+13))))GOTO 10341
                DO 10342 I=1,3
                  HEAP(REQ+3+20)=HEAP(REQ+3+20)+(1)
                  HEAP(REQ+HEAP(REQ+3+20)+3+21)=NODEN0(I,INDEX0(HEAP(RCV
     *+1+3+21)))
10342           CONTINUE
10343           HEAP(REQ+3+20)=HEAP(REQ+3+20)+(1)
                HEAP(REQ+HEAP(REQ+3+20)+3+21)=HEAP(RCV+7+3+21)
                HEAP(REQ+3+20)=HEAP(REQ+3+20)+(1)
                HEAP(REQ+HEAP(REQ+3+20)+3+21)=HEAP(RCV+8+3+21)
                IF((HEAP(RCV+7+3+21).NE.3))GOTO 10344
                  HEAP(REQ+3+19)=HEAP(REQ+3+19)-(1)
10344           IF((HEAP(REQ+3+20).LE.(3+2)*HEAP(REQ+3+19)))GOTO 10345
                  IF((HEAP(REQ+3+15).EQ.1))GOTO 10346
                    HEAP(REQ+3)=(TIMEI0(4)*20+TIMEI0(5)/3)
                    CALL X$TRAN(HEAP(REQ+3+12),0,HEAP(REQ+3+21),2*(HEAP(
     *REQ+3+20)+1),HEAP(REQ+3+15))
                    HEAP(RCV+4)=0
                    HEAP(RCV+8)=1
                    GOTO 10347
10346               HEAP(RCV+4)=1
10347           CONTINUE
10345         CONTINUE
10341         IF((HEAP(RCV+8).NE.1))GOTO 10338
                CALL SIGNAL(RCV)
10348         GOTO 10338
10338   CONTINUE
10333 CONTINUE
10332 RETURN
      END
      SUBROUTINE RESPP0(NODE)
      INTEGER NODE
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      LOGICAL VALID
      INTEGER RSP
      HEAP(RESPO0+9)=HEAP(NODE+9)
      RSP=RESPO0
10349   RSP=HEAP(RSP+2)
      IF((HEAP(RSP+9).NE.HEAP(NODE+9)))GOTO 10349
      HEAP(RESPO0+9)=0
      IF((RSP.EQ.RESPO0))GOTO 10351
      IF((.NOT.VALID(HEAP(RSP+3+13))))GOTO 10351
      GOTO 10350
10351   CALL X$ACPT(HEAP(NODE+3+12),HEAP(NODE+3+13))
        HEAP(NODE)=3
        CALL INSERT(RESPO0,NODE)
        CALL X$RCV(HEAP(NODE+3+12),HEAP(NODE+3+21),272,HEAP(NODE+3+16))
        GOTO 10352
10350   CALL TERMJ0(NODE)
10352 RETURN
      END
      SUBROUTINE SEARCH
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      LOGICAL VALID
      INTEGER REQ,XMT
      INTEGER AAACB0(34)
      DATA AAACB0/213,243,229,242,160,242,229,241,245,229,243,244,160,23
     *7,225,228,229,160,230,239,242,160,170,172,163,232,160,168,170,233,
     *169,170,238,0/
      REQ=HEAP(REQUE0+2)
      GOTO 10355
10353 REQ=HEAP(REQ+2)
10355 IF((REQ.EQ.REQUE0))GOTO 10354
        IF((HEAP(REQ+4).NE.0))GOTO 10353
        IF((.NOT.VALID(HEAP(REQ+3+13))))GOTO 10353
          IF((.NOT.VALID(HEAP(REQ+3+16))))GOTO 10357
            IF((HEAP(REQ+3+16).NE.0))GOTO 10364
              HEAP(REQ+3)=(TIMEI0(4)*20+TIMEI0(5)/3)
              HEAP(REQ+4)=1
              HEAP(REQ+8)=1
              HEAP(TRANS0)=3
              XMT=TRANS0
10359           XMT=HEAP(XMT+2)
              IF((HEAP(XMT).NE.3))GOTO 10359
              HEAP(TRANS0)=1
              IF((XMT.EQ.TRANS0))GOTO 10360
              IF((.NOT.VALID(HEAP(XMT+3+13))))GOTO 10360
              IF((HEAP(XMT+3+15).EQ.1))GOTO 10360
                CALL TRANT0(REQ,XMT)
                IF((HEAP(REQ+1+3+21).NE.1))GOTO 10361
                  CALL X$TRAN(HEAP(XMT+3+12),0,HEAP(XMT+3+21),272,HEAP(X
     *MT+3+15))
                  CALL X$TRAN(HEAP(REQ+3+12),0,HEAP(REQ+3+21),4,HEAP(REQ
     *+3+15))
                  CALL PRINT(-11,AAACB0,2*3,HEAP(REQ+1+9),HEAP(REQ+3+10)
     *)
                  GOTO 10363
10361             CALL X$TRAN(HEAP(REQ+3+12),0,HEAP(REQ+3+21),4,HEAP(REQ
     *+3+15))
10362           GOTO 10363
10360           HEAP(REQ+4)=0
10363       CONTINUE
10358       GOTO 10364
10357       CALL TERMJ0(REQ)
10364   CONTINUE
10356 GOTO 10353
10354 RETURN
      END
      SUBROUTINE SIGNAL(RCV)
      INTEGER RCV
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      LOGICAL VALID
      INTEGER XMT
      INTEGER AAACC0(31)
      DATA AAACC0/211,200,213,212,196,207,215,206,160,242,229,241,245,22
     *9,243,244,160,244,242,225,238,243,237,233,244,244,229,228,170,238,
     *0/
      IF((HEAP(RCV+6+3+21).NE.3))GOTO 10365
      IF((HEAP(RCV+7+3+21).NE.6))GOTO 10365
        HEAP(TRANS0)=3
        XMT=TRANS0
10366     XMT=HEAP(XMT+2)
        IF((HEAP(XMT).NE.3))GOTO 10366
        HEAP(TRANS0)=1
        IF((XMT.EQ.TRANS0))GOTO 10367
        IF((.NOT.VALID(HEAP(XMT+3+13))))GOTO 10367
        IF((HEAP(XMT+3+15).EQ.1))GOTO 10367
          HEAP(XMT+3)=(TIMEI0(4)*20+TIMEI0(5)/3)
          HEAP(XMT+3+21)=0
          HEAP(XMT+1+3+21)=HOMEI0
          HEAP(XMT+2+3+21)=-1
          HEAP(XMT+3+3+21)=0
          HEAP(XMT+4+3+21)=HOMEP0
          HEAP(XMT+5+3+21)=0
          HEAP(XMT+6+3+21)=-4
          HEAP(XMT+7+3+21)=1
          HEAP(XMT+8+3+21)=0
          CALL X$TRAN(HEAP(XMT+3+12),0,HEAP(XMT+3+21),272,HEAP(XMT+3+15)
     *)
          CALL PRINT(-11,AAACC0)
          HEAP(RCV+4)=0
          GOTO 10368
10367     HEAP(RCV+4)=1
10368 CONTINUE
10365 RETURN
      END
      SUBROUTINE TERMJ0(NODE)
      INTEGER NODE
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      INTEGER STATUS
      IF((HEAP(NODE+3+13).EQ.4))GOTO 10369
        CALL X$CLR(HEAP(NODE+3+12),0,STATUS)
10370   IF((HEAP(NODE+3+13).EQ.4))GOTO 10371
          CALL X$WAIT(1)
        GOTO 10370
10371 CONTINUE
10369 HEAP(NODE)=0
      RETURN
      END
      SUBROUTINE TRANT0(REQ,XMT)
      INTEGER REQ,XMT
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      LOGICAL WIZARD
      INTEGER STATUS,I,J
      INTEGER AAACD0
      INTEGER AAACE0
      IF((HEAP(REQ+3+18).LT.4))GOTO 10372
        IF((HEAP(REQ+3+21).LE.0))GOTO 10373
        IF((HEAP(REQ+3+21).GE.5))GOTO 10373
          STATUS=1
          IF((HEAP(REQ+3+21).EQ.3))GOTO 10375
          IF((HEAP(REQ+3+21).EQ.4))GOTO 10375
          GOTO 10374
10375       IF(WIZARD(HEAP(REQ+1+9)))GOTO 10376
              STATUS=2
10376     CONTINUE
10374     IF((STATUS.NE.1))GOTO 10408
            HEAP(XMT+2+3+21)=0
            AAACD0=HEAP(REQ+3+21)
            GOTO 10378
10379         IF((HEAP(REQ+1+3+21).EQ.0))GOTO 10380
                DO 10381 I=1,RINGS0
                  DO 10383 J=1,3
                    IF((NODEN0(J,INDEX0(I)).EQ.HEAP(REQ+J+3+21)))GOTO   
     *   10385
                      GOTO 10381
10385               CONTINUE
10383             CONTINUE
10384             HEAP(XMT+2+3+21)=I
                  GOTO 10387
10381           CONTINUE
10382           GOTO 10387
10380           HEAP(XMT+2+3+21)=-1
10386       GOTO 10387
10388         HEAP(XMT+2+3+21)=-1
            GOTO 10387
10378       GOTO(10388,10379,10379,10388),AAACD0
10387       IF((HEAP(XMT+2+3+21).EQ.0))GOTO 10389
              IF((HEAP(XMT+2+3+21).NE.-1))GOTO 10390
                HEAP(REQ+3+19)=ACTIV0
                GOTO 10391
10390           HEAP(REQ+3+19)=1
10391         HEAP(XMT+3+21)=0
              HEAP(XMT+1+3+21)=HEAP(REQ+9)
              HEAP(XMT+3+3+21)=0
              HEAP(XMT+4+3+21)=HEAP(REQ+3+10)
              HEAP(XMT+5+3+21)=HEAP(REQ+3+11)
              HEAP(XMT+6+3+21)=HEAP(REQ+3+21)
              HEAP(XMT+7+3+21)=STATUS
              HEAP(XMT+8+3+21)=0
              AAACE0=HEAP(XMT+6+3+21)
              GOTO 10392
10393           DO 10394 I=1,3
                  HEAP(XMT+I+8+3+21)=HEAP(REQ+I+3+21)
10394           CONTINUE
10395           HEAP(REQ+(HEAP(REQ+3+18)+1)/2+3+21)=0
                CALL STRIM(HEAP(REQ+1+3+3+21))
                CALL CTOC(HEAP(REQ+1+3+3+21),HEAP(XMT+1+3+8+3+21),102)
              GOTO 10406
10397           DO 10398 I=1,3
                  HEAP(XMT+I+8+3+21)=HEAP(REQ+I+9)
10398           CONTINUE
10399           HEAP(REQ+(HEAP(REQ+3+18)+1)/2+3+21)=0
                CALL STRIM(HEAP(REQ+1+3+3+21))
                CALL CTOC(HEAP(REQ+1+3+3+21),HEAP(XMT+1+3+8+3+21),102)
              GOTO 10406
10401           IF((.NOT.PRIVI0))GOTO 10402
                  IF((HEAP(REQ+3+18).NE.12))GOTO 10403
                    HEAP(XMT+6+3+21)=-3
                    HEAP(XMT+1+8+3+21)=HEAP(REQ+1+3+21)
                    HEAP(XMT+2+8+3+21)=HEAP(REQ+2+3+21)
                    HEAP(XMT+3+8+3+21)=HEAP(REQ+3+3+21)
                    HEAP(XMT+4+8+3+21)=HEAP(REQ+4+3+21)
                    HEAP(XMT+5+8+3+21)=HEAP(REQ+5+3+21)
                    GOTO 10406
10403               STATUS=5
10404             GOTO 10406
10402             STATUS=4
10405         GOTO 10406
10392         GOTO(10393,10397,10406,10401),AAACE0
10396         GOTO 10406
10389         STATUS=3
10406     CONTINUE
10377     GOTO 10408
10373     STATUS=4
10407   GOTO 10408
10372   STATUS=5
10408 HEAP(REQ+1+3+21)=STATUS
      RETURN
      END
      SUBROUTINE UPDATE
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      LOGICAL VALID
      INTEGER * 4 UNIFO0
      LOGICAL FLAG
      INTEGER RCV,XMT,VAL,RSP
      INTEGER AAACF0
      INTEGER AAACG0
      INTEGER AAACH0(33)
      INTEGER AAACI0(25)
      INTEGER AAACJ0(31)
      INTEGER AAACK0(32)
      INTEGER AAACL0(37)
      INTEGER AAACM0(38)
      INTEGER AAACN0(38)
      DATA AAACH0/214,225,236,233,228,225,244,229,228,160,244,242,225,23
     *8,243,237,233,243,243,233,239,238,160,244,239,160,170,172,163,232,
     *170,238,0/
      DATA AAACI0/210,229,227,229,233,246,229,160,236,229,246,229,236,16
     *0,233,243,160,238,239,244,160,176,170,238,0/
      DATA AAACJ0/210,229,241,245,229,243,244,160,243,233,250,229,160,23
     *3,243,160,238,239,244,160,194,213,198,198,211,201,218,197,170,238,
     *0/
      DATA AAACK0/210,229,241,245,229,243,244,160,243,239,245,242,227,22
     *9,160,233,243,160,238,239,244,160,227,239,242,242,229,227,244,170,
     *238,0/
      DATA AAACL0/210,229,241,245,229,243,244,160,233,243,160,238,239,24
     *4,160,227,239,242,242,229,227,244,236,249,160,225,228,228,242,229,
     *243,243,229,228,170,238,0/
      DATA AAACM0/210,229,241,245,229,243,244,160,244,242,225,238,243,23
     *7,233,243,243,233,239,238,160,227,239,245,238,244,160,233,243,160,
     *238,239,244,160,176,170,238,0/
      DATA AAACN0/210,229,241,245,229,243,244,160,233,243,160,238,239,24
     *4,160,225,160,246,225,236,233,228,225,244,233,239,238,160,242,229,
     *241,245,229,243,244,170,238,0/
      RCV=HEAP(RECEI0+2)
      GOTO 10411
10409 RCV=HEAP(RCV+2)
10411 IF((RCV.EQ.RECEI0))GOTO 10410
        IF((.NOT.VALID(HEAP(RCV+3+13))))GOTO 10409
          AAACF0=HEAP(RCV)
          GOTO 10413
10414       CALL REFORM(RCV)
          GOTO 10415
10416       CALL EXECU0(RCV)
          GOTO 10415
10413     AAACG0=AAACF0-1
          GOTO(10414,10416),AAACG0
10415   CONTINUE
10412 GOTO 10409
10410 VAL=HEAP(VALID0+2)
      GOTO 10419
10417 VAL=HEAP(VAL+2)
10419 IF((VAL.EQ.VALID0))GOTO 10418
        IF((.NOT.VALID(HEAP(VAL+3+13))))GOTO 10417
        IF((HEAP(VAL+3+13).EQ.1))GOTO 10417
        IF((HEAP(VAL+4).NE.0))GOTO 10417
          HEAP(VAL+3)=(TIMEI0(4)*20+TIMEI0(5)/3)
          HEAP(VAL+4)=1
          HEAP(VAL+8)=1
          IF((HEAP(VAL+3+15).EQ.1))GOTO 10421
            HEAP(VAL+3+21)=0
            HEAP(VAL+1+3+21)=HOMEI0
            HEAP(VAL+2+3+21)=HEAP(VAL+9)
            HEAP(VAL+3+3+21)=0
            HEAP(VAL+4+3+21)=HOMEP0
            HEAP(VAL+5+3+21)=0
            HEAP(VAL+6+3+21)=-1
            HEAP(VAL+7+3+21)=1
            HEAP(VAL+8+3+21)=INTS(UNIFO0(INTL(-32768),INTL(32767)))
            CALL X$TRAN(HEAP(VAL+3+12),0,HEAP(VAL+3+21),272,HEAP(VAL+3+1
     *5))
            GOTO 10422
10421       HEAP(VAL+4)=0
10422   CONTINUE
10420 GOTO 10417
10418 RSP=HEAP(RESPO0+2)
      GOTO 10425
10423 RSP=HEAP(RSP+2)
10425 IF((RSP.EQ.RESPO0))GOTO 10424
        IF((.NOT.VALID(HEAP(RSP+3+13))))GOTO 10423
          IF((.NOT.VALID(HEAP(RSP+3+16))))GOTO 10427
            IF((HEAP(RSP+3+16).NE.0))GOTO 10428
            IF((HEAP(RSP+4).NE.0))GOTO 10428
              HEAP(RSP+3)=(TIMEI0(4)*20+TIMEI0(5)/3)
              HEAP(RSP+4)=1
              HEAP(RSP+8)=1
              FLAG=HEAP(RSP+3+17).EQ.0.AND.HEAP(RSP+3+18).EQ.272
              IF((.NOT.FLAG))GOTO 10429
                FLAG=HEAP(RSP+1+3+21).EQ.HEAP(RSP+9).AND.HEAP(RSP+2+3+21
     *).EQ.HOMEI0.AND.HEAP(RSP+3+3+21).EQ.0.AND.HEAP(RSP+6+3+21).EQ.-1
10429         IF((.NOT.FLAG))GOTO 10442
                HEAP(TRANS0)=2
                XMT=TRANS0
10431             XMT=HEAP(XMT+2)
                IF((HEAP(XMT).NE.2))GOTO 10431
                HEAP(TRANS0)=1
                IF((XMT.EQ.TRANS0))GOTO 10432
                IF((.NOT.VALID(HEAP(XMT+3+13))))GOTO 10432
                  FLAG=HEAP(RSP+9).EQ.HEAP(XMT+9)
                  GOTO 10433
10432             FLAG=.FALSE.
10433           IF(FLAG)GOTO 10434
                  HEAP(TRANS0)=3
                  XMT=TRANS0
10435               XMT=HEAP(XMT+2)
                  IF((HEAP(XMT).NE.3))GOTO 10435
                  HEAP(TRANS0)=1
                  IF((XMT.EQ.TRANS0))GOTO 10436
                  IF((.NOT.VALID(HEAP(XMT+3+13))))GOTO 10436
                    FLAG=.TRUE.
                    GOTO 10437
10436               FLAG=.FALSE.
10437           CONTINUE
10434           IF((.NOT.FLAG))GOTO 10438
                IF((HEAP(XMT+3+15).EQ.1))GOTO 10438
                  HEAP(XMT+3)=(TIMEI0(4)*20+TIMEI0(5)/3)
                  HEAP(XMT+3+21)=1
                  HEAP(XMT+1+3+21)=HOMEI0
                  HEAP(XMT+2+3+21)=HEAP(RSP+9)
                  HEAP(XMT+3+3+21)=1
                  HEAP(XMT+4+3+21)=HOMEP0
                  HEAP(XMT+5+3+21)=0
                  HEAP(XMT+6+3+21)=-1
                  HEAP(XMT+7+3+21)=1
                  HEAP(XMT+8+3+21)=HEAP(RSP+8+3+21)
                  CALL X$TRAN(HEAP(XMT+3+12),0,HEAP(XMT+3+21),272,HEAP(X
     *MT+3+15))
                  IF((HEAP(XMT).NE.2))GOTO 10451
                    HEAP(XMT)=3
                    CALL PRINT(-11,AAACH0,NAMES0(INDEX0(HEAP(XMT+9))),NO
     *DEN0(1,INDEX0(HEAP(XMT+9))))
10439             GOTO 10451
10438             HEAP(RSP+4)=0
10440           GOTO 10451
10443             CALL PRINT(-11,AAACI0)
                GOTO 10444
10445             CALL PRINT(-11,AAACJ0)
                GOTO 10444
10446             CALL PRINT(-11,AAACK0)
                GOTO 10444
10447             CALL PRINT(-11,AAACL0)
                GOTO 10444
10448             CALL PRINT(-11,AAACM0)
                GOTO 10444
10449             CALL PRINT(-11,AAACN0)
                GOTO 10444
10442           IF((HEAP(RSP+3+17).NE.0))GOTO 10443
                IF((HEAP(RSP+3+18).NE.272))GOTO 10445
                IF((HEAP(RSP+1+3+21).NE.HEAP(RSP+9)))GOTO 10446
                IF((HEAP(RSP+2+3+21).NE.HOMEI0))GOTO 10447
                IF((HEAP(RSP+3+3+21).NE.0))GOTO 10448
                IF((HEAP(RSP+6+3+21).NE.-1))GOTO 10449
10444         CONTINUE
10441         GOTO 10451
10428         FLAG=.TRUE.
10450       GOTO 10451
10427       FLAG=.FALSE.
10451     IF(FLAG)GOTO 10452
            CALL TERMJ0(RSP)
            HEAP(TRANS0)=2
            XMT=TRANS0
10453         XMT=HEAP(XMT+2)
            IF((HEAP(XMT).NE.2))GOTO 10453
            HEAP(TRANS0)=1
            IF((XMT.EQ.TRANS0))GOTO 10454
            IF((HEAP(XMT+9).NE.HEAP(RSP+9)))GOTO 10454
            IF((.NOT.VALID(HEAP(XMT+3+13))))GOTO 10454
              CALL TERMJ0(XMT)
10454     CONTINUE
10452   CONTINUE
10426 GOTO 10423
10424 RETURN
      END
      LOGICAL FUNCTION VALID(STATUS)
      INTEGER STATUS(2)
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      INTEGER CODE,WHYC,DIAG
      LOGICAL FLAG
      INTEGER AAACO0
      INTEGER AAACP0(19)
      INTEGER AAACQ0(19)
      INTEGER AAACR0(19)
      INTEGER AAACS0(19)
      INTEGER AAACT0(19)
      INTEGER AAACU0(19)
      INTEGER AAACV0(19)
      INTEGER AAACW0(19)
      INTEGER AAACX0(19)
      INTEGER AAACY0
      DATA AAACP0/211,244,225,244,245,243,160,233,243,160,216,211,164,20
     *6,197,212,170,238,0/
      DATA AAACQ0/211,244,225,244,245,243,160,233,243,160,216,211,164,19
     *4,214,195,170,238,0/
      DATA AAACR0/211,244,225,244,245,243,160,233,243,160,216,211,164,19
     *4,208,205,170,238,0/
      DATA AAACS0/211,244,225,244,245,243,160,233,243,160,216,211,164,21
     *0,211,212,170,238,0/
      DATA AAACT0/211,244,225,244,245,243,160,233,243,160,216,211,164,21
     *3,206,203,170,238,0/
      DATA AAACU0/211,244,225,244,245,243,160,233,243,160,216,211,164,20
     *5,197,205,170,238,0/
      DATA AAACV0/211,244,225,244,245,243,160,233,243,160,216,211,164,20
     *1,204,204,170,238,0/
      DATA AAACW0/211,244,225,244,245,243,160,233,243,160,216,211,164,20
     *5,193,216,170,238,0/
      DATA AAACX0/211,244,225,244,245,243,160,233,243,160,216,211,164,20
     *9,213,197,170,238,0/
      CODE=STATUS(1)
      WHYC=AND(STATUS(2),32512)
      DIAG=AND(STATUS(2),255)
      IF((CODE.EQ.0))GOTO 10456
      IF((CODE.EQ.1))GOTO 10456
      IF((CODE.EQ.5))GOTO 10456
      IF((CODE.EQ.6))GOTO 10456
      IF((CODE.EQ.9))GOTO 10456
      IF((CODE.EQ.13))GOTO 10456
      GOTO 10455
10456   FLAG=.TRUE.
        GOTO 10457
10455   FLAG=.FALSE.
10457 AAACO0=CODE
      GOTO 10458
10459   CALL PRINT(-11,AAACP0)
      GOTO 10460
10461   CALL PRINT(-11,AAACQ0)
      GOTO 10460
10462   CALL PRINT(-11,AAACR0)
      GOTO 10460
10463   CALL PRINT(-11,AAACS0)
      GOTO 10460
10464   CALL PRINT(-11,AAACT0)
      GOTO 10460
10465   CALL PRINT(-11,AAACU0)
      GOTO 10460
10466   CALL PRINT(-11,AAACV0)
      GOTO 10460
10467   CALL PRINT(-11,AAACW0)
      GOTO 10460
10468   CALL PRINT(-11,AAACX0)
      GOTO 10460
10458 AAACY0=AAACO0+2
      GOTO(10459,10469,10469,10461,10462,10469,10463,10469,10464,10465, 
     *    10469,10466,10469,10467,10468),AAACY0
10469 CONTINUE
10460 VALID=FLAG
      RETURN
      END
      SUBROUTINE VERIFY(NODE)
      INTEGER NODE
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      LOGICAL VALID
      INTEGER RCV,VAL
      HEAP(RECEI0+9)=HEAP(NODE+9)
      RCV=RECEI0
10470   RCV=HEAP(RCV+2)
      IF((HEAP(RCV+9).NE.HEAP(NODE+9)))GOTO 10470
      HEAP(RECEI0+9)=0
      IF((RCV.EQ.RECEI0))GOTO 10472
      IF((.NOT.VALID(HEAP(RCV+3+13))))GOTO 10472
      GOTO 10471
10472   CALL INSERT(RECEI0,NODE)
        CALL X$ACPT(HEAP(NODE+3+12),HEAP(NODE+3+13))
        CALL X$RCV(HEAP(NODE+3+12),HEAP(NODE+3+21),272,HEAP(NODE+3+16))
        HEAP(VALID0+9)=HEAP(NODE+9)
        VAL=VALID0
10473     VAL=HEAP(VAL+2)
        IF((HEAP(VAL+9).NE.HEAP(NODE+9)))GOTO 10473
        HEAP(VALID0+9)=0
        IF((VAL.EQ.VALID0))GOTO 10474
        IF((.NOT.VALID(HEAP(VAL+3+13))))GOTO 10474
          CALL TERMJ0(VAL)
10474   CALL ALLOC0(VAL)
        HEAP(VAL)=3
        HEAP(VAL+9)=HEAP(NODE+9)
        CALL INSERT(VALID0,VAL)
        CALL X$CONN(HEAP(VAL+3+12),98,NODEN0(1,INDEX0(HEAP(VAL+9))),NAME
     *S0(INDEX0(HEAP(VAL+9))),HEAP(VAL+3+13))
        GOTO 10475
10471   CALL TERMJ0(NODE)
        CALL DISPO0(NODE)
10475 RETURN
      END
      LOGICAL FUNCTION WIZARD(USER)
      INTEGER USER(1)
      INTEGER RINGS0
      INTEGER ACTIV0
      INTEGER HOMEI0
      INTEGER INDEX0(16)
      INTEGER RINGA0(128)
      INTEGER ADDRE0(16)
      INTEGER ADDRF0(16)
      INTEGER NODEN0(3,16)
      INTEGER NAMES0(16)
      INTEGER HOMEP0
      INTEGER SEQUE0
      INTEGER TIMEI0(15)
      LOGICAL PRIVI0
      LOGICAL INITI0
      LOGICAL SYNCH0
      LOGICAL TERMI0
      INTEGER TRANS0
      INTEGER RECEI0
      INTEGER VALID0
      INTEGER RESPO0
      INTEGER REQUE0
      INTEGER COMPL0
      COMMON /RING/RINGS0,ACTIV0,HOMEI0,INDEX0,RINGA0,ADDRE0,ADDRF0,NODE
     *N0,NAMES0,HOMEP0,SEQUE0,TIMEI0,PRIVI0,INITI0,SYNCH0,TERMI0,TRANS0,
     *RECEI0,VALID0,RESPO0,REQUE0,COMPL0
      INTEGER HEAP(10000)
      COMMON /DS$MEM/HEAP
      INTEGER PTOC,EQUAL
      INTEGER LINE(102)
      INTEGER I
      LOGICAL MATCH
      INTEGER GURUI0(7)
      INTEGER GURUT0(32)
      DATA GURUT0/211,217,211,212,197,205,0,212,197,210,210,197,204,0,20
     *0,213,206,212,0,202,197,198,198,0,210,207,217,0,215,193,206,0/
      DATA GURUI0/6,1,8,15,20,25,29/
      CALL PTOC(USER,160,LINE,2*3+1)
      I=1
10476   I=I+(1)
        MATCH=EQUAL(LINE,GURUT0(GURUI0(I))).EQ.1
      IF((I.GT.GURUI0(1)))GOTO 10477
      IF(MATCH)GOTO 10477
      GOTO 10476
10477 CONTINUE
      WIZARD=MATCH
      RETURN
      END
C ---- Long Name Map ----
C netcode                        netco0
C Sequence                       seque0
C Complete                       compl0
C Timeinfo                       timei0
C Namesize                       names0
C netacceptconnect               netac0
C netdisconnect                  netdi0
C examine                        exami0
C Priviledged                    privi0
C cleanup                        clean0
C Request                        reque0
C Synchronize                    synch0
C connect                        conne0
C Receive                        recei0
C allocate                       alloc0
C Ringaddress                    ringa0
C Initialized                    initi0
C terminate                      termj0
C netsend                        netse0
C Homepid                        homep0
C gurutable                      gurut0
C netassign                      netas0
C Homeindex                      homei0
C execute                        execu0
C circuit                        circu0
C Ringsize                       rings0
C generate                       gener0
C translate                      trant0
C netclear                       netcl0
C dispose                        dispo0
C phantom                        phant0
C Response                       respo0
C netreceive                     netre0
C Indexring                      index0
C Addresssize                    addrf0
C netconnectinfo                 netcq0
C Nodename                       noden0
C Transmit                       trans0
C respond                        respp0
C perform                        perfo0
C netwait                        netwa0
C netunassign                    netun0
C Validate                       valid0
C process                        proce0
C uniform                        unifo0
C Addressindex                   addre0
C netconnect                     netcp0
C initialize                     initj0
C guruindex                      gurui0
C identify                       ident0
C Activering                     activ0
C Terminated                     termi0
