      SUBROUTINE MAIN
      LOGICAL*1 BUF(512)
      INTEGER GETARG, OPEN, ASSNGI
      INTEGER I
      CALL QUERY(21Husage:  os [file] ...)
      CALL FILNFO(2, BUF, I)
      IF (.NOT.(ASSNGI(BUF, 5, 2) .EQ. -3))GOTO 23000
      CALL ERROR(55HCannot reset standard output to PRINT carriage contr
     *ol.)
23000 CONTINUE
      I=1
23002 CONTINUE
      IF (.NOT.(GETARG(I,BUF,512) .EQ. -1))GOTO 23005
      IF (.NOT.(I .NE. 1))GOTO 23007
      GOTO 23004
23007 CONTINUE
      INT = 1
      GOTO 23006
23005 CONTINUE
      IF (.NOT.(BUF(1) .EQ. 45 .AND. BUF(2) .EQ. 0))GOTO 23009
      INT = 1
      GOTO 23010
23009 CONTINUE
      INT = OPEN(BUF,1)
      IF (.NOT.(INT .EQ. -3))GOTO 23011
      CALL CANT(BUF)
23011 CONTINUE
23010 CONTINUE
23006 CONTINUE
      CALL OVERS (INT)
      IF (.NOT.(INT .NE. 1))GOTO 23013
      CALL CLOSE(INT)
23013 CONTINUE
23003 I=I+1
      GOTO 23002
23004 CONTINUE
      RETURN
      END
      SUBROUTINE OVERS(INT)
      LOGICAL*1 GETCH
      LOGICAL*1 C
      INTEGER COL, NEWCOL, INT
      COL = 1
23015 CONTINUE
      NEWCOL = COL
23018 IF (.NOT.(GETCH(C,INT) .EQ. 8))GOTO 23019
      NEWCOL = MAX0(NEWCOL-1, 1)
      GOTO 23018
23019 CONTINUE
      IF (.NOT.(NEWCOL .LT. COL))GOTO 23020
      CALL PUTCH(10,2)
      CALL PUTCH(43,2)
      COL=1
23022 IF (.NOT.(COL.LT.NEWCOL))GOTO 23024
      CALL PUTCH(32,2)
23023 COL=COL+1
      GOTO 23022
23024 CONTINUE
      GOTO 23021
23020 CONTINUE
      IF (.NOT.(COL .EQ. 1 .AND. C .EQ. 12))GOTO 23025
      CALL PUTCH(49,2)
      COL = COL + 1
      GOTO 23016
23025 CONTINUE
      IF (.NOT.(COL .EQ. 1 .AND. C .NE. -1))GOTO 23027
      CALL PUTCH(32,2)
23027 CONTINUE
23026 CONTINUE
23021 CONTINUE
      IF (.NOT.(C .EQ. -1))GOTO 23029
      GOTO 23017
23029 CONTINUE
      CALL PUTCH(C,2)
      IF (.NOT.(C .EQ. 10))GOTO 23031
      COL = 1
      GOTO 23032
23031 CONTINUE
      COL = COL + 1
23032 CONTINUE
23016 GOTO 23015
23017 CONTINUE
      RETURN
      END
