Trailing-Edge
-
PDP-10 Archives
-
decuslib20-04
-
decus/20-0125/code6.for
There is 1 other file named code6.for in the archive. Click here to see a list.
SUBROUTINE CODE6(BYTE, NUM)
C THIS SUBROUTINE IS USED TO CODE EIGHT BIT
C BYTES INTO SIX BIT BYTES AND TRANSMIT THEM
C TO THE GT40
IMPLICIT INTEGER (A - Z)
INTEGER BYTE(3), SIX(4)
IF(NUM .LT. 3) BYTE(3) = 0
IF(NUM .LT. 2) BYTE(2) = 0
SIX(1) = GFIELD(BYTE(1), 28, 6)
SIX(2) = (GFIELD(BYTE(1), 34, 2) * 16) .OR. GFIELD(BYTE(2), 28, 4)
SIX(3) = (GFIELD(BYTE(2), 32, 4) * 4) .OR. GFIELD(BYTE(3), 28, 2)
SIX(4) = GFIELD(BYTE(3), 30, 6)
DO 10 I = 1, 4
C MAKE SURE ALL CHARACTERS ARE PRINTABLE
IF(SIX(I) .LT. "40) SIX(I) = SIX(I) + "100
CALL SNDCHR(SIX(I))
10 CONTINUE
RETURN
END