Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-02 - decus/20-0063/send.for
There are 5 other files named send.for in the archive. Click here to see a list.
	IMPLICIT INTEGER (A-Z)
	DIMENSION ARAY1(100),ARAY2(100),HEADER(2)
	TYPE 2000
2000	FORMAT(' TTY #   '$)
	ACCEPT 2001,IOINDX
2001	FORMAT(O)
	IOINDX=IOINDX+"200000
	CALL INITF(IOINDX,IERR,ITYPE)
	IF (.NOT.IERR)GO TO 106
	DIMENSION NUMBER(20)
	TYPE 200
200	FORMAT(' HOW MANY DIGITS TO BE DIALED?  '$)
	ACCEPT 201,I
201	FORMAT(I)
	IF (I.EQ.0)GO TO 210
	TYPE 202
202	FORMAT(' TYPE DIGIT <CR> FOR EACH DIGIT, 14 = 5 SECOND PAUSE'/)
	DO 211 J=1,I
	ACCEPT 201,NUMBER(J)
211	CONTINUE
210	CALL DIALF(NUMBER,I,IFLAG,ITYPE)
	IF (.NOT.IFLAG)GOTO 203
	TYPE 1040
1040	FORMAT(/' STARTING TO SEND'/)
	MSN=1
1	DO 12 I=1,100
	ARAY1(I)=-1
12	ARAY2(I)=-1
	I=RAN(X).AND."777777
	J=I/70
	ICOUNT=(I-J*70)+2
	DO 10 I=1,ICOUNT
10	ARAY1(I)=RAN(X).AND."377
	HEADER(1)=MSN.AND."377
	HEADER(2)=ICOUNT
	CALL SENDF(HEADER,2,IERR,ITYPE)
	IF(.NOT.IERR)GO TO 100
	ARAY1(1)=HEADER(1)
	ARAY1(2)=0
	CALL SENDF(ARAY1,ICOUNT,IERR,ITYPE)
	IF(.NOT.IERR)GO TO 101
	CALL RECVF(ARAY2,ICOUNT,IERR,ITYPE2)
	IF(.NOT.IERR)GO TO 103
	DO 11 I=1,100
	IF (ARAY1(I).NE.ARAY2(I))GO TO 104
11	CONTINUE
	RESP='OK'
3	TYPE 1000,MSN,ICOUNT,ITYPE,RESP
1000	FORMAT(' 'I3,3X,I3,3X,I3,3X,A5)
2	MSN=MSN+1
	GO TO 1
100	TYPE 1001,MSN
1001	FORMAT(' 'I3,3X,'ERROR SENDING HEADER')
	GO TO 2
101	RESP='--'
	GO TO 3
103	RESP='LOST'
	GO TO 3
104	RESP='BAD'
	GO TO 3
106	TYPE 1005
	IF (ITYPE.EQ.1)TYPE 1002
	IF (ITYPE.EQ.2)TYPE 1003
	IF (ITYPE.EQ.3)TYPE 1004
	CALL EXIT
1005	FORMAT(' INITIALIZATION ERROR')
1002	FORMAT(' TTY NOT AVAILABLE')
1003	FORMAT(' TTY NOT ASSIGNED')
1004	FORMAT(' NO CHANNELS AVAILABLE')
203	TYPE 1008
1008	FORMAT(' ERROR IN DIALER')
	IF (ITYPE.EQ.1)TYPE 1006
	IF (ITYPE.EQ.2)TYPE 1007
	CALL EXIT
1006	FORMAT(' TTY NOT A DATASET')
1007	FORMAT(' DIAL DID NOT GO THROUGH')
	END