C***   SPEAK
C  I/O ROUTINES
C  (SPEAK, PSPEAK, RSPEAK, GETIN, YES, A5TOA1, GETLIN, A1TOA5, CONFUZ, CLRLIN, N

       SUBROUTINE SPEAK(N)

C  PRINT THE MESSAGE WHICH STARTS AT LINES(N).  PRECEDE IT WITH A BLANK LINE
C  UNLESS BLKLIN IS FALSE.

       IMPLICIT INTEGER(A-Z)
       LOGICAL BLKLIN
      INTEGER*4 RTEXT,PTEXT,MTEXT,N,K,I,L
      INTEGER*4 LINES,OLINE,MESSGS
       COMMON /TXTCOM/ LINES(25000),RTEXT(400),PTEXT(150),MTEXT(45)
       COMMON /BLKCOM/ BLKLIN
       DIMENSION OLINE(36),ILINE(70)
      LOGICAL ACTIVE
      COMMON/LNKCOM/ACTIVE(32),USER(15,32),MESSGS(32),MONITO(32),
     1  TEXT(70,32)
      COMMON/WRUCOM/ME

      M=0
      IF(MONITO(ME).LE.0)GOTO 100
      CALL SEM$WT(MONITO(ME),CODE)
      MESSGS(ME)=N
100    IF(N.EQ.0)GOTO 4
      IF(LINES(N+1).EQ.XOR('>$< ','CLYD'))GOTO 4
       IF(BLKLIN)PRINT 3
       K=N
C next line gutted as i can't imagine what it means. dt.
C1     IF(M.GT.22)CALL DUPLX$(:30000)
C so add a new label 1
1      CONTINUE
      IF(M.GT.22)M=0
        L=IABS(LINES(K))-K-1
       DO 2 I=1,L
2     OLINE(I)=XOR(LINES(K+I),'CLYD')
       PRINT 3,(OLINE(I),I=1,L)
3       FORMAT(' ',19A4)
      M=M+1
       K=K+L+1
       IF(LINES(K).GE.0)GOTO 1
4     IF(MONITO(ME).GE.0)RETURN
      DO 10 I=1,70
10    ILINE(I)=TEXT(I,IABS(MONITO(ME)))
      MONITO(ME)=0
      WRITE(1,101)ILINE
101   FORMAT(70A1)
      RETURN
       END
