      SUBROUTINE GETCMD(LIN,COL1,CURPOS,TERMC0)
      INTEGER LIN(512),TERMC0
      INTEGER COL1,CURPOS
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      INTEGER CURSOR,NLPOS,PREVC0,PREVS0,STATUS,SCANP0,TABPOS,FIRST
      INTEGER LENGTH
      INTEGER C
      INTEGER SMARG0(7)
      INTEGER AAAAC0
      INTEGER AAAAE0
      INTEGER AAAAG0
      INTEGER AAAAI0
      INTEGER AAAAK0
      INTEGER AAAAL0
      INTEGER AAAAM0
      INTEGER AAAAN0
      INTEGER AAAAO0(7)
      INTEGER AAAAP0(5)
      INTEGER AAAAQ0
      INTEGER AAAAR0(5)
      INTEGER AAAAA0
      INTEGER AAAAB0
      INTEGER AAAAS0
      INTEGER AAAAT0
      INTEGER AAAAU0(7)
      INTEGER AAAAD0
      INTEGER AAAAV0
      INTEGER AAAAF0
      INTEGER AAAAH0
      INTEGER AAAAW0,AAAAX0
      INTEGER AAAAJ0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      DATA SMARG0/205,193,210,199,201,206,0/
      DATA AAAAO0/201,206,211,197,210,212,0/
      DATA AAAAP0/195,193,211,197,0/
      DATA AAAAR0/215,200,193,191,0/
      DATA AAAAU0/206,207,195,200,193,210,0/
      NLPOS=LENGTH(LIN)
      IF((NLPOS.LE.0))GOTO 10006
      IF((LIN(NLPOS).NE.138))GOTO 10006
      GOTO 10007
10006   NLPOS=NLPOS+(1)
10005 GOTO 10007
10008   CURSOR=1
      GOTO 10009
10010   CURSOR=NLPOS
      GOTO 10009
10007 IF((CURPOS.LT.1))GOTO 10008
      IF((CURPOS.GE.512))GOTO 10010
        AAAAJ0=CURPOS
        AAAAK0=1
        GOTO 10004
10011 CONTINUE
10009 PREVC0=CURSOR
      CALL WATCH
      AAAAL0=NCHOI0
      GOTO 10012
10013   CALL LITNN0('line .',CURLN0,9)
      GOTO 10014
10015   CALL LITNN0('$=.',LASTL0,9)
      GOTO 10014
10016   CALL LITNN0('#=.',TOPLN0,9)
      GOTO 10014
10012 AAAAM0=AAAAL0-162
      GOTO(10016,10015,10017,10017,10017,10017,10017,10017,10017,10017, 
     *    10017,10013),AAAAM0
10017   CALL MESG(0,9)
10014 IF((CURSOR.GE.WARNC0))GOTO 10018
        CALL MESG(0,8)
10018 TERMC0=0
      STATUS=-2
      PREVS0=-3
      FIRST=COL1
10019 IF((TERMC0.NE.0))GOTO 10020
        LIN(NLPOS)=0
        IF((STATUS.NE.-3))GOTO 10021
          CALL T1OU(135)
          GOTO 10022
10021     IF((PREVS0.NE.-3))GOTO 10023
            CALL MESG(0,2)
10023   CONTINUE
10022   PREVS0=STATUS
        STATUS=-2
        GOTO 10024
10025     FIRST=CURSOR
        GOTO 10028
10027     FIRST=CURSOR-NCOLS0+8
        GOTO 10028
10024   IF((FIRST.GT.CURSOR))GOTO 10025
        IF((FIRST.LT.CURSOR-NCOLS0+8))GOTO 10027
10026   GOTO 10028
10029     CALL LOAD(252,CMDRO0,7)
        GOTO 10030
10031     CALL LOAD(188,CMDRO0,7)
        GOTO 10030
10032     CALL LOAD(190,CMDRO0,7)
        GOTO 10030
10028   IF((FIRST.EQ.COL1))GOTO 10029
        IF((FIRST.GT.COL1))GOTO 10031
        IF((FIRST.LT.COL1))GOTO 10032
10030   CALL LOADS0(LIN(FIRST),CMDRO0,8,NCOLS0)
        IF((CURSOR.NE.WARNC0))GOTO 10033
        IF((PREVC0.GE.WARNC0))GOTO 10033
          CALL T1OU(135)
10033   IF((CURSOR.LT.WARNC0))GOTO 10034
          CALL LITNN0('col .',CURSOR,8)
          GOTO 10035
10034     IF((PREVC0.LT.WARNC0))GOTO 10036
            CALL MESG(0,8)
10036   CONTINUE
10035   CALL POSIT0(CMDRO0,CURSOR+8-FIRST)
        PREVC0=CURSOR
        IF((PEEKC0.NE.0))GOTO 10037
          CALL C1IN(C)
          GOTO 10038
10037     C=PEEKC0
          PEEKC0=0
10038   AAAAN0=C
        GOTO 10039
10040     IF((C.NE.155))GOTO 10041
            CALL C1IN(C)
            GOTO 10042
10041       IF((INVER0.EQ.0))GOTO 10043
            IF((193.GT.C))GOTO 10045
            IF((C.GT.218))GOTO 10045
            GOTO 10044
10045       IF((225.GT.C))GOTO 10043
            IF((C.GT.250))GOTO 10043
            GOTO 10044
10044         C=XOR(C,32)
10043     CONTINUE
10042     IF((INSER0.EQ.0))GOTO 10047
            AAAAH0=1
            AAAAI0=1
            GOTO 10003
10047       IF((CURSOR.LT.512-1))GOTO 10050
              STATUS=-3
              CALL MESG(SMARG0,2)
10050     CONTINUE
10049     IF((STATUS.EQ.-3))GOTO 10019
            LIN(CURSOR)=C
            CURSOR=CURSOR+(1)
            IF((NLPOS.GE.CURSOR))GOTO 10052
              NLPOS=CURSOR
10052       IF((C.NE.138))GOTO 10053
              TERMC0=141
10053     CONTINUE
10051   GOTO 10019
10055     AAAAJ0=CURSOR-1
          AAAAK0=2
          GOTO 10004
10057     AAAAD0=133
          AAAAE0=1
          GOTO 10001
10058     IF((STATUS.EQ.-3))GOTO 10019
            CURSOR=TABPOS
10059   GOTO 10019
10060     CURSOR=1
        GOTO 10019
10061     AAAAA0=C
          AAAAB0=1
          AAAAC0=1
          GOTO 10000
10062     IF((STATUS.EQ.-3))GOTO 10019
            CURSOR=SCANP0
10063   GOTO 10019
10064     AAAAJ0=CURSOR-1
          AAAAK0=3
          GOTO 10004
10065     IF((STATUS.EQ.-3))GOTO 10019
            AAAAF0=1
            AAAAG0=1
            GOTO 10002
10067     CONTINUE
10066   GOTO 10019
10068     AAAAD0=133
          AAAAE0=2
          GOTO 10001
10069     IF((STATUS.EQ.-3))GOTO 10019
            CURSOR=TABPOS
            AAAAF0=PREVC0-TABPOS
            AAAAG0=2
            GOTO 10002
10071     CONTINUE
10070   GOTO 10019
10072     CURSOR=1
          AAAAF0=PREVC0-1
          AAAAG0=3
          GOTO 10002
10074     AAAAA0=C
          AAAAB0=0
          AAAAC0=2
          GOTO 10000
10075     IF((STATUS.EQ.-3))GOTO 10019
            CURSOR=SCANP0
            AAAAF0=PREVC0-SCANP0
            AAAAG0=4
            GOTO 10002
10077     CONTINUE
10076   GOTO 10019
10078     AAAAJ0=CURSOR+1
          AAAAK0=4
          GOTO 10004
10080     AAAAD0=137
          AAAAE0=3
          GOTO 10001
10081     IF((STATUS.EQ.-3))GOTO 10019
            AAAAJ0=TABPOS
            AAAAK0=5
            GOTO 10004
10083     CONTINUE
10082   GOTO 10019
10084     CURSOR=NLPOS
          FIRST=COL1
        GOTO 10019
10085     AAAAA0=C
          AAAAB0=1
          AAAAC0=3
          GOTO 10000
10086     IF((STATUS.EQ.-3))GOTO 10019
            CURSOR=SCANP0
10087   GOTO 10019
10088     AAAAF0=1
          AAAAG0=5
          GOTO 10002
10090     AAAAD0=137
          AAAAE0=4
          GOTO 10001
10091     IF((STATUS.EQ.-3))GOTO 10019
            AAAAF0=TABPOS-CURSOR
            AAAAG0=6
            GOTO 10002
10093     CONTINUE
10092   GOTO 10019
10094     AAAAF0=NLPOS-CURSOR
          AAAAG0=7
          GOTO 10002
10096     AAAAA0=C
          AAAAB0=0
          AAAAC0=4
          GOTO 10000
10097     IF((STATUS.EQ.-3))GOTO 10019
            AAAAF0=SCANP0-CURSOR
            AAAAG0=8
            GOTO 10002
10099     CONTINUE
10098   GOTO 10019
10100     CURSOR=NLPOS
          TERMC0=C
        GOTO 10019
10101     NLPOS=CURSOR
          TERMC0=C
        GOTO 10019
10102     TERMC0=C
        GOTO 10019
10103     AAAAH0=1
          AAAAI0=2
          GOTO 10003
10104     IF((STATUS.EQ.-3))GOTO 10019
            LIN(CURSOR)=160
10105   GOTO 10019
10106     AAAAH0=1
          AAAAI0=3
          GOTO 10003
10107     IF((STATUS.EQ.-3))GOTO 10019
            LIN(CURSOR)=138
            TERMC0=132
10108   GOTO 10019
10109     CONTINUE
10110     IF((LIN(CURSOR).NE.160))GOTO 10111
            CURSOR=CURSOR+(1)
          GOTO 10110
10111     AAAAD0=137
          AAAAE0=5
          GOTO 10001
10112     IF((STATUS.EQ.-3))GOTO 10113
            AAAAH0=TABPOS-CURSOR
            AAAAI0=4
            GOTO 10003
10114     CONTINUE
10113     IF((STATUS.EQ.-3))GOTO 10115
            GOTO 10118
10116       CURSOR=CURSOR+(1)
10118       IF((CURSOR.GE.TABPOS))GOTO 10117
              LIN(CURSOR)=160
            GOTO 10116
10117     CONTINUE
10115     CURSOR=PREVC0
        GOTO 10019
10119     INSER0=1+0-INSER0
          IF((INSER0.NE.0))GOTO 10120
            CALL MESG(0,4)
            GOTO 10019
10120       CALL MESG(AAAAO0,4)
10121   GOTO 10019
10122     INVER0=1+0-INVER0
          IF((INVER0.NE.0))GOTO 10123
            CALL MESG(0,3)
            GOTO 10019
10123       CALL MESG(AAAAP0,3)
10124   GOTO 10019
10125     NLPOS=1
          CURSOR=1
        GOTO 10019
10126     CALL RESTO0
        GOTO 10019
10039   AAAAQ0=AAAAN0-128
        GOTO(10119,10096,10103,10102,10057,10102,10078,10055,10080,10101
     *,10102,10061,10127,10074,10084,10127,10126,10088,10085,10094,10064
     *,10100,10060,10109,10072,10122,10040,10068,10127,10090,10106,10040
     *,10040,10040,10040,10040,10040,10040,10040,10040,10040,10040,10040
     *,10040,10040,10040,10040,10040,10040,10040,10040,10040,10040,10040
     *,10040,10040,10040,10040,10040,10040,10040,10040,10040,10040,10040
     *,10040,10040,10040,10040,10040,10040,10040,10040,10040,10040,10040
     *,10040,10040,10040,10040,10040,10040,10040,10040,10040,10040,10040
     *,10040,10040,10040,10040,10040,10040,10040,10040,10040,10040,10040
     *,10040,10040,10040,10040,10040,10040,10040,10040,10040,10040,10040
     *,10040,10040,10040,10040,10040,10040,10040,10040,10040,10040,10040
     *,10040,10040,10040,10040,10040,10040,10125),AAAAQ0
10127     STATUS=-3
          CALL MESG(AAAAR0,2)
10054 GOTO 10019
10020 LIN(NLPOS)=138
      LIN(NLPOS+1)=0
      CALL LOAD(252,CMDRO0,7)
      IF((NLPOS.GT.COL1))GOTO 10128
        CALL LOADS0(0,CMDRO0,8,NCOLS0)
        GOTO 10129
10128   CALL LOADS0(LIN(COL1),CMDRO0,8,NCOLS0)
10129 IF((CURSOR.LT.WARNC0))GOTO 10130
        CALL LITNN0('col .',CURSOR,8)
        GOTO 10131
10130   IF((PREVC0.LT.WARNC0))GOTO 10132
          CALL MESG(0,8)
10132 CONTINUE
10131 CURPOS=CURSOR
      RETURN
10000 CALL C1IN(AAAAS0)
      IF((INVER0.EQ.0))GOTO 10133
      IF((193.GT.AAAAS0))GOTO 10135
      IF((AAAAS0.GT.218))GOTO 10135
      GOTO 10134
10135 IF((225.GT.AAAAS0))GOTO 10133
      IF((AAAAS0.GT.250))GOTO 10133
      GOTO 10134
10134   AAAAS0=XOR(AAAAS0,32)
10133 IF((AAAAS0.NE.AAAAA0))GOTO 10137
        AAAAS0=LASTC0
10137 LASTC0=AAAAS0
      IF((AAAAA0.EQ.140))GOTO 10139
      IF((AAAAA0.EQ.142))GOTO 10139
      GOTO 10138
10139   AAAAT0=-1
        GOTO 10140
10138   AAAAT0=+1
10140 SCANP0=CURSOR
10141   IF((SCANP0.GE.1))GOTO 10142
          IF((AAAAB0.NE.0))GOTO 10143
            GOTO 10144
10143       SCANP0=NLPOS
          GOTO 10145
10142     IF((SCANP0.LE.NLPOS))GOTO 10146
            IF((AAAAB0.NE.0))GOTO 10147
              GOTO 10144
10147         SCANP0=1
            GOTO 10148
10146       SCANP0=SCANP0+(AAAAT0)
10148   CONTINUE
10145   IF((0.GE.SCANP0))GOTO 10149
        IF((SCANP0.GE.NLPOS))GOTO 10149
        IF((LIN(SCANP0).NE.AAAAS0))GOTO 10149
          GOTO 10144
10149 CONTINUE
      IF((SCANP0.NE.CURSOR))GOTO 10141
10144 IF((SCANP0.LE.0))GOTO 10151
      IF((SCANP0.GE.NLPOS))GOTO 10151
      IF((LIN(SCANP0).NE.AAAAS0))GOTO 10151
      GOTO 10152
10151   STATUS=-3
        CALL MESG(AAAAU0,2)
10150 GOTO 10152
10001 IF((AAAAD0.NE.133))GOTO 10153
        AAAAV0=-1
        TABPOS=CURSOR-1
        GOTO 10157
10153   AAAAV0=+1
        TABPOS=CURSOR+1
10154 GOTO 10157
10155 TABPOS=TABPOS+(AAAAV0)
10157 IF((0.GE.TABPOS))GOTO 10156
      IF((TABPOS.GT.512))GOTO 10156
        IF((TABST0(TABPOS).EQ.0))GOTO 10155
          GOTO 10156
10156 IF((TABPOS.LT.1))GOTO 10160
      IF((TABPOS.GE.512))GOTO 10160
      GOTO 10161
10160   STATUS=-3
        CALL MESG(SMARG0,2)
10159 GOTO 10161
10002 IF((CURSOR+AAAAF0.LE.NLPOS))GOTO 10162
        STATUS=-3
        CALL MESG(SMARG0,2)
        GOTO 10165
10162   IF((AAAAF0.LE.0))GOTO 10164
          CALL SCOPY(LIN,CURSOR+AAAAF0,LIN,CURSOR)
          NLPOS=NLPOS-(AAAAF0)
10164 CONTINUE
10163 GOTO 10165
10003 IF((NLPOS+AAAAH0.LT.512))GOTO 10166
        STATUS=-3
        CALL MESG(SMARG0,2)
        GOTO 10171
10166   AAAAW0=NLPOS
        AAAAX0=NLPOS+AAAAH0
        GOTO 10170
10168   AAAAW0=AAAAW0-(1)
        AAAAX0=AAAAX0-(1)
10170   IF((AAAAW0.LT.CURSOR))GOTO 10169
          LIN(AAAAX0)=LIN(AAAAW0)
        GOTO 10168
10169   NLPOS=NLPOS+(AAAAH0)
10167 GOTO 10171
10004 IF((AAAAJ0.LT.1))GOTO 10173
      IF((AAAAJ0.GE.512))GOTO 10173
      GOTO 10172
10173   STATUS=-3
        CALL MESG(SMARG0,2)
        GOTO 10178
10172   CURSOR=AAAAJ0
        GOTO 10177
10175   NLPOS=NLPOS+(1)
10177   IF((NLPOS.GE.CURSOR))GOTO 10176
          LIN(NLPOS)=160
        GOTO 10175
10176 CONTINUE
10174 GOTO 10178
10178 GOTO(10011,10019,10065,10019,10083),AAAAK0
      GOTO 10178
10171 GOTO(10049,10104,10107,10114),AAAAI0
      GOTO 10171
10165 GOTO(10067,10071,10019,10077,10019,10093,10019,10099),AAAAG0
      GOTO 10165
10161 GOTO(10058,10069,10081,10091,10112),AAAAE0
      GOTO 10161
10152 GOTO(10062,10075,10086,10097),AAAAC0
      GOTO 10152
      END
      SUBROUTINE SEND(CHAR)
      INTEGER CHAR
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((CURRO0.NE.NROWS0))GOTO 10179
      IF((CURCO0.NE.NCOLS0))GOTO 10179
        RETURN
10179 CALL T1OU(CHAR)
      IF((CURCO0.NE.NCOLS0))GOTO 10180
        IF((TERMT0.EQ.4))GOTO 10182
        IF((TERMT0.EQ.16))GOTO 10182
        IF((TERMT0.EQ.28))GOTO 10182
        IF((TERMT0.EQ.3))GOTO 10182
        IF((TERMT0.EQ.26))GOTO 10182
        IF((TERMT0.EQ.34))GOTO 10182
          CURCO0=1
          CURRO0=CURRO0+(1)
10181   GOTO 10182
10180   CURCO0=CURCO0+(1)
10182 RETURN
      END
      SUBROUTINE POSIT0(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      INTEGER AAAAY0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((ROW.GT.NROWS0))GOTO 10183
      IF((ROW.LT.1))GOTO 10183
      IF((COL.GT.NCOLS0))GOTO 10183
      IF((COL.LT.1))GOTO 10183
      IF((ROW.NE.CURRO0))GOTO 10184
      IF((COL.NE.CURCO0))GOTO 10184
      GOTO 10183
10184   AAAAY0=TERMT0
        GOTO 10185
10186     CALL ADDSP0(ROW,COL)
        GOTO 10187
10188     CALL REGEN0(ROW,COL)
        GOTO 10187
10189     CALL HPPOS(ROW,COL)
        GOTO 10187
10190     CALL PEPOS(ROW,COL)
        GOTO 10187
10191     CALL TVTPOS(ROW,COL)
        GOTO 10187
10192     CALL GT40P0(ROW,COL)
        GOTO 10187
10193     CALL BEEPOS(ROW,COL)
        GOTO 10187
10194     CALL HAZPOS(ROW,COL)
        GOTO 10187
10195     CALL CGPOS(ROW,COL)
        GOTO 10187
10196     CALL ISCPOS(ROW,COL)
        GOTO 10187
10197     CALL ADMPOS(ROW,COL)
        GOTO 10187
10198     CALL IBMPOS(ROW,COL)
        GOTO 10187
10199     CALL ANPPOS(ROW,COL)
        GOTO 10187
10200     CALL NETPOS(ROW,COL)
        GOTO 10187
10201     CALL H19POS(ROW,COL)
        GOTO 10187
10202     CALL TRSPOS(ROW,COL)
        GOTO 10187
10203     CALL BEE2P0(ROW,COL)
        GOTO 10187
10204     CALL TERAK0(ROW,COL)
        GOTO 10187
10205     CALL INFOP0(ROW,COL)
        GOTO 10187
10206     CALL NBYPOS(ROW,COL)
        GOTO 10187
10207     CALL ANSIP0(ROW,COL)
        GOTO 10187
10208     CALL FORSY0(ROW,COL)
        GOTO 10187
10185   GOTO(10186,10188,10190,10191,10192,10193,10193,10193,10193,10194
     *,10195,10196,10197,10198,10199,10200,10201,10202,10189,10197,10197
     *,10201,10201,10197,10197,10189,10194,10190,10189,10193,10193,10206
     *,10207,10207,10208,10197,10197,10205,10189,10204,10194,10188,10197
     *,10203),AAAAY0
10187 CONTINUE
10183 RETURN
      END
      SUBROUTINE B200C0(COORD)
      INTEGER COORD
      INTEGER ACC,TENS,UNITS
      ACC=COORD-1
      TENS=ACC/10
      UNITS=ACC-10*TENS
      ACC=UNITS+16*TENS
      CALL T1OU(ACC)
      RETURN
      END
      SUBROUTINE BEEPOS(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((ROW.NE.CURRO0+1))GOTO 10209
      IF((COL.NE.1))GOTO 10209
      IF((TERMT0.EQ.8))GOTO 10209
        CALL T1OU(138)
        CURCO0=1
        CURRO0=CURRO0+(1)
        GOTO 10210
10209   IF((ROW.NE.1))GOTO 10211
        IF((COL.NE.1))GOTO 10211
          CALL T1OU(155)
          CALL T1OU(200)
          CURRO0=1
          CURCO0=1
          GOTO 10212
10211     IF((ROW.NE.CURRO0))GOTO 10213
          IF((COL.LE.CURCO0))GOTO 10213
          IF((COL.GT.CURCO0+4))GOTO 10213
10214       IF((CURCO0.EQ.COL))GOTO 10216
              CALL T1OU(SCREE0(CURCO0,CURRO0))
              CURCO0=CURCO0+(1)
            GOTO 10214
10213       IF((ROW.NE.CURRO0))GOTO 10217
            IF((COL.GE.CURCO0))GOTO 10217
            IF((COL.LT.CURCO0-4))GOTO 10217
10218         IF((CURCO0.EQ.COL))GOTO 10220
                CALL T1OU(136)
                CURCO0=CURCO0-(1)
              GOTO 10218
10217         CALL T1OU(155)
              CALL T1OU(198)
              IF((TERMT0.EQ.7))GOTO 10222
              IF((TERMT0.EQ.9))GOTO 10222
              GOTO 10221
10222           CALL B200C0(ROW)
                CALL B200C0(COL)
                GOTO 10223
10221           IF((TERMT0.EQ.6))GOTO 10225
                IF((TERMT0.EQ.30))GOTO 10225
                IF((TERMT0.EQ.31))GOTO 10225
                GOTO 10224
10225             CALL T1OU(ROW+160-1)
                  CALL T1OU(COL+160-1)
                  GOTO 10226
10224             CALL SBEEC0(COL)
                  CALL SBEEC0(ROW)
10226         CONTINUE
10223         CURRO0=ROW
              CURCO0=COL
10220     CONTINUE
10216   CONTINUE
10212 CONTINUE
10210 RETURN
      END
      SUBROUTINE BEE2P0(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      INTEGER I
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((CURRO0.LE.ROW))GOTO 10227
        I=CURRO0
        GOTO 10230
10228   I=I-(1)
10230   IF((I.LE.ROW))GOTO 10231
          CALL T1OU(146)
        GOTO 10228
10227   IF((CURRO0.GE.ROW))GOTO 10232
          I=CURRO0
          GOTO 10235
10233     I=I+(1)
10235     IF((I.GE.ROW))GOTO 10234
            CALL T1OU(138)
          GOTO 10233
10234   CONTINUE
10232 CONTINUE
10231 CURRO0=ROW
      IF((COL.NE.1))GOTO 10236
        CALL T1OU(141)
        GOTO 10237
10236   CALL UHCM(COL)
10237 CURCO0=COL
      RETURN
      END
      SUBROUTINE REGEN0(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((IABS(CURCO0-COL).GT.4))GOTO 10239
      IF((CURRO0.NE.ROW))GOTO 10239
      GOTO 10238
10239   CALL T1OU(155)
        CALL T1OU(217)
        CALL T1OU(160-1+ROW)
        CALL T1OU(160-1+COL)
        CURRO0=ROW
        CURCO0=COL
        GOTO 10240
10238   CONTINUE
10241   IF((ROW.GE.CURRO0))GOTO 10242
          CALL T1OU(154)
          CURRO0=CURRO0-(1)
        GOTO 10241
10242   CONTINUE
10243   IF((ROW.LE.CURRO0))GOTO 10244
          CALL T1OU(138)
          CURRO0=CURRO0+(1)
          CURCO0=1
        GOTO 10243
10244   IF((COL.LE.CURCO0))GOTO 10245
10246     IF((COL.EQ.CURCO0))GOTO 10248
            CALL T1OU(SCREE0(CURCO0,CURRO0))
            CURCO0=CURCO0+(1)
          GOTO 10246
10245     IF(((CURCO0-COL)*2.LE.NCOLS0))GOTO 10249
10250       IF((COL.EQ.CURCO0))GOTO 10254
              CALL T1OU(134)
              IF((CURCO0.NE.NCOLS0))GOTO 10252
                CURCO0=1
                GOTO 10250
10252           CURCO0=CURCO0+(1)
10253       GOTO 10250
10249       CONTINUE
10255       IF((COL.EQ.CURCO0))GOTO 10256
              CALL T1OU(136)
              CURCO0=CURCO0-(1)
            GOTO 10255
10256     CONTINUE
10254   CONTINUE
10248 CONTINUE
10240 RETURN
      END
      SUBROUTINE HPPOS(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      INTEGER UNITS,TENS
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((ROW.NE.CURRO0+1))GOTO 10257
      IF((COL.NE.1))GOTO 10257
        CALL T1OU(138)
        CURCO0=1
        CURRO0=CURRO0+(1)
        GOTO 10258
10257   IF((ROW.NE.1))GOTO 10259
        IF((COL.NE.1))GOTO 10259
          CALL T1OU(155)
          CALL T1OU(200)
          CURRO0=1
          CURCO0=1
          GOTO 10260
10259     IF((ROW.NE.CURRO0))GOTO 10261
          IF((COL.LE.CURCO0))GOTO 10261
          IF((COL.GT.CURCO0+4))GOTO 10261
10262       IF((CURCO0.EQ.COL))GOTO 10264
              CALL T1OU(SCREE0(CURCO0,CURRO0))
              CURCO0=CURCO0+(1)
            GOTO 10262
10261       IF((ROW.NE.CURRO0))GOTO 10265
            IF((COL.GE.CURCO0))GOTO 10265
            IF((COL.LT.CURCO0-4))GOTO 10265
10266         IF((CURCO0.EQ.COL))GOTO 10268
                CALL T1OU(136)
                CURCO0=CURCO0-(1)
              GOTO 10266
10265         IF((2*IABS(CURRO0-ROW)+IABS(CURCO0-COL).GT.7))GOTO 10269
10270           IF((CURRO0.GE.ROW))GOTO 10271
                  CALL T1OU(155)
                  CALL T1OU(194)
                  CURRO0=CURRO0+(1)
                GOTO 10270
10271           CONTINUE
10272           IF((CURRO0.LE.ROW))GOTO 10273
                  CALL T1OU(155)
                  CALL T1OU(193)
                  CURRO0=CURRO0-(1)
                GOTO 10272
10273           CONTINUE
10274           IF((CURCO0.LE.COL))GOTO 10275
                  CALL T1OU(136)
                  CURCO0=CURCO0-(1)
                GOTO 10274
10275           CONTINUE
10276           IF((CURCO0.GE.COL))GOTO 10278
                  CALL T1OU(SCREE0(CURCO0,CURRO0))
                  CURCO0=CURCO0+(1)
                GOTO 10276
10269           CALL T1OU(155)
                CALL T1OU(166)
                CALL T1OU(225)
                UNITS=MOD((ROW-1),10)
                TENS=(ROW-1)/10
                IF((TENS.EQ.0))GOTO 10279
                  CALL T1OU(TENS+176)
10279           CALL T1OU(UNITS+176)
                CALL T1OU(249)
                UNITS=MOD((COL-1),10)
                TENS=(COL-1)/10
                IF((TENS.EQ.0))GOTO 10280
                  CALL T1OU(TENS+176)
10280           CALL T1OU(UNITS+176)
                CALL T1OU(195)
                CURRO0=ROW
                CURCO0=COL
10278       CONTINUE
10268     CONTINUE
10264   CONTINUE
10260 CONTINUE
10258 RETURN
      END
      SUBROUTINE IBMPOS(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((ROW.NE.CURRO0))GOTO 10281
      IF((IABS(COL-CURCO0).GE.4))GOTO 10281
10282   IF((CURCO0.GE.COL))GOTO 10283
          CALL T1OU(SCREE0(CURCO0,CURRO0))
          CURCO0=CURCO0+(1)
        GOTO 10282
10283   CONTINUE
10284   IF((CURCO0.LE.COL))GOTO 10286
          CALL T1OU(136)
          CURCO0=CURCO0-(1)
        GOTO 10284
10281   CALL T1OU(155)
        CALL T1OU(217)
        CALL T1OU(160-1+ROW)
        CALL T1OU(160-1+COL)
        CURRO0=ROW
        CURCO0=COL
10286 RETURN
      END
      SUBROUTINE INFOP0(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((CURRO0.NE.ROW))GOTO 10288
      IF((IABS(COL-CURCO0).GT.5))GOTO 10288
      GOTO 10287
10288   CALL T1OU(155)
        CALL T1OU(230)
        CALL T1OU(160+COL-1)
        CALL T1OU(160+ROW-1)
        GOTO 10289
10287   CALL UHCM(COL)
10289 CURCO0=COL
      CURRO0=ROW
      RETURN
      END
      SUBROUTINE H19POS(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((COL.GT.3))GOTO 10290
      IF((ROW.NE.CURRO0+1))GOTO 10290
        CURRO0=CURRO0+(1)
        CURCO0=1
        CALL T1OU(138)
10290 IF((ROW.NE.CURRO0))GOTO 10291
      IF((IABS(COL-CURCO0).GE.4))GOTO 10291
10292   IF((CURCO0.GE.COL))GOTO 10293
          CALL T1OU(SCREE0(CURCO0,CURRO0))
          CURCO0=CURCO0+(1)
        GOTO 10292
10293   CONTINUE
10294   IF((CURCO0.LE.COL))GOTO 10296
          CALL T1OU(136)
          CURCO0=CURCO0-(1)
        GOTO 10294
10291   CALL T1OU(155)
        CALL T1OU(217)
        CALL T1OU(160-1+ROW)
        CALL T1OU(160-1+COL)
        CURRO0=ROW
        CURCO0=COL
10296 RETURN
      END
      SUBROUTINE PEPOS(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((CURRO0.NE.ROW))GOTO 10297
        GOTO 10298
10297   IF((ROW.NE.CURRO0-1))GOTO 10299
          CALL T1OU(155)
          CALL T1OU(193)
          CURRO0=CURRO0-(1)
          GOTO 10300
10299     IF((ROW.NE.CURRO0+1))GOTO 10301
            CALL T1OU(155)
            CALL T1OU(194)
            CURRO0=CURRO0+(1)
            GOTO 10302
10301       CALL T1OU(155)
            CALL T1OU(216)
            CALL T1OU(ROW+160-1)
            CURRO0=ROW
10302   CONTINUE
10300 CONTINUE
10298 IF((IABS(COL-CURCO0).LE.3))GOTO 10303
        CALL T1OU(155)
        CALL T1OU(217)
        CALL T1OU(COL+160-1)
        CURCO0=COL
        GOTO 10304
10303   CALL UHCM(COL)
10304 RETURN
      END
      SUBROUTINE ADMPOS(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((COL.GT.3))GOTO 10305
      IF((ROW.NE.CURRO0+1))GOTO 10305
        CURRO0=CURRO0+(1)
        CURCO0=1
        CALL T1OU(138)
10305 IF((CURRO0.NE.ROW))GOTO 10307
      IF((IABS(COL-CURCO0).GT.3))GOTO 10307
      GOTO 10306
10307   CALL T1OU(155)
        CALL T1OU(189)
        CALL T1OU(160+ROW-1)
        CALL T1OU(160+COL-1)
        GOTO 10308
10306   CALL UHCM(COL)
10308 CURCO0=COL
      CURRO0=ROW
      RETURN
      END
      SUBROUTINE UHCM(COL)
      INTEGER COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
10309 IF((CURCO0.GE.COL))GOTO 10310
        CALL T1OU(SCREE0(CURCO0,CURRO0))
        CURCO0=CURCO0+(1)
      GOTO 10309
10310 CONTINUE
10311 IF((CURCO0.LE.COL))GOTO 10312
        CALL T1OU(136)
        CURCO0=CURCO0-(1)
      GOTO 10311
10312 RETURN
      END
      SUBROUTINE HAZPOS(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((ROW.NE.CURRO0))GOTO 10313
      IF((IABS(COL-CURCO0).GE.4))GOTO 10313
10314   IF((CURCO0.GE.COL))GOTO 10315
          CALL T1OU(SCREE0(CURCO0,CURRO0))
          CURCO0=CURCO0+(1)
        GOTO 10314
10315   CONTINUE
10316   IF((CURCO0.LE.COL))GOTO 10318
          CALL T1OU(136)
          CURCO0=CURCO0-(1)
        GOTO 10316
10313   CALL T1OU(155)
        CALL T1OU(145)
        CALL T1OU(COL-1)
        CALL T1OU(ROW-1)
        CURRO0=ROW
        CURCO0=COL
10318 RETURN
      END
      SUBROUTINE NETPOS(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      CALL T1OU(155)
      CALL T1OU(189)
      CALL T1OU(ROW-1)
      CALL T1OU(COL-1)
      CURRO0=ROW
      CURCO0=COL
      RETURN
      END
      SUBROUTINE GT40P0(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((ROW.EQ.CURRO0))GOTO 10319
      IF((COL.EQ.CURCO0))GOTO 10319
        CALL T1OU(155)
        CALL T1OU(ROW+160-1)
        CALL T1OU(COL+160-1)
        CURRO0=ROW
        CURCO0=COL
        GOTO 10320
10319   IF((ROW.EQ.CURRO0))GOTO 10321
          CALL T1OU(134)
          CALL T1OU(ROW+160-1)
          CURRO0=ROW
          GOTO 10322
10321     IF((IABS(COL-CURCO0).GE.2))GOTO 10323
            CALL UHCM(COL)
            GOTO 10324
10323       CALL T1OU(149)
            CALL T1OU(COL+160-1)
            CURCO0=COL
10324   CONTINUE
10322 CONTINUE
10320 RETURN
      END
      SUBROUTINE ADDSP0(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      INTEGER NTABS,WHERE
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((CURRO0.NE.ROW))GOTO 10326
      IF((COL.LT.CURCO0-7))GOTO 10326
      GOTO 10325
10326   CALL T1OU(139)
        CALL T1OU(192-1+ROW)
        CURRO0=ROW
        CURCO0=1
10325 IF((COL.LE.CURCO0+2))GOTO 10327
        NTABS=(COL+1)/5
        WHERE=NTABS*5+1
        NTABS=NTABS-((CURCO0-1)/5)
        IF((NTABS+IABS(WHERE-COL).GT.4))GOTO 10328
          GOTO 10331
10329     NTABS=NTABS-(1)
10331     IF((NTABS.LE.0))GOTO 10330
            CALL T1OU(137)
          GOTO 10329
10330     CURCO0=WHERE
10328 CONTINUE
10327 IF((COL.LE.CURCO0+4))GOTO 10332
        WHERE=COL-CURCO0
        CALL T1OU(155)
        CALL T1OU(133)
        CALL T1OU(176+(WHERE/10))
        CALL T1OU(176+MOD(WHERE,10))
        CURCO0=COL
10332 CONTINUE
10333 IF((CURCO0.GE.COL))GOTO 10334
        CALL T1OU(SCREE0(CURCO0,CURRO0))
        CURCO0=CURCO0+(1)
      GOTO 10333
10334 CONTINUE
10335 IF((CURCO0.LE.COL))GOTO 10336
        CALL T1OU(136)
        CURCO0=CURCO0-(1)
      GOTO 10335
10336 RETURN
      END
      SUBROUTINE ANPPOS(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((ROW.NE.CURRO0))GOTO 10337
        GOTO 10338
10339     CALL T1OU(137)
        GOTO 10344
10341     CALL T1OU(137)
          CALL T1OU(137)
        GOTO 10344
10342     CALL T1OU(136)
        GOTO 10344
10343     CALL T1OU(136)
          CALL T1OU(136)
        GOTO 10344
10338   IF((COL.EQ.CURCO0+1))GOTO 10339
        IF((COL.EQ.CURCO0+2))GOTO 10341
        IF((COL.EQ.CURCO0-1))GOTO 10342
        IF((COL.EQ.CURCO0-2))GOTO 10343
          CALL T1OU(155)
          CALL T1OU(195)
          CALL T1OU(COL-1+160)
10340   GOTO 10344
10337   IF((COL.NE.CURCO0))GOTO 10345
          GOTO 10346
10347       CALL T1OU(138)
          GOTO 10352
10349       CALL T1OU(138)
            CALL T1OU(138)
          GOTO 10352
10350       CALL T1OU(139)
          GOTO 10352
10351       CALL T1OU(139)
            CALL T1OU(139)
          GOTO 10352
10346     IF((ROW.EQ.CURRO0+1))GOTO 10347
          IF((ROW.EQ.CURRO0+2))GOTO 10349
          IF((ROW.EQ.CURRO0-1))GOTO 10350
          IF((ROW.EQ.CURRO0-2))GOTO 10351
            CALL T1OU(155)
            CALL T1OU(210)
            CALL T1OU(ROW-1+160)
10348     GOTO 10352
10345     CALL T1OU(155)
          CALL T1OU(208)
          CALL T1OU(ROW-1+160)
          CALL T1OU(COL-1+160)
10352 CONTINUE
10344 CURRO0=ROW
      CURCO0=COL
      RETURN
      END
      SUBROUTINE CGCOO0(I)
      INTEGER I
      INTEGER UNITS,TENS,HUNDR0
      UNITS=MOD(I,10)
      I=I/(10)
      TENS=MOD(I,10)
      I=I/(10)
      HUNDR0=MOD(I,10)
      CALL T1OU(160+16+HUNDR0)
      CALL T1OU(160+16+TENS)
      CALL T1OU(160+16+UNITS)
      RETURN
      END
      SUBROUTINE CGPOS(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      INTEGER I,J
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((ROW.NE.CURRO0+1))GOTO 10353
      IF((COL.NE.1))GOTO 10353
        CALL T1OU(138)
        CURCO0=1
        CURRO0=CURRO0+(1)
        GOTO 10354
10353   IF((ROW.NE.1))GOTO 10355
        IF((COL.NE.1))GOTO 10355
          CALL T1OU(156)
          CURRO0=1
          CURCO0=1
          GOTO 10356
10355     IF((ROW.NE.CURRO0))GOTO 10357
          IF((COL.LE.CURCO0))GOTO 10357
          IF((COL.GT.CURCO0+7))GOTO 10357
10358       IF((CURCO0.EQ.COL))GOTO 10360
              CALL T1OU(157)
              CURCO0=CURCO0+(1)
            GOTO 10358
10357       IF((((ROW.NE.CURRO0).OR.(COL.GE.CURCO0)).OR.(COL.LT.CURCO0-7
     *)))GOTO 10361
10362         IF((CURCO0.EQ.COL))GOTO 10364
                CALL T1OU(136)
                CURCO0=CURCO0-(1)
              GOTO 10362
10361         CALL T1OU(129)
              CALL T1OU(213)
              I=511-10*(ROW-1)
              J=6*(COL-1)
              CALL CGCOO0(J)
              CALL CGCOO0(I)
              CURRO0=ROW
              CURCO0=COL
10364     CONTINUE
10360   CONTINUE
10356 CONTINUE
10354 RETURN
      END
      SUBROUTINE ISCPOS(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((ROW.NE.1))GOTO 10365
      IF((COL.NE.1))GOTO 10365
        CALL T1OU(136)
        GOTO 10366
10365   CALL T1OU(131)
        CALL T1OU(COL-1)
        CALL T1OU(ROW-1)
10366 CURRO0=ROW
      CURCO0=COL
      RETURN
      END
      SUBROUTINE SBEEC0(COORD)
      INTEGER COORD
      INTEGER WHERE
      CALL T1OU(176)
      WHERE=COORD-1
      CALL T1OU(176+(WHERE/10))
      CALL T1OU(176+MOD(WHERE,10))
      RETURN
      END
      SUBROUTINE TERAK0(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((CURRO0.NE.ROW))GOTO 10368
      IF((IABS(COL-CURCO0).GT.3))GOTO 10368
      GOTO 10367
10368   CALL T1OU(158)
        CALL T1OU(160+COL-1)
        CALL T1OU(160+ROW-1)
        GOTO 10369
10367   CALL UHCM(COL)
10369 CURCO0=COL
      CURRO0=ROW
      RETURN
      END
      SUBROUTINE TRSPOS(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
10370 IF((CURRO0.EQ.ROW))GOTO 10371
        IF((CURRO0.LE.ROW))GOTO 10372
          CALL T1OU(155)
          CURRO0=CURRO0-(1)
          GOTO 10370
10372     CALL T1OU(154)
          CURRO0=CURRO0+(1)
10373 GOTO 10370
10371 IF((CURCO0.EQ.COL))GOTO 10374
        IF((COL.LE.CURCO0))GOTO 10375
10376     IF((COL.LE.CURCO0))GOTO 10378
            CALL T1OU(153)
            CURCO0=CURCO0+(1)
          GOTO 10376
10375     IF((COL.GE.CURCO0/2))GOTO 10379
            CALL T1OU(157)
            CURCO0=1
10380       IF((CURCO0.GE.COL))GOTO 10382
              CALL T1OU(153)
              CURCO0=CURCO0+(1)
            GOTO 10380
10379       CONTINUE
10383       IF((COL.GE.CURCO0))GOTO 10384
              CALL T1OU(152)
              CURCO0=CURCO0-(1)
            GOTO 10383
10384     CONTINUE
10382   CONTINUE
10378 CONTINUE
10374 RETURN
      END
      SUBROUTINE TVTPOS(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      INTEGER HORIR0,HORIA0,VERTR0,VERTA0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      HORIR0=IABS(COL-CURCO0)
      HORIA0=COL-1
      IF((ROW.GT.CURRO0))GOTO 10385
        VERTR0=CURRO0-ROW
        GOTO 10386
10385   VERTR0=NROWS0-(ROW-CURRO0)
10386 VERTA0=NROWS0-(ROW-1)
      IF((1+HORIA0+VERTA0.GT.HORIR0+VERTR0))GOTO 10387
        CALL T1OU(140)
        CURRO0=1
        CURCO0=1
10387 CONTINUE
10388 IF((CURRO0.EQ.ROW))GOTO 10389
        CALL T1OU(139)
        CURRO0=CURRO0-(1)
        IF((CURRO0.GE.1))GOTO 10388
          CURRO0=NROWS0
10390 GOTO 10388
10389 IF((CURCO0.LE.COL))GOTO 10398
        GOTO 10394
10392   CURCO0=CURCO0-(1)
10394   IF((CURCO0.EQ.COL))GOTO 10395
          CALL T1OU(136)
        GOTO 10392
10396   CURCO0=CURCO0+(1)
10398   IF((CURCO0.EQ.COL))GOTO 10397
          CALL T1OU(137)
        GOTO 10396
10397 CONTINUE
10395 RETURN
      END
      SUBROUTINE NBYPOS(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      IF((COL.GT.3))GOTO 10399
      IF((ROW.NE.CURRO0+1))GOTO 10399
        CURRO0=CURRO0+(1)
        CURCO0=1
        CALL T1OU(138)
10399 IF((CURRO0.NE.ROW))GOTO 10401
      IF((IABS(COL-CURCO0).GT.3))GOTO 10401
      GOTO 10400
10401   CALL T1OU(150)
        CALL T1OU(160+COL-1)
        CALL T1OU(160+ROW-1)
        GOTO 10402
10400   CALL UHCM(COL)
10402 CURCO0=COL
      CURRO0=ROW
      RETURN
      END
      SUBROUTINE ANSIP0(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      INTEGER UNITS,TENS
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      CALL T1OU(155)
      CALL T1OU(219)
      UNITS=MOD(ROW,10)
      TENS=ROW/10
      IF((TENS.EQ.0))GOTO 10403
        CALL T1OU(TENS+176)
10403 CALL T1OU(UNITS+176)
      CALL T1OU(187)
      UNITS=MOD(COL,10)
      TENS=COL/10
      IF((TENS.EQ.0))GOTO 10404
        CALL T1OU(TENS+176)
10404 CALL T1OU(UNITS+176)
      CALL T1OU(200)
      CURCO0=COL
      CURRO0=ROW
      RETURN
      END
      SUBROUTINE FORSY0(ROW,COL)
      INTEGER ROW,COL
      COMMON /CLINES/LINE10,LINE20,NLINE0,CURLN0,LASTL0
      INTEGER LINE10,LINE20,NLINE0,CURLN0,LASTL0
      COMMON /CPAT/PATAA0(256),TLPAT0(256),SUBSA0(256),TSETA0(256)
      INTEGER PATAA0,TLPAT0,SUBSA0,TSETA0
      COMMON /CTXT/TXTAA0(512)
      INTEGER TXTAA0
      COMMON /CFILE/SAVFI0(512)
      INTEGER SAVFI0
      COMMON /CBUFR$/LASTB0,FENCE0,FREEA0,LINE00,BUFAA0(65520)
      INTEGER LASTB0,FENCE0,FREEA0,LINE00
      INTEGER BUFAA0
      INTEGER PREVL0(1),NEXTL0(1)
      INTEGER GLOBM0(1),LINEL0(1)
      INTEGER * 4 SEEKA0(1)
      INTEGER MARKN0(1)
      COMMON /CUNDO/LIMBO0,LIMCN0
      INTEGER LIMBO0,LIMCN0
      COMMON /CSCRAT/SCRAA0,SCREN0,SCRNA0(512),LOSTL0
      INTEGER SCRAA0
      INTEGER * 4 SCREN0
      INTEGER SCRNA0
      INTEGER LOSTL0
      COMMON /CMISC/BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0,PEEKC0,SAV
     *CO0
      INTEGER BUFFE0,ERRCO0,SAVER0,PROBA0,ARGNO0,LASTC0
      INTEGER PEEKC0,SAVCO0(512)
      COMMON /CMARK/SAVKN0
      INTEGER SAVKN0
      COMMON /COPT/TABST0(512),TABSU0(512),UNPRI0,DDIRA0,ABSNO0,NCHOI0,O
     *VERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GLOBA0
      INTEGER TABST0,TABSU0,UNPRI0
      INTEGER DDIRA0,ABSNO0,NCHOI0,OVERM0,WARNC0,FIRST0,TSPEE0,INDEN0,GL
     *OBA0
      COMMON /CTERM/TERMT0
      INTEGER TERMT0
      COMMON /CSCRN/SCREE0(128,51),MSGAL0(128),NROWS0,NCOLS0,CURRO0,CURC
     *O0,TOPRO0,BOTRO0,CMDRO0,TOPLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,
     *SCLEN0,SCTOP0,SCLIN0
      INTEGER SCREE0
      INTEGER MSGAL0,NROWS0,NCOLS0,CURRO0,CURCO0,TOPRO0,BOTRO0,CMDRO0,TO
     *PLN0,INSER0,INVER0,FIRSU0,RELAA0,RELZA0,SCLEN0,SCTOP0,SCLIN0(51)
      COMMON /CUNIX0/UNIXM0,BACKS0,NOTIN0,XMARK0,ESCAP0
      INTEGER UNIXM0
      INTEGER BACKS0,NOTIN0,XMARK0,ESCAP0
      COMMON /CTTY/TTYST0
      INTEGER TTYST0
      EQUIVALENCE (PREVL0(1),BUFAA0(1)),(NEXTL0(1),BUFAA0(2)),(GLOBM0(1)
     *,BUFAA0(3)),(SEEKA0(1),BUFAA0(4)),(LINEL0(1),BUFAA0(6)),(MARKN0(1)
     *,BUFAA0(7))
      CALL T1OU(156)
      CALL T1OU(195)
      CALL T1OU(ROW-1+160)
      CALL T1OU(COL-1+160)
      CURRO0=ROW
      CURCO0=COL
      RETURN
      END
C ---- Long Name Map ----
C Toprow                         topro0
C Sctop                          sctop0
C inslines                       insli0
C Lostlines                      lostl0
C Indent                         inden0
C Invertcase                     inver0
C Fence                          fence0
C Topln                          topln0
C setcursor                      setcu0
C gt40pos                        gt40p0
C terakpos                       terak0
C Savfil                         savfi0
C Line0                          line00
C Tspeed                         tspee0
C clrscreen                      clrsc0
C printverboseerrormessage       print0
C Line1                          line10
C Absnos                         absno0
C horiabs                        horia0
C uniquelyname                   uniqu0
C Line2                          line20
C Limcnt                         limcn0
C Curcol                         curco0
C Insertmode                     inser0
C dologout                       dolog0
C doshell                        doshe0
C Nlines                         nline0
C Savcom                         savco0
C Peekc                          peekc0
C addspos                        addsp0
C fixscreen                      fixsc0
C Prevline                       prevl0
C Cmdrow                         cmdro0
C adjustwindow                   adjus0
C Bufferchanged                  buffe0
C Errcode                        errco0
C Firstcol                       first0
C Globals                        globa0
C updscreen                      updsc0
C Lastln                         lastl0
C Nextline                       nextl0
C Overlaycol                     overm0
C smargin                        smarg0
C Txt                            txtaa0
C Savknm                         savkn0
C Tabstr                         tabsu0
C Nrows                          nrows0
C Unixmode                       unixm0
C setscreen                      setsc0
C scanfortab                     scang0
C forsyspos                      forsy0
C Scrname                        scrna0
C Nchoise                        nchoi0
C litmesg                        litme0
C horirel                        horir0
C getrange                       getra0
C drawbox                        drawb0
C Seekaddr                       seeka0
C Limbo                          limbo0
C scanpos                        scanp0
C vertabs                        verta0
C garbagecollect                 garba0
C Subs                           subsa0
C Relz                           relza0
C dellines                       delli0
C displaymessage                 displ0
C loadstr                        loads0
C restorescreen                  resto0
C Tabstops                       tabst0
C Sclen                          sclen0
C cleartoeol                     clear0
C Buf                            bufaa0
C whereami                       where0
C Tset                           tseta0
C Argno                          argno0
C ansipos                        ansip0
C Unprintable                    unpri0
C regentpos                      regen0
C infopos                        infop0
C sendmesg                       sendm0
C termchar                       termc0
C Botrow                         botro0
C Markname                       markn0
C Probation                      proba0
C Lastcharscanned                lastc0
C prevcursor                     prevc0
C Warncol                        warnc0
C initialize                     initi0
C overlay                        overl0
C Pat                            pataa0
C Lineleng                       linel0
C cunixswt                       cunix0
C decodemnemonic                 decod0
C Globmark                       globm0
C Termtype                       termt0
C Ncols                          ncols0
C scanforchar                    scanf0
C Currow                         curro0
C vertrel                        vertr0
C recvmesg                       recvm0
C Scr                            scraa0
C Firstaffected                  firsu0
C NOTINCCL                       notin0
C bee2pos                        bee2p0
C positioncursor                 posit0
C Msgalloc                       msgal0
C prevstatus                     prevs0
C hundreds                       hundr0
C hwinsdel                       hwins0
C litnnum                        litnn0
C Screenimage                    scree0
C gettermtype                    gette0
C sbeecoord                      sbeec0
C warndeleted                    warnd0
C Curln                          curln0
C Free                           freea0
C XMARK                          xmark0
C b200coord                      b200c0
C spinject                       spinj0
C Tlpat                          tlpat0
C Lastbf                         lastb0
C Saverrcode                     saver0
C Ddir                           ddira0
C Rela                           relaa0
C ESCAPE                         escap0
C senddelay                      sendd0
C Scline                         sclin0
C Ttystate                       ttyst0
C cgcoord                        cgcoo0
C Scrend                         scren0
C BACKSCAN                       backs0
