Trailing-Edge
-
PDP-10 Archives
-
decuslib10-07
-
43,50446/waitch.f4
There are no other files named waitch.f4 in the archive.
INTEGER FUNCTION WAITCH(IDUM)
C************************************************************
C
C THIS ROUTINE IS USED TO RECEIVE ONE ASCII
C CHARACTER FROM THE GT40. ONLY THE LOW
C ORDER 6 BITS OF THE CHARACTER ARE RETAINED.
C
C POSSIBLE ERRORS:
C NONE
C
C WARNING:
C ONCE THIS ROUTINE IS ENTERED, IT WAITS
C FOR THE GT40 TO TRANSMIT A CHARACTER. IF
C NO CHARACTER IS FORTHCOMING (I.E. GT40 HUNG)
C THEN THIS ROUTINE ALSO HANGS UP. UNFORTUNATELY
C DUE TO SWAPPING, AND THE FACT THAT THE GT40 MIGHT
C BE BUSY BEFORE IT CAN SEND A CHARACTER, THERE IS
C NO VALID WAY TO TIME HOW LONG A CHARACTER SHOULD
C TAKE.
C
C ROUTINES CALLED:
C GETCHR - RETURNS ONE ASCII CHARACTER FROM GT40
C RETURNS -1 IF NO CHARACTER PRESENT
C
C************************************************************
INTEGER GETCHR
100 I = GETCHR(0)
IF(I .EQ. -1) GO TO 100
WAITCH = I .AND. "77
RETURN
END