C     .TITLE IT
C
C   9 APR 74 - PAUL HENDERSON
C
      LOGICAL OPEN,ERROR
      CHARACTER*30 FMT(1)/'(''THIS IS A LINE OF TEXT'')'/,STAT
      COMMON /GR/STAT
C
   1  CALL CLEAR (0)
      CALL TEXT (2,1,30,500,5,2,FMT)
      PAUSE 1
      CALL DSTOP
      PAUSE 2
      CALL DPASS (200)
      $TRACEON
      CALL DGO
      PAUSE 4
      CALL RED
      PAUSE 11
      CALL GREEN
      PAUSE 12
      CALL BLUE
      PAUSE 13
   2  OPEN = .TRUE.
      CALL SHUTTR (OPEN,ERROR)
      STAT = '1 SHOULD BE OPEN (T), ERROR (F)'
      CALL TELL (OPEN,ERROR)
      PAUSE 14
      CALL SHUTTR (OPEN,ERROR)
      STAT = '2 SHOULD BE OPEN (T), ERROR (T)'
      CALL TELL (OPEN,ERROR)
      PAUSE 15
      OPEN = .FALSE.
      CALL SHUTTR (OPEN,ERROR)
      STAT = '3 SHOULD BE OPEN (F), ERROR (F)'
      CALL TELL (OPEN,ERROR)
      PAUSE 15
      CALL SHUTTR (OPEN,ERROR)
      STAT = '4 SHOULD BE OPEN (F), ERROR (T)'
      CALL TELL (OPEN,ERROR)
      PAUSE 16
      GO TO 2
      END
      SUBROUTINE TELL (L1,L2)
      CHARACTER*35 FMT(1)/'(A30,'' OPEN ='',L2,'', ERROR ='',L2)'/
      CHARACTER*30 STATUS
      LOGICAL L1,L2
      COMMON /GR/STATUS
      CALL TEXT (2,2,100,400,5,1,FMT,STATUS,L1,L2)
      RETURN
      END
