       SUBROUTINE TITLE
c************************************************************************
c*
c*   PROGRAM TO SET SCREEN AND HEADER
c*
C*   AUTOR: S.I. ZDZIESZYNSKI
C*
c*          FEB-93
c*************************************************************************
       BYTE SCREEN(10),CURSOR(8),CURSR(8),DEVICE(12),TOP(4),BOTOM(4)
       CHARACTER TEXT*12,CR*1

       DATA SCREEN /0,27,91,50,74, 27,91,63,54,108/  !CLEAR, SET ORGIN
       DATA CURSOR /0,27,91,55,59,49,49,102/         !SET CURSOR
       DATA DEVICE /0,27,91,49,59,53,59,55,59,51,51,109/ 
C      SET TERMINAL:  INCREASE INTENSITY
C                     BLINKING
C                     REVERS VIDEO
C                     YELOW DISPLAY
       DATA TOP /0,27,35,51/
       DATA BOTOM /0,27,35,52/        !DOUBLE PRINT
       DATA TEXT   /'*** WDXS ***'/
       DATA INP/1/
C
C*** SET SCREEN AND TITLE
C
       WRITE(6,1)(SCREEN(I),I=1,10)
1      FORMAT(10A1)
       WRITE(6,2)(CURSOR(I),I=1,8)
2      FORMAT(8A1)
       WRITE(6,3)(DEVICE(I),I=1,12)
3      FORMAT(12A1)
       CURSOR(4)=56     
       WRITE(6,4)(TOP(I),I=1,4),TEXT,(CURSOR(I),I=1,8),
     &         (BOTOM(I),I=1,4),TEXT
4      FORMAT(4A1,A12,8A1,4A,A12,////)
       TOP(4)=54

       CURSOR(4)=49
       CURSOR(5)=52
       CURSOR(6)=59
       CURSOR(7)=53
       WRITE(6,8)(CURSOR(I),I=1,8)
8      FORMAT(8A1)
      

       DEVICE(4)=48 
       DEVICE(5)=109
       WRITE(6,5)(TOP(I),I=1,4)
5      FORMAT(4A1,' WAVELENGTH DISPERSIVE ',/)
       CURSOR(5)=53
       WRITE(6,9)(CURSOR(I),I=1,8)
9      FORMAT(8A1)
       WRITE(6,7)(TOP(I),I=1,4)
7      FORMAT(4A1,'  X-RAY SPECTROMETER   ')
       WRITE(6,6)(DEVICE(I),I=1,5)
6      FORMAT(5A1)
C
      WRITE(6,11) CR
11    FORMAT(//////,'$ PUSH RETURNE:',A1)


14    READ(6,12) CR
12    FORMAT(A1)

      IF(CR.EQ.CHAR(32))THEN
      TYPE 10,(SCREEN(I),I=1,10)
10    FORMAT(10A1)
      GO TO 20
      ENDIF
      IF(CR.NE.CHAR(32))THEN
      TYPE 13,7,7,7,CHAR(7)
13    FORMAT(4A1)
      GO TO 14
      ENDIF
20    RETURN
      END     
