C     .TITLE CO-OP
C
C   3 JAN 75 (PDH) MAKE VERSION FOR STORING FILES
C  30 DEC 74 (PDH) READ LIMITS FROM FILE
C  13 DEC 74 (PDH) DISPLAY BOX, PUT 'ITAG' IN COMMON
C  12 DEC 74 (PDH) CHANGE FOR INTERLACED FIGURES
C  30 OCT 74 (PDH) CALLS NOW AS FAR AS 'PART10'
C  28 OCT 74 (PDH) MORE WORK ON 'PART6'; SEPARATE PARTS FOR CHAINING
C  25 OCT 74 (PDH) DEBUG 'PART4'; ADD 'PART6'
C  24 OCT 74 (PDH) DEBUG 'PART3' & 'PART5'; ADD 'PART4'
C  23 OCT 74 (PDH) 'PART2' WORKS; ADD 'PART3', 'PART5'
C  18 OCT 74 - PAUL HENDERSON
C
      LOGICAL T/.TRUE./,ISENSW,L
      INTEGER FRAME,UNIT
      COMMON /LIMITS/XMIN,XMAX,YMIN,YMAX
      COMMON /ANGLES/PIBY4,PI5BY4,PI
      COMMON /TAGS/ITAG,INDEX,FRAME,UNIT
C
  10  CALL OPEN (1,'BOXES SRC')
      CALL OPEN (2,'COOPS2BIN')
      CALL OPEN (3,'COOPS3BIN')
      UNIT = 2
      PI     = 3.141593
      PIBY4  = PI/4.
      PI5BY4 = PIBY4*5.
C
  20  ITAG = 10
  21  READ  (1,*,END=7) XMIN,XMAX,YMIN,YMAX,FRAME
      IF (FRAME .GT. 6) UNIT = 3
      WRITE (4,*) 'BEGIN FRAME',FRAME
      INDEX = 0
      CALL CO
      CALL OP
C
      READ  (1,*,END=7) XMIN,XMAX,YMIN,YMAX
      CALL CO
      CALL OP
      GO TO 21
C
   7  STOP 7
      END
