Trailing-Edge
-
PDP-10 Archives
-
decus_20tap4_198111
-
decus/20-0125/waitch.for
There is 1 other file named waitch.for in the archive. Click here to see a list.
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