      SUBROUTINE GETBIT( BUFFER, OFFSET, VALUE )
C
C GET VALUE OF BIT AT OFFSET IN BUFFER
C
      INTEGER BUFFER(1), OFFSET, VALUE, ADDRESS
C
      VALUE = 0
      INDEX = 1
      IOFF = OFFSET
      DO WHILE ( IOFF .GT. 32 )
       INDEX = INDEX + 1
       IOFF = IOFF - 32
      ENDDO
      VALUE = IBITS( BUFFER(INDEX), IOFF, 1 )
C
      RETURN
      END
